Exemple #1
0
        /// <summary>
        /// return balance of NFT in batch address
        /// execute the return value with eth_call
        /// </summary>
        /// <param name="_transactionNonce"></param>
        /// <param name="_chainId"></param>
        /// <param name="_addr"></param>
        /// <param name="_id"></param>
        /// <returns></returns>
        public static string BalanceOf(Address _addr, uint _id)
        {
            ContractABI _abi = new ContractABI(Ethereum.EIP1155_METHOD_BALANCEOF);

            _abi.Add(_addr);
            _abi.Add(_id);
            return(_abi.ToString());
        }
Exemple #2
0
        /// <summary>
        /// return balance of NFT in address
        /// addrs.length=_ids.length
        /// execute the return value with eth_call
        /// </summary>
        /// <param name="_transactionNonce"></param>
        /// <param name="_chainId"></param>
        /// <param name="_addr"></param>
        /// <param name="_id"></param>
        /// <returns></returns>
        public static string BalanceOfBatch(Array _addrs, Array _ids)
        {
            if (_addrs.Length != _ids.Length)
            {
                throw new ArgumentException("Address length not equal ids length");
            }
            ContractABI _abi = new ContractABI(Ethereum.EIP1155_METHOD_BALANCEOFBATCH);

            _abi.Add(_addrs);
            _abi.Add(_ids);
            return(_abi.ToString());
        }