Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required property 'message' not found in JSON #1014

Open
mg1612 opened this issue Mar 9, 2024 · 0 comments
Open

Required property 'message' not found in JSON #1014

mg1612 opened this issue Mar 9, 2024 · 0 comments

Comments

@mg1612
Copy link

mg1612 commented Mar 9, 2024

Hi,
i am receiving the folllowing error to trying to apply filter on event log

Nethereum.JsonRpc.Client.RpcClientUnknownException: 'Error occurred when trying to send rpc requests(s): eth_getLogs'
with InnerException:
JsonSerializationException: Required property 'message' not found in JSON. Path 'error', line 1, position 84.

my source code :

            var account = new Account(privateKey);
            var web3 = new Web3(account, url);
            var contract = web3.Eth.GetContract(abi, contractAddress);

            var mEventHandler = web3.Eth.GetEvent<CarbonCreditMintedEventDTO>(contractAddress);
            var filterAllTransferEventsForContract = mEventHandler.CreateFilterInput();
            var allTransferEventsForContract = await mEventHandler.GetAllChangesAsync(filterAllTransferEventsForContract); //EXCEPTION THROWN HERE

I tried several options to fetch or filter logs and events with the same message error,
creating transactions, and querying the smart contract is working well, so no issue in the connection to the smart contract
I am using Nethereum.Web3 4.19.0
Newtonsoft.Json 13.0.3
in a .net core 6.0 web app
my my smart contract hosted on https://rpc-mumbai.maticvigil.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant