标签: nethereum

我的 C# Web API 中的 Nethereuem SendTransactionAsync 失败,且事务类型不受支持:eth_sendRawTransaction

我正在努力将 Nethereum 集成到我的 .NET 5 C# API 中,并且可以针对我选择的区块链 (BSC) 进行读取查询,但无法成功执行 SendTransactionAsync 或 SendRequestAsync。我一直遇到以下异常:
Nethereum.JsonRpc.Client.RpcResponseException: 'transaction type not supported: eth_sendRawTransaction'

以下是我尝试过的代码片段:

// Setup
var account = new Account(privateKey, chainId);
var rpcUrl = "https://data-seed-prebsc-2-s2.binance.org:8545/";
var client = new RpcClient(new Uri(rpcUrl));
var web3 = new Web3(account, client);

var mediaTokenAddress = "0x1E4d1BFDa5d55C2176E9E3e8367BAe720525a8e0";
var mtSvc = new MediaTokenService(web3, mediaTokenAddress);
var mintMsg = new MintNftFunction
{
    FromAddress = account.Address,
    Recipient = "REDACTED",
    MetadataHash = "TestMetaDataHash",
    MediaHash = "TestMediaHash",
    SeasonId = 1
};
Run Code Online (Sandbox Code Playgroud)
// Attempt #1: …
Run Code Online (Sandbox Code Playgroud)

c# blockchain .net-5 nethereum

5
推荐指数
2
解决办法
3976
查看次数

如何解析 Nethereum 中的签名交易?

我使用 进行了交易TransactionSigner.SignTransaction(...),并将其存储以供将来参考。我如何解析它以获得公钥/源钱包地址、目标地址、随机数和 Wei 金额?

我尝试在 GitHub 存储库中搜索Parse方法,但没有找到用于事务的方法。

c# ethereum nethereum

2
推荐指数
1
解决办法
1125
查看次数

标签 统计

c# ×2

nethereum ×2

.net-5 ×1

blockchain ×1

ethereum ×1