Advertisement
Guest User

Untitled

a guest
Sep 19th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 KB | None | 0 0
  1.         public static async Task GetData()
  2.         {
  3.  
  4.             var web3 = new Web3("https://mainnet.infura.io");
  5.             var contract = web3.Eth.GetContract(ABI, AxieCoreContractAddress);
  6.             var auctionSuccesfulEvent = contract.GetEvent("AuctionSuccessful");
  7.  
  8.             try
  9.             {
  10.                 //error : Error occurred when trying to send rpc requests(s)
  11.                 var filterAll = await auctionSuccesfulEvent.CreateFilterAsync(); //error here
  12.                 var log = await auctionSuccesfulEvent.GetAllChanges<AuctionSuccessfulEvent>(filterAll);
  13.             }
  14.             catch (Nethereum.JsonRpc.Client.RpcClientUnknownException ex)
  15.             {
  16.                 Console.WriteLine(ex.Message);
  17.             }
  18.  
  19.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement