Questions tagged [nethereum]

Questions related to the C# .NET Ethereum Web3 RPC Client Library, named nethereum

46 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
1answer
678 views

Submitted transaction not propagated to all nodes

I have a private ethereum blockchain network running set up in 3 nodes using geth. If i submit a transaction(smart contract function call) to one node and go to another node and type in eth....
4
votes
0answers
370 views

How to access txpool pending transactions using Netherum?

I want to get list of transactions which are in pending state & queued state in txpool. I can see these transactions in pool using txpool.inspect command. I tried code given in nethereum sample ...
4
votes
2answers
791 views

Capturing an event fired from a contract that was called from another contract

I'm trying calculate tax on arbitrary items/values. To do this I have a single contract is used as an 'Oracle' to get the tax from an external system. This contract defines functions to be called from ...
4
votes
1answer
1k views

Events not being detected in Nethereum

I have a function in one contract that looks like this: //Events event RequestReceived(bytes s); event WorldCreated(bytes32 indexed worldName, address indexed sender, address result ); ...
3
votes
0answers
521 views

Remote Web3 connection to Parity node running on AWS

I have an Amazon EC2 instance set up running a Parity node. I'm trying to communicate with it via Web3 (using Nethereum.Web3 in C#). If I connect locally with http://127.0.0.1:8545, everything works ...
2
votes
0answers
194 views

Getting return data from a transaction hash using Nethereum

I'm using Nethereum to call a non-view/non-constant function of a smart contract that modifies the state of the smart contract and returns a boolean value. The result of submitting this transaction ...
2
votes
0answers
96 views

Transactions are not mining for accounts created by Nethereum.Accounts.Account method but works for accounts created by web3.Personal.NewAccount

Transactions are not mining & in pending state for long time, for transactions with accounts created using Nethereum.Accounts.Account(privateKey). But mining works for accounts created using web3....
2
votes
0answers
350 views

Nethereum Getting TransactionHash of SendTransaction

I am using Nethereum for Unity3d and I have managed to muddle my way through a lot of issues, but I have a huge problem I just can't seem to solve. I can get this to work with signed transaction ...
2
votes
1answer
1k views

How can I decode the inputs to a transaction written by a smart contract constructor with Nethereum?

I've been able to decode the inputs to a contract function transaction given the ABI as follows: var myFunction = contract.GetFunction("MyFunction"); var myFunctionTxn = await contract.Eth....
2
votes
1answer
1k views

Create new address in Ethereum using Nethereum

I try to create new account. var web3 = new Nethereum.Geth.Web3Geth(); var ecKey = Nethereum.Signer.EthECKey.GenerateKey(); var privateKey = ecKey.GetPrivateKeyAsBytes().ToHex(); var account = new ...
2
votes
1answer
433 views

How to get 'defaultAccount' by Nethereum?

I'm using Chrome with Metamask extension. When I change the account, eth.coinbase value is always set to current one, so I can do the assign in JS code: web3.eth.defaultAccount = web3.eth.coinbase; ...
1
vote
0answers
32 views

How to listen to smart contract emitted events using C#

I have to add/update some data in a database when specific events are emitted by a solidity smart contract. When using web3.js there is a simple method called watch(), but I didn't find anything like ...
1
vote
0answers
44 views

Result of getting information from ethereum is null

I am writing a simple smart contract using Nethereum using this solidity code: pragma solidity >=0.4.0 <0.7.0; contract SimpleStorage { uint storedData; function set(uint x) public { ...
1
vote
0answers
326 views

How to get the liquidity of a pair in pancakeswap or uniswap?

How can I know in pancakeswap or uniswap when a pair is created and how much liquidity is added? At the moment what I have thought is to read the "PairCreated" logs of the Factory contract, ...
1
vote
2answers
425 views

Decoding Transaction input data in Nethereum

I'm using Nethereum and see this example of how to decode the Input data of a Transaction object. http://playground.nethereum.com/csharp/id/1063 This looks like it assumes that you have to know which ...
1
vote
0answers
54 views

What argument does contract.GetFunctionSignature expects?

I'm trying to get function by signature from contract using Nethereum.Contracts.Contract.GetFunctionBySignature. This function seems to expect the signature of function, however how can I generate the ...
1
vote
0answers
26 views

When use Nethereum C# Library there are many CLOSE_WAITs in TCP Stack at node side

When I use Nethereum methods (GetBlockWithTransactionsByNumber,GetBlockWithTransactionsByNumber and etc ) in loop, In TCP stack at node side accumulates a lots of CLOSE_WAIT. How can I fix this issue ?...
1
vote
0answers
596 views

passing byte[] to smart contract using nethereum

I made a solidity function that allow a user to send multiple transactions with the same nonce as a singleton Tx signer: function multipleTransferPreSigned ( bytes[] _signature, address[] ...
1
vote
0answers
137 views

How would I connect subscribe to the websocket to get transactions of a certain address with Nethereum(C#)?

I can only find tutorials on how to do it with Web3.JS. With Infura btw (wss://mainnet.infura.io:443/ws)
1
vote
0answers
1k views

Nethereum C# automated ether transfer

I wish to automate the transfer of ether to a list of people. Assume the list is in a csv. I wrote some code to automate the process. class Program { int nonce = 0; static void Main(string[] ...
1
vote
0answers
380 views

Why I can't get any status from Nethereum TransactionReceipt?

Sample code below (simplified for illustrative purposes only): var a = new ManagedAccount(mOwner, mOwnerPwd); var w = new Web3(a, mNodeUrl); w.TransactionManager.DefaultGas = mGasLimit; w....
1
vote
0answers
153 views

How can I import the Accounts from ganache-cli into Nethereum?

Is there a way to automatically load the Accounts created by ganache-li into a project which uses Nethereum?
1
vote
1answer
1k views

Error occurred when trying to send rpc requests(s)

I am using the nethereum package in .Net and trying to invoke a smart contract with web3. Initially it was working fine, but suddenly I am getting an error while trying to get the transaction count. ...
1
vote
0answers
172 views

Nethereum: Miner start takes time

I have set up a private ethereum block chain and I have created a .net application that uses nethereum to interface with the geth node. After submitting a transaction I try to start the miner by using ...
0
votes
0answers
12 views

Question: ERC721 (NFT) contract per individual item/content or per platform

Executive Summary I am developing a cool little project to-do with NFT's, its a platform that allows users to make NFT's (I know, not original) and do other things, like buy them etc. I have had a ...
0
votes
0answers
23 views

Connect to Flashbot's JsonRPC Nethereum

I'm trying to connect to Flashbot's JsonRPC using c# and I can only manage to do that on TypeScript: const CHAIN_ID = 5; const provider = new providers.InfuraProvider(CHAIN_ID) const ...
0
votes
0answers
83 views

How to call a contract's function in Nethereum?

I'm trying to call a contract's function but get an error "Function not found". I've made a test contract from this topic https://docs.nethereum.com/en/latest/contracts/calling-transactions-...
0
votes
0answers
28 views

Contract function with transaction (VB.NET/C# and Nethereum)

I have a question about programming VB.NET & Nethereum. The contract address works flawlessly. For testing purposes I have built in a maintrace - pause function that can be set via function. In ...
0
votes
0answers
44 views

SwapExactETHForTokensRequestAsync error: transaction type not supported

I am trying to swap 0.02 WBNB with BUSD. SwapExactETHForTokensRequestAsync request always gives me an error on "eth_sendRawTransaction" request: transaction type not supported I can't find ...
0
votes
1answer
419 views

Get balanceOf tokens ERC721 (nethereum)

Just trying get count of uniswap NFT-s on 0x5794d36de0c21211a7906688981371132bd7c6f0 wallet Step one: Get contract from adress 0xc36442b4a4522e871399cd717abdd847ab11fe88 (Contract address for uniswap ...
0
votes
0answers
586 views

Nethereum and Metamask via Asp.Net?

I'm using Nethereum on the server currently, manually creating Account objects using private keys copied/pasted from a MetaMask wallet. I'm now trying to build access to this functionality through ...
0
votes
0answers
140 views

How to convert BigInteger to a decimal in Nethereum / Web3

I need to read and write some Uniswap Transactions using Nethereum/Web3. The uniswap methds expect BigInteger data types, but the UI expects so called Display unit types, which essentially convert ...
0
votes
0answers
286 views

How to call mint function using Nethereum

I am getting the error calling the mint function on a contract. Error: Nethereum.JsonRpc.Client.RpcResponseException: execution reverted I used ERC721PresetMinterPauserAutoId from OpenZeppelin for ...
0
votes
0answers
65 views

How to perform a SWAP from ETH to WBTC with Netherium?

Sorry for asking nubie question. I have a requirement to transfer eth from my account to ETH & WBTC of another account. Is this possible with netherium ? I have transfered eth from my account to ...
0
votes
0answers
110 views

Why ETH Transfer from Nethereum taking longer time then transfering from metamask wallet?

I am sorry for nubby question. Today i made a ETH transfer of 0.00001 ETH 2 times. One programmatically with Netherium SDK and another directly through metamask wallet to another metamask wallet. Here ...
0
votes
0answers
137 views

erc20 transfer amount exceeds allowance during transaction into nethereum

Getting error "erc20 transfer amount exceeds allowance" during transfer eth in nethereum. any solution please......... MY SOURCE CODE: public async Task<string> TransferAsync(string ...
0
votes
0answers
22 views

During eth transfer in nethreum

Getting error: erc20 transfer amount exceeds allowance. My source code is:: public async Task<string> TransferAsync(string from, string to, decimal amount) { DefaultAccount = new Account(...
0
votes
1answer
251 views

How to get the Error Message from revert and require on a solidity contract with Nethereum

Is there a way on Nethereum to get the string messages returned from arevert or require are executed on solidity contract?
0
votes
1answer
256 views

Nethereum C# FilterInput.GetAllChanges always empty

I use Nethereum in my project to get all pending transactions on a specific smartcontract address. To do that based on the existing docs and Nethereum playground I try the following: private async ...
0
votes
0answers
186 views

How to log an event which emits state of the contract in nethereum?

I am logging a specific event from a specific contract using nethereum. However, my event emits contract state (enum in solidity). My log processor shows 0 events instead of 2. Solidity code snippet:...
0
votes
0answers
265 views

Getting HTTP/1.1 403 Forbidden when i want to get account balance

Some months ago, I was able to get the balance of my account using this code (I run the code in Unity 2018 and get the code from tutorial in github. I modified some parts of the code). This is the ...
0
votes
1answer
802 views

Verifying if a user actually owns the address

Web3js frontend with Vue, .NET Core with Nethereum at the back. The key target for this functionality is to sign a message at the frontend, send the signature and the address to the backend to ...
0
votes
0answers
62 views

How include Nethereum in an existing C# project as library

I try to include nethereum as a library in my C# project, so I have access to the appropriate functions (create transaction data, sign transaction data and so on...) for communicate to an arbitrary ...
0
votes
0answers
87 views

SmartContract determine timestamp of saving data

I have really simple solidity smartcontract for saving and fetching data structs. When I ask for data struct (fetching function) I need to know timestamp (or block ID) when was the struct saved. How ...
0
votes
1answer
119 views

Ethereum keystrore file is not created

Keystore file is not created when I am creating a new Ethereum wallet account using nethereum and UWP. Also the newly created account is not in the private net. The new account is created using the ...
0
votes
1answer
424 views

Nethereum: CallAsync return a wrong msg.sender

I write this simple contract: contract greeter { event LogSender(address sender); function getSender() constant returns (address) { LogSender(msg.sender); return msg.sender; }...