Questions tagged [nethereum]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
11 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
1answer
11 views

Nethereum contract.getPastEvents equivalent

I want to query all transfers regarding a contract with Nethereum. This means, in the end I want to have all transactions, so that I can print a statement of account. I suppose with the web3.js ...
0
votes
2answers
107 views

Transfer ether from one account to another using smart contract

I`m trying to transfer ether from account A to a smart contract and from the smart contract to account B. I wrote some code that approximately works on Remix IDE, but I completely got lost with the ...
0
votes
0answers
5 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
42 views

using account create in metamask with Nethereum

i have a doubt can i use an account created in metamask using nethereum? i tried this. var abi = @""; var addressContract = ""; var myAddress = "xxxxx"; var password = "password"; var managedAccount =...
0
votes
1answer
43 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
11 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 ...
1
vote
0answers
9 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 ?...
0
votes
1answer
80 views

i'm creating new account and when i get the balance for that account it returns 0 and cant do any transaction saying dont have enough funds

How to load funds/ether into newly created account. I'm using Ganache and Web3js var web3 = new Web3("HTTP://localhost:7545"); var privateAccount = await web3.Personal....
3
votes
1answer
382 views

How to pay gas fee for new addresses of ERC20 tokens that initially have 0 Eth balance? [duplicate]

I have a confusion, When we create new address/account for an ERC20 token then it have 0 Eth balance. When we send some tokens to this address and then withdraw token again from this address require a ...
0
votes
0answers
19 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
33 views

eth-netstats statistics is not correct

I'm trying to set up private POA ethereum chain's status monitor system, and all softwares run on virtualbox. For test, two mining nodes were set up using geth(its version is "geth-alltools-linux-...
2
votes
1answer
89 views

NEthereum, Number of indexes don't match the number of topics

I would like to get all Transfer events for a specific interval of blocks. When I call GetAllChanges with the following parameters, I get this error message: 'Number of indexes don't match the ...
2
votes
1answer
169 views

Nethereum get Last Block Number

I would like to get something similar to solidity block.number - 1 using Nethereum BlockParameter.CreateLatest() Is latest here mean the Last BlockNumber been mined? Or do I need to minus 1?
1
vote
1answer
317 views

How to call a contract function using Nethereum?

I would like to call a contract function using Nethereum C#. Here is the contract in Etherscan (https://etherscan.io/token/0x8c9b261faef3b3c2e64ab5e58e04615f8c788099#readContract) I want to call ...
1
vote
0answers
102 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
1answer
112 views

Blockchain information from Nethereum

How can I get the latest block, coinbase and other information using Nethereum?
2
votes
1answer
145 views

How do I use SoliditySha3 in Nethereum?

According to this, web3 should contain the function soliditySha3. It can take an object (JSON), serialize it, and use the result as input to Keccak256. According to the documentation, the arguments ...
0
votes
1answer
118 views

Not able to connect to Quorum node from Nethereum

I am not able to connect to Quorumchain using Nethereum. Below is my code and error response. I have verified and the port is open in the machine. I am running on a Linux machine, Ubuntu 18.04. I ...
1
vote
1answer
75 views

Getting an error while trying to store large payloads (13-20kB)

I've created a simple smart contract to store large amounts of data (13-20kB) on the Ethereum blockchain. But when I'm trying to make a transaction they fail sometimes (with little correlation to the ...
1
vote
1answer
363 views

Create account on Ethereum using Nethereum C#

I have studied the documents for creating a new account using Nethereum.. var ecKey = Nethereum.Signer.EthECKey.GenerateKey(); var privateKey = ecKey.GetPrivateKeyAsBytes().ToHex(); var account = new ...
3
votes
0answers
186 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 ...
2
votes
0answers
47 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
98 views

create multiple transactions between two accounts using SendTransactionAsync method nethereum

I am trying to create multiple transactions between two accounts using SendTransactionAsync method. But I am getting "replacement transaction underpriced" message. I found some links which says we ...
0
votes
2answers
135 views

Encoding Parameters In Nethereum

I'm trying to encode some parameters and I've noticed all the encoders in the ABI project. Essentially, I want the equivalent to abi.encodeParameter(type, value) in Nethereum? Is there an easy ...
0
votes
1answer
13 views

unable to connect to TestChain by Code

I am new at Ethereum and intended to connect to a test chain by c#. my code runs greatly on my old laptop win7, but on newer one Win10 it just waits forever. this is my code. has anyone any idea? ...
0
votes
2answers
99 views

Nethereum - loop of user to slow

I build a smart contract on solidty and website with Nethereum. One of variable include the current status of all the users like this : mapping(address => Status) public StatusUsers; I did a loop(...
1
vote
2answers
623 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 ...
3
votes
1answer
294 views

Can I get the raw transaction using Nethereum?

How do I get a raw transaction using web3/Nethereum? An example of a raw transaction can be seen here: https://etherscan.io/getRawTx?tx=...
0
votes
2answers
93 views

Indexed Variables On Event Not Being Decoded

I'm currently returning back all events with no filter and all the indexed variables are being returned but they are encoded. The other none indexed variables are visible and being retrieved fine and ...
1
vote
0answers
221 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[] ...
0
votes
1answer
112 views

Command “geth --rpcapi eth,web3,personal --rpc” throws Fatal Error

After deploying an private Ethereum blockchain with Azure Template "Proof of Work" we are not able to run the following command successfully. "geth --rpcapi eth,web3,personal --rpc" following image ...
1
vote
0answers
181 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
378 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....
1
vote
1answer
146 views

NewEventDTO is not a valid Event Type

The solidity code pragma solidity ^0.4.24; event NewEvent(uint32 tag, uint32 idx); My Nethereum code public class NewEventDTO { [Parameter("uint32", "tag", 1, false)] public uint Tag { get; ...
4
votes
2answers
360 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 ...
0
votes
0answers
77 views

Listing all the smart contracts deployed on ethereum [duplicate]

I want to list all smart contracts deployed on a private Ethereum chain, using Nethereum, and also those which were deployed by a certain address. I have seen here and here but I cannot get anywhere ...
0
votes
1answer
117 views

Am I setting my gas price and gas limit correctly?

web3.TransactionManager.DefaultGas = 210000; // Gas limit? web3.TransactionManager.DefaultGasPrice = 10 * 1000000000; // Gas Price? I have intended to set the gas price at 10Gwei.
1
vote
0answers
95 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
646 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
788 views

Nethereum // Infura/RPCclients

I am having a heck of a time getting transactions to post on mainnet. The issue is not my wallet balance or gas related. A balance lookup on the same contract works correctly.. However, i cannot get ...
0
votes
1answer
164 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
191 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....
2
votes
1answer
128 views

Deploy contract with truffle, how to call in Nethereum?

I am currently deploying my ChangeManager contract in truffle and I want to call the contract later in Nethereum. For this I need the contract address in Nethereum. I figured I could just create an ...
1
vote
0answers
123 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
482 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. ...
0
votes
0answers
58 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
0answers
31 views

Making RPC calls without setting up my own node [duplicate]

My application is using web3 or Nethereum to connect to my own ethereum node (setup using geth). Is it a must for me to setup my own node to make RPC calls (or connect to a specific node that setup ...
0
votes
1answer
247 views

Account vs ManagedAccount in Nethereum

Account to this text, they are different: https://nethereum.readthedocs.io/en/latest/accounts/ But it never mentioned what are the differences. Anyone know which one to choose from when implementing ...
0
votes
1answer
449 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 ...