Questions tagged [nethereum]
Questions related to the C# .NET Ethereum Web3 RPC Client Library, named nethereum
120
questions
0
votes
1
answer
28
views
Nethereum - get Contract Source Code
How can I get a contract source code and contract ABI code using Nethereum? For example like here: https://api.bscscan.com/api?module=contract&action=getsourcecode&address=...
0
votes
0
answers
53
views
How to Decode ABI Encoded string with Nethereum (porting code from typescript to c#)
For some reason I port a specific functionality of bitcore-node (https://github.com/bitpay/bitcore/tree/master/packages/bitcore-node) to C#
However I am stuck with a problem now and need some advice.
...
0
votes
0
answers
52
views
Swap Pancakeswap using Nethereum
i dont find any examples or snippets for Nethereum. How can i swap Tokens via Pancakeswap on Nethereum?
Thanks for help
0
votes
0
answers
65
views
Problem returning tokenURI(string) from contract
I'm trying to return information from a contract, most specifically the tokenURI. My problem is that I cannot visualize the result... it seems to be empty when it was supposed to be a string. I must ...
0
votes
0
answers
34
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
0
answers
106
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 ...
1
vote
0
answers
132
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 ...
0
votes
0
answers
252
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
0
answers
38
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
0
answers
67
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 ...
1
vote
1
answer
338
views
Why would Pending transactions disappear?
I've been working on integrating with the Polygon blockchain programmatically (using Nethereum) but my contract interactions and send transactions all appear to be pending, then when I search for them ...
1
vote
0
answers
59
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 {
...
0
votes
1
answer
343
views
ERC721 - mass ownerOf request(or another way get all TokenIDs on address)
I use nethereum for get ownerOf NFT ids
[Function("ownerOf", "address")]
public class OwnerOfFunction : FunctionMessage
{
[Parameter("uint256", "_tokenId", ...
0
votes
1
answer
631
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
1
answer
239
views
Is using private key of an account is legal or a good idea in your code?
I was using Nethereum for one of my application, there I found I have to sign transaction before calling a smart contract method, which was OK. I was using infura api.
When I was calling ...
1
vote
0
answers
967
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 ...
1
vote
0
answers
371
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, ...
0
votes
0
answers
182
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 ...
1
vote
1
answer
602
views
What unit are the Uniswap/PancakeSwap router functions expecting?
I'm looking at this transaction in BSCScan: https://bscscan.com/tx/0x09a19072b2374340de10dc6ac235fcd0ba229ff1eba41e155f5b0a60f9c2e2cd
When looking at Input Data for the method call, the caller ...
1
vote
2
answers
752
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. Nethereum Playground C#
This looks like it assumes that you have to know which function data you're ...
0
votes
2
answers
476
views
How to interact with Smart Contract via Web3/Nethereum without known ABI
Let's say I'm using Web3 or Nethereum, both of which apparently require the contract's ABI to bind the functions.
Is there no way to call smart contract functions without knowing the complete ABI? ...
1
vote
0
answers
473
views
Getting 403 Access Denied after several hours of execution [closed]
I have an application that executes fine for several hours but after a while I start seeing 403 exceptions from the RPC client, usually on internal TranasactionManager calls like "Estimate Gas&...
0
votes
0
answers
120
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 ...
1
vote
1
answer
162
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
2
answers
2k
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
0
answers
69
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 ...
2
votes
1
answer
436
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?
1
vote
1
answer
1k
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 ...
2
votes
2
answers
481
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
1
answer
221
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
1
answer
332
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
0
answers
241
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
0
answers
290
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
1
answer
413
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
3
answers
2k
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 ...
1
vote
1
answer
701
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
1
answer
1k
views
Verifying if a user actually owns the address [duplicate]
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
0
answers
27
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
1
answer
804
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
1
answer
2k
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
0
answers
66
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
1
answer
373
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 ...
3
votes
1
answer
1k
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?
3
votes
1
answer
3k
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
0
answers
220
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
1
answer
416
views
Blockchain information from Nethereum
How can I get the latest block, coinbase and other information using Nethereum?
2
votes
1
answer
468
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
1
answer
354
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
1
answer
114
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
1
answer
1k
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 ...