Esempio n. 1
0
        public static string Transfer()
        {
            ContractABI _abi = new ContractABI(Ethereum.EIP1155_METHOD_TRANSFER);

            return(_abi.ToData());
        }
Esempio n. 2
0
        public static string BurnBatch(uint _transactionNonce, uint _chainId, Address _addrFrom, string _contractAddress, Array _nftIds, Array _amounts)
        {
            if (_nftIds.Length != _amounts.Length)
            {
                throw new ArgumentException("NFT ids length not equal amounts length");
            }
            ContractABI _abi = new ContractABI(Ethereum.EIP1155_METHOD_BURNBATCH);

            _abi.Add(_addrFrom);
            _abi.Add(_nftIds);
            _abi.Add(_amounts);
            return(BuildSendDataTransaction(_transactionNonce, _chainId, _addrFrom.Private, _contractAddress, _abi.ToData()));
        }
Esempio n. 3
0
        public static string SafeBatchTransferFrom(uint _transactionNonce, uint _chainId, Address _addrFrom, Address _addrTo, string _contractAddress, Array _ids, Array _amounts, string _hexData)
        {
            ContractABI _abi = new ContractABI(Ethereum.EIP1155_METHOD_SAFEBATCHTRANSFERFROM);

            _abi.Add(_addrFrom);
            _abi.Add(_addrTo);
            _abi.Add(_ids);
            _abi.Add(_amounts);
            _abi.Add(new Number(_hexData));
            return(BuildSendDataTransaction(_transactionNonce, _chainId, _addrFrom.Private, _contractAddress, _abi.ToData()));
        }
Esempio n. 4
0
        public static string Burn(uint _transactionNonce, uint _chainId, Address _addrFrom, string _contractAddress, uint _nftId, uint _amount)
        {
            ContractABI _abi = new ContractABI(Ethereum.EIP1155_METHOD_BURN);

            _abi.Add(_addrFrom);
            _abi.Add(_nftId);
            _abi.Add(_amount);
            return(BuildSendDataTransaction(_transactionNonce, _chainId, _addrFrom.Private, _contractAddress, _abi.ToData()));
        }