Exemple #1
0
        public async Task <string> UpdateMaxGaxPrice(BigInteger gasPrice)
        {
            var txid = await Web3Utils.SendTransaction(AppConfig.Services.Ethereum.EtheramaCoreAddress,
                                                       AppConfig.Services.Ethereum.EtheramaCoreAbi, AppConfig.Services.Ethereum.SetMaxGasPriceFunctionName,
                                                       AppConfig.Services.Ethereum.ManagerPrivateKey, 100000, gasPrice, 0, gasPrice);

            return(txid);
        }
Exemple #2
0
        // ---

        protected EthereumBaseClient(AppConfig appConfig, LogFactory logFactory)
        {
            Logger    = logFactory.GetLoggerFor(this);
            AppConfig = appConfig;

            EthProvider = new Nethereum.JsonRpc.Client.RpcClient(new Uri(appConfig.Services.Ethereum.Provider));
            //EthLogsProvider = new Nethereum.JsonRpc.Client.RpcClient(new Uri(appConfig.Services.Ethereum.LogsProvider));

            Web3Utils = new Web3Utils(EthProvider);
        }
 private async Task <BigInteger> GetViewFuntionResult(string contactAddress, string functionName)
 {
     return(await Web3Utils.GetViewFunctionResult <BigInteger>(contactAddress, AppConfig.Services.Ethereum.EtheramaContractAbi, functionName));
 }