Links

Settlement

Description

Settle an MVault

User Interface

TODO(Snapshots)

Function Description

Contract Address
MVault contract (referenced by General Info section)
Contract Name
MVault.sol
Function
function settleAll() public view
Function Selector
0xa015aefe
Invocation Type
Ethereum Transaction
Passing Parameters
None
Return Value
None

ABI Description

{
"inputs": [],
"name": "settleAll",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}

Examples

Calling Examples

JavaScript
Python
// This example is written by using Web3.js
// More details on Web3.js could be found here - https://web3js.readthedocs.io/
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 MVault Factory contract address
const CONTRACT_ADDRESS = "Replace with MVault Factory contract address";
const ABI = [ {
"inputs": [],
"name": "settleAll",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}];
var contract = new web3.eth.Contract(ABI, CONTRACT_ADDRESS);
contract.methods.settleAll().call({
}, 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
/
Query Vault Info for latest round quotation
Request Body Example:
{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x455299A73D94190f7A131E66E0bDc05BE6D93834",
"data": "0xa015aefe"
},
"latest"
],
"id": 1234
}
CURL Example:
curl --location --request POST 'https://data-seed-prebsc-1-s1.binance.org:8545/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x455299A73D94190f7A131E66E0bDc05BE6D93834",
"data": "0xa015aefe"
},
"latest"
],
"id": 1234
}'