Questions tagged [nethereum]
Questions related to the C# .NET Ethereum Web3 RPC Client Library, named nethereum
104
questions
0
votes
0answers
18 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
9 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
10 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(...
1
vote
1answer
23 views
How to make API calls to AWS Managed Blockchain using Nethereum?
I am testing AWS Ethereum (Preview) using Nethereum and I see this method to get a block:
var block = await web3.Eth.Blocks.GetBlockNumber.SendRequestAsync();
However, the AWS Ehtereum documentation ...
0
votes
0answers
16 views
Nethereum error: The program has exited with code 0 (0x0)
I followed the steps mentioned in http://docs.nethereum.com/en/latest/Nethereum.Workbooks/docs/nethereum-gettingstarted-smartcontracts-untyped/#deploying-smart-contracts
Used the below sample code:
...
0
votes
0answers
11 views
Nethereum.JsonRpc.Client.RpcResponseException: 'data types must start with 0x'
I have this code to get whole transacctions
public Task<TransactionModel[]> GetTransactionsAsync(bool sent = false)
{
return Task.Run(async delegate
{
var transferEvent = standardTokenService....
0
votes
1answer
63 views
How to call a smart contract function using Nethereum and Infura
I am using Nethereum to call a smart contract function in Ropsten. I am also using Infura.
The function required the contract owner's permission to execute.
This is my code:
var account = new Account(...
1
vote
0answers
19 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 ...
0
votes
1answer
32 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
103 views
Get ERC20 balance of token holder as of block number with C# Nethereum and Infura
When this code runs, it throws an error "RpcResponseException: header not found", and I don't understand why or how to fix it. Any advice?
Notes: I am using Nethereum in C#.net and using ...
0
votes
1answer
45 views
EcRecover signed message does not match PublicAddress
I am trying to create a C# webservice back end API that handles the code logic found in Step #5 here:
https://www.toptal.com/ethereum/one-click-login-flows-a-metamask-tutorial
Their code looks like ...
0
votes
0answers
28 views
Transaction is not broadcasting
I'm using Nethereum (.NET MVC project) to register in blockchain, I never had any problems, I always recorded on networks: ETH Mainnet, Ropsten, Rinkeby, Kovan, Mordor and Kotti. However, using the ...
0
votes
1answer
49 views
Is it feasible to write a DApp that targets multiple blockchains
This question does not target Ethereum specifically, but I hope you can help me out! If my questions are too specific, I apologize in advance.
I'm trying to utilize Blockchain's immutable + provable ...
0
votes
1answer
66 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
57 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
131 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
145 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
67 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
676 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
1answer
207 views
using account create in metamask with Nethereum
Can I use an account created in metamask using nethereum? I tried this:
var abi = @"";
var addressContract = "";
var myAddress = "xxxxx";
var password = "password&...
0
votes
1answer
201 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 ...
1
vote
0answers
15 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
301 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
1k 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
35 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 ...
2
votes
1answer
159 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
378 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
840 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 ...
2
votes
0answers
139 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
214 views
Blockchain information from Nethereum
How can I get the latest block, coinbase and other information using Nethereum?
2
votes
1answer
221 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
223 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
97 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
679 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 ...
4
votes
0answers
244 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
69 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
148 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
222 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
21 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
162 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
3answers
967 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
623 views
Can I get the raw transaction using Nethereum?
How do I get a raw transaction for a transaction on the blockchain using web3/Nethereum?
An example of a raw transaction can be seen here:
https://etherscan.io/getRawTx?tx=...
0
votes
2answers
179 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
368 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
155 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
241 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
697 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
171 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
540 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
89 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
...