Questions tagged [nethereum]

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

36 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
1answer
490 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
2answers
418 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

how to call smart contract function in C#.net core

protected async void Page_Load(object sender, EventArgs e) { var senderAddress = "0x605a1f8d368cbdd4d0a5cbad74f75c428660f17b"; var password = "zxcasdqwe123"; ...
4
votes
1answer
817 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
198 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 ...
3
votes
0answers
488 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
54 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
1answer
463 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
251 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
10 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
114 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 ...
1
vote
2answers
707 views

C# how to compute Keccak256 to match Solidity?

I have a simple Solidity function as below: function testKeccak(uint8[] buffer) public pure returns (bytes32) { return keccak256(abi.encodePacked(buffer)); } Testing the keccak256 hash using ...
1
vote
0answers
269 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
196 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 ...
1
vote
0answers
98 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
698 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
1answer
209 views

Is this the only way that I can tell if a transaction is success / failed?

My solidity: function Test(address to, uint amount) public { require(amount == 1000000000000000000); } In Nethereum var r = contract.GetFunction("Test").SendTransactionAsync(<Owner Address&...
1
vote
0answers
215 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
129 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
550 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
159 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
1answer
13 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
22 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
22 views

Fastest way to convert private to public key in C# .net?

For vanity reasons I am trying to find a private key whose public key has the same 4 characters in both the start and ending position, such as: 0xABCD_____________ABCD . I am finding that my computer ...
0
votes
0answers
23 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
0answers
20 views

How to sign automatically generated bindings for smart contracts?

Good day to you. I'm using Nethereum.Generator.Console to automaticly generate bindings for ERC20 token smart contract. I'm trying to call approve method for other contract to charge tokens from me. ...
0
votes
0answers
22 views

How to call contract function in deployed conctract with Infura and nethereum

i'am trying to call smart contract function in test network "Ropsten" https://ropsten.etherscan.io/address/0xa89d48b51801b61b27f9dee744b888ae152c2115 (few failed transaction is just testing with empty ...
0
votes
0answers
6 views

Nethreum CreateFilterInput Block Number boundary issue

I obtained the latest block number by using: var Latest = web3.Eth.Blocks.GetBlockNumber.SendRequestAsync().Result; Assume Latest = 400000 I create a filter even from block number 390000 to (the ...
0
votes
1answer
75 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
21 views

Nethereum Contract Function SendTransaction (RPC Client Exception Nethereum)

I am having problems passing data and connecting to nethereum. var temp = APIFramework.ConectClass.RegistroDeProveedor(RFC, RazonSocial, Domicilio); I send this string data to the methods I have for ...
0
votes
0answers
22 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
64 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
510 views

Nethereum contract function call throwing exception on return: hex string has length 64, want 40 for common.Address

Both a call returning and address and a call returning an int256 fail with the same error: Nethereum.JsonRpc.Client.RpcResponseException HResult=0x80131500 Message=invalid argument 0: hex string ...
0
votes
1answer
108 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
263 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; }...