You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
usingNethereum.Web3;usingNethereum.ABI.FunctionEncoding.Attributes;usingNethereum.Contracts.CQS;usingNethereum.Util;usingNethereum.Web3.Accounts;usingNethereum.Hex.HexConvertors.Extensions;usingNethereum.Contracts;usingNethereum.Contracts.Extensions;usingSystem;usingSystem.Numerics;usingSystem.Threading;usingSystem.Threading.Tasks;publicclassFunctionMessageSigning{[Function("transfer","bool")]publicclassTransferFunction:FunctionMessage{[Parameter("address","_to",1)]publicstringTo{get;set;}[Parameter("uint256","_value",2)]publicBigIntegerTokenAmount{get;set;}}///*** THE MAIN PROGRAM ***publicstaticasyncTaskMain(){varurl="http://testchain.nethereum.com:8545";varweb3=newWeb3(url);// ### Signing a Function / Deployment message online / offlinevarcontractAddress="0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe";varreceiverAddress="0x1245695669a9FD93d5F28D9Ec85E40f4cb697BAe";vartransferHandler=web3.Eth.GetContractTransactionHandler<TransferFunction>();vartransfer=newTransferFunction(){To=receiverAddress,TokenAmount=100};// all other values//transfer.Nonce//transfer.GasPrice etc//to make it fully offline//estimate gasvartransactionInput=awaittransferHandler.CreateTransactionInputEstimatingGasAsync(contractAddress,transfer);//save to file, whatever.// other computer offline / online.varprivateKey="0x7580e7fb49df1c861f0050fae31c2224c6aba908e116b8da44ee8cd927b990b0";varaccount=newAccount(privateKey);varweb32=newWeb3(account,url);//if nonce is not provided / gas price etc will go to the chain to complete theseweb32.TransactionManager.SendTransactionAsync(transactionInput);}}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: