5.1 Asset-Balance

Contract Interface

    event GenesisBalance(address indexed user, bytes32 indexed tokenId, uint balance);
    event BalanceChange(address indexed user, bytes32 indexed tokenId, uint balance);
    event Transfer(address indexed fromAddr, address indexed toAddr, bytes32 indexed tokenId, uint amount);
    event CancelTransfer(address indexed fromAddr, address indexed toAddr, bytes32 indexed tokenId, uint balance);
    event Deposit(address peggingContract, bytes32 tokenId, address toAddr, uint amount);
    event Withdraw(address peggingContract, bytes32 tokenId, address user, address extraUser, bytes destination, uint amount, bytes comment, uint withdrawId, uint feeAmount);
    event GiveBack(address peggingContract, bytes32 tokenId, address user, address extraUser, uint amount, uint feeAmount, uint networkFee, uint backAmount);

    mapping (bytes32 => address) public peggingContracts;
    mapping (bytes32 => bytes32) public tokenIdToSummary;
    mapping (bytes32 => uint) public decimals;
    mapping (bytes32 => bool) public isValidToken;
    mapping (bytes32 => mapping (address => uint)) public balanceOf;
    mapping (address => bool) public isValidPeggingContract;
    mapping (bytes32 => bool) public isUsedTransfer;
    mapping (bytes32 => bool) public isUsedWithdraw;
    mapping (address => bool) public userTransferable;
    mapping (bytes32 => uint) public withdrawFee;

    bool public defaultTransferable;
    uint public withdrawCount = 0;
    address public feeGovernance;
    
    function deposit(bytes32 tokenSummary, address toAddr, uint amount) public
    function deposit(bytes32 tokenSummary, address toAddr, uint amount, address extraToAddr) public
    function giveBack(bytes32 tokenSummary, address toAddr, uint amount, uint networkFee) public
    function giveBack(bytes32 tokenSummary, address toAddr, uint amount, uint networkFee, address extraToAddr) public
    function withdraw(bytes32 tokenId, bytes memory destination, uint amount, bytes memory comment) public
    function withdraw(bytes32 tokenId, address extraUser, bytes memory destination, uint amount, bytes memory comment) public
    function withdrawBySignature(bytes32[] memory bytes32s, uint[] memory uints, address fromAddr, bytes memory destination, bytes memory comment, uint8 v) public
    function cancelWithdrawSignature(address fromAddr, bytes32 tokenId, bytes memory destination, uint amount, bytes memory comment, uint expireTime, bytes32 wNonce, uint8 v, bytes32 r, bytes32 s) public
    function transfer(bytes32 tokenId, address toAddr, uint amount, bool needLog) public
    function transfer(bytes32 tokenId, address toAddr, uint amount, bool needLog, address extraToAddr) public
    function transfer(bytes32 tokenId, address toAddr, uint amount, bool needLog, bytes memory data, string memory callMethod) public
    function transferBySignature(bytes32[] memory bytesArr, address[] memory addrs, uint amount, uint8 v, bool onlyToSpender, bool needLog) public
    function transferBySignatureWithExtra(bytes32[] memory bytesArr, address[] memory addrs, uint amount, uint8 v, bool onlyToSpender, bool needLog) public
    function cancelTransferSignature(bytes32[] memory bytesArr, address[] memory addrs, uint amount, uint8 v, bool onlyToSpender) public
    function cancelTransferSignatureWithExtra(bytes32[] memory bytesArr, address[] memory addrs, uint amount, uint8 v, bool onlyToSpender) public
    
    function getBalance(bytes32 tokenId, address addr) public view returns(uint)
    function logBalance(bytes32 tokenId, address addr) public

Last updated