1

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 says:

Ethereum on Managed Blockchain (Preview) only supports the eth_sendRawTransaction method, which requires that you create and sign the transaction before sending it to the node.

I believe to sign the transaction with Nethereum, you do this:

var signer = new EthereumMessageSigner();
var encoded = signer.EncodeUTF8AndSign(msg1, new EthECKey(privateKey));
var txId = await web3.Eth.Transactions.SendRawTransaction.SendRequestAsync("0x" + encoded);

So my question is, how would I call the "GetBlockNumber" while signing the transaction?

0

Thanks to the team at Nethereum, they provided a solution for me. The link below is for making API calls to AWS Managed Blockchain, in case anyone else needs it.

All Ethereum JSON-RPC API calls to an Ethereum node on Managed Blockchain are authenticated using the Signature Version 4 signing process. This means that only authorized IAM principals in the AWS account that created the node can interact with it using the API. AWS credentials (an access key ID and secret access key) must be provided with the call.

https://github.com/Nethereum/Nethereum.AWS/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.