Links
Comment on page

1. Deposit Funds

Description

Make a deposit to an account. Regardless of the taker or the maker, the DAI needs to be deposited prior to making an order.
TBD: Narratives

User Interface

Could not load image
Deposit to an account
Could not load image
Deposit Panel

Function Description

Item
Description
Contract Address
Trading contract (referenced by Smart Contract Overview section)
Contract Name
SLDDAIContract.sol
Function
function deposit(uint256 amount)
Function Selector
0xb6b55f25
Invocation Type
Ethereum Transaction
Passing Parameters
Amount of DAIs deposited; actual number multiplied by 1E18
Return Value
None
Event Emitted
event DDSDeposit(address indexed sender, address indexed toAddr, uint256 motageAmount);
Event Signature
0x8741a00229f2b8b24379b60f7a4ba3a3f3d92f328280c47a38cd03504ac72c42
Transaction Sample(BSC testnet)

ABI Description

[{
"inputs": [{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}],
"name": "deposit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}]

Examples

Calling Examples

JavaScript
Python
var Web3 = require('web3');
const BigNumber = require('bignumber.js');
// BSC Mainnet: https://bsc-dataseed.binance.org
// BSC Testnet: https://data-seed-prebsc-1-s1.binance.org:8545
const web3 = new Web3("https://data-seed-prebsc-1-s1.binance.org:8545");
// Need trading contract address
const CONTRACT_ADDRESS = "";
const ABI = [{
"inputs": [{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}],
"name": "deposit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}];
// Deposit 1 DAI.
const DEPOSIT_AMOUNT = 1e18;
var contract = new web3.eth.Contract(ABI, CONTRACT_ADDRESS);
contract.methods.deposit(new BigNumber(DEPOSIT_AMOUNT).toString()).send({
from: "CALLER_ADDRESS",
}, function(error, result){
if(!error) {
console.log('Response:', result);
} else {
console.log(error);
}
});
# This example is written by using Web3.py
# More details on Web3.py could be found here - https://web3py.readthedocs.io/

HTTP Request Example

post
(BSC Mainnet) https://bsc-dataseed.binance.org
/
Send a Deposit Transaction