Questions tagged [nethereum]
59 questions
5
votes
2 answers
Nethereuem SendTransactionAsync from my C# Web API fails with transaction type not supported: eth_sendRawTransaction
I'm working on integrating Nethereum into my .NET 5 C# API and can do read queries against my chosen blockchain (BSC), but cannot get a SendTransactionAsync or SendRequestAsync to successfully execute. I'm consistently getting the following…

Crimson Salamander
- 151
- 1
- 7
3
votes
1 answer
Nethereum invalid sender: eth_sendRawTransaction on polygon chain
static async Task SendTx(Wallet wallet, string toAddress, double amountOfCoins)
{
var accountFrom = new Account(wallet.GetAccount(0).PrivateKey, 137);
var web3 = new…

Jtara
- 45
- 5
2
votes
2 answers
How to get notified when smart contract is deployed
I am trying to deploy smart contract in Ethereum network using Nethereum (c#) library.
var abi = "[ABI...]";
var bytecode = "0x00...";
var gas = await web3.Eth.DeployContract.EstimateGasAsync(abi, bytecode, publicKey, "Zuk04");
await…

user19291301
- 127
- 8
2
votes
3 answers
Nethereum - the method eth_feeHistory does not exist or is not available
I have a function that "write" on the blockchain (private network on a virtual machine), using Nethereum. I was forced to upgrade from version 3.8.0 to version 4.5.0
Before the update everything was working fine, but now, when i call the…

AmD
- 399
- 2
- 12
2
votes
1 answer
Why is this public address different for an ethereum signature?
I have a signature created using metamask and the personal_sign RPC method.
Now I want to verify this signature in my C# backend.
In order to do so I have found the Nethereum library.
I have written the below code trying to verify the signature (for…

Tim H
- 65
- 8
2
votes
2 answers
swapExactTokensForETHSupportingFeeOnTransferTokens has a path argument, I know I have to put the token's contract address first
I want to swap a token to BNB
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
I do not know what to put on calldata path, I've…

Surface
- 21
- 1
- 4
2
votes
0 answers
Unity compile error with Nethereum and Newton.Json
Hi I created a brand new project in unity3d and imported the Nethereum sdk. When I try adding any scripts I keep receiving a compile error -
The type 'JsonSerializerSettings' is defined in an assembly that is not referenced. You must add a…

730wavy
- 944
- 1
- 19
- 57
2
votes
0 answers
Nethereum deploy contract error: "One or more errors occurred. (invalid sender: eth_sendRawTransaction)"
I am running a private Ethereum blockchain server on my local machine. I set up the genesis file, created some nodes, and created a contract in Solidity. The aim to get a running blockchain with smart contracts on a private network. Since we develop…

KTMonadjem
- 21
- 1
2
votes
1 answer
Calling BSC contract function with Nethereum keeps producing the same (incorrect) result
I'm new to using Nethereum and I'm trying to call a function owner() in a BSC smart contract, which returns the owner's address. My code:
string url = String.Format("https://api.bscscan.com/api?module=contract&action=getabi&address={0}&apikey={1}",…

T. Baer
- 69
- 14
2
votes
1 answer
How do I use Nethereum to extract Chain Id from a raw transaction?
Here is the F# code I have so far -
let parseChainId rawTransaction =
let tx = TransactionFactory.CreateTransaction rawTransaction
let chainIdWithAddend = (IntTypeDecoder().DecodeBigInteger tx.Signature.V - BigInteger 35) / BigInteger 2
…

Bryan Edds
- 1,696
- 12
- 28
2
votes
1 answer
Subscribe to contract events using Nethereum
I need to get subscribe to Uniswap pair contract Sync event and get pair reserves. So here what I tried to do:
[Event("Sync")]
class PairSyncEventDTO : IEventDTO
{
[Parameter("uint112", "reserve0")]
public virtual BigInteger Reserve0 { get;…

shda
- 729
- 7
- 19
2
votes
1 answer
How to parse a signed transaction in Nethereum?
I made a transaction using TransactionSigner.SignTransaction(...), and stored it for future reference. How do I parse it back to get the public key/source wallet address, destination address, nonce, and the amount in Wei?
I tried searching the…

LOST
- 2,956
- 3
- 25
- 40
2
votes
1 answer
Cannot get readable integer from nethereum decoded input data
I'm having trouble with converting solidity's uint256 to readable c# object.
public Transaction DecodeInputData(Transaction tx)
{
EthApiContractService ethApi = new EthApiContractService(null);
var contract =…

whatTheCase
- 142
- 1
- 10
1
vote
1 answer
I'm having trouble connecting solidty to Unity
I have a contract that I can interact with through the JavaScript interface using Ganache. I want to integrate it into Unity and run it. For this, I used the Nethereum library. However, my contract and C# code cannot communicate, or there seems to…

MissReyyo
- 11
- 1
1
vote
1 answer
Use Smart contracts mint function in nethereum with parameters
I try to build a game in unity, in which you can earn a blockchain token by minting it.
The API of the mint function looks like this:
{
"constant": false,
"inputs": [{"internalType": "address","name": "account","type": "address"}, …

user3762507
- 35
- 8