I am using web3dart on Mumbai polygon. I constructed a Web3Client client with a https://polygon-mumbai.infura.io/v3/ URL. The API key is not filled in, but it's there.
First I get the estimated gas, and it's working fine.
BigInt estimateGas = await client.estimateGas(
to: to,
sender: EthereumAddress.fromHex(address),
value: EtherAmount.fromUnitAndValue(
EtherUnit.ether, BigInt.from(amount)),
);
and then I try to send some MATIC to the some address. The RPCError returns the message: "invalid sender".
try {
await client.sendTransaction(
credentials,
Transaction(
to: to,
from: credentials.address,
value: EtherAmount.fromUnitAndValue(
EtherUnit.ether, BigInt.from(amount)),
),
);
} on RPCError catch (e) {
final message = e.message;
}
I am using web3dart on Mumbai polygon. I constructed a Web3Client client with a
https://polygon-mumbai.infura.io/v3/
URL. The API key is not filled in, but it's there.First I get the estimated gas, and it's working fine.
and then I try to send some MATIC to the some address. The RPCError returns the message: "invalid sender".