Ethereum eth_sendRawTransaction не получает успеха после подписания транзакций из walletcore
Я пытаюсь подписать простую транзакцию в тестовой сети Ropsten, используя библиотеку флаттера Trustwallet WalletCore, а затем транслировать необработанные данные транзакций в сеть тестовой сети ropsten ethereum с помощью web3dart. Здесь после вызова
eth_sendRawTransaction
получение нескольких ошибок, как
"got code -32000 with msg exceeds block gas limit"
,
got code -32000 with msg "insufficient funds for gas * price + value"
Вот мой код:
final signingInput = Ethereum.SigningInput(
chainId: Uint8List.fromList([0x03]),
nonce: Uint8List.fromList([0x82]),
gasLimit: Uint8List.fromList("21000".codeUnits),
gasPrice: "${etherAmount.getInWei}".codeUnits,
transaction: Ethereum.Transaction(
transfer: Ethereum.Transaction_Transfer(
amount: utf8.encode("1000000000"),
),
),
toAddress: "0xEF5b5b802144a9.......eB62aDc973B5B",
privateKey: secretPrivateKeyEth.data(),
);
final sign = AnySigner.sign(signingInput.writeToBuffer(), coin);
final signingOutput = Ethereum.SigningOutput.fromBuffer(sign);
print(hex.encode(signingOutput.encoded));
var httpClient = http.Client();
var web3 = await Web3Client(
"https://ropsten.infura.io/v3/06a5e776d.......b82d7c51d",
httpClient);
var result = await web3
.sendRawTransaction(Uint8List.fromList(signingOutput.encoded));
print("SendRawTransaction Result : ${result.toString()}");