//Mine the transaction of deployment and Get a receipt for that transaction public static async Task <TransactionReceipt> WaitMiner(string transactionHash) { TransactionReceipt receipt = null; // If receipt is null it means the Contract creation transaction is not minded yet. while (receipt == null) { receipt = await mWeb3.Eth.Transactions.GetTransactionReceipt.SendRequestAsync(transactionHash); SanitaLog.Log("Minner", "It will take some seconds for the transaction to be approved by the network minders."); Thread.Sleep(4000); } SanitaLog.LogObject("Contract", receipt); SanitaLog.Log("Contract address", receipt.ContractAddress); //string contractAddress = receipt.ContractAddress; //var EthGetTransactionReceipt = Web3Api.mWeb3.Eth.Transactions.GetTransactionReceipt; //var EthCall = Web3Api.mWeb3.Eth.Transactions.Call; //var EthEstimateGas = Web3Api.mWeb3.Eth.Transactions.EstimateGas; //var EthGetTransactionByBlockHashAndIndex = Web3Api.mWeb3.Eth.Transactions.GetTransactionByBlockHashAndIndex; //var NetPeerCount = Web3Api.mWeb3.Net.PeerCount; //var EthGetBalance = Web3Api.mWeb3.Eth.GetBalance; //var EthMining = Web3Api.mWeb3.Eth.Mining.IsMining; //var EthAccounts = Web3Api.mWeb3.Eth.Accounts; return(receipt); }
// Retrieve the total number of transactions of your sender address public static Nethereum.Contracts.Contract GetContract(string abi, string contractAddress) { Nethereum.Contracts.Contract contract = mWeb3.Eth.GetContract(abi, contractAddress); SanitaLog.Log("abi", abi); SanitaLog.Log("contract address", contractAddress); SanitaLog.LogObject("contract", contract); return(contract); }