You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
bnb expert:
it's question in android simulate from demo (https://github.com/trustwallet/wallet-core/tree/master/samples/android) ,invoke
AnySigner.sign(signerInput, CoinType.ETHEREUM, SigningOutput.parser()) method but return nothing ,right or wrong no response
code:
Ethereum.Transaction.Builder transaction = Transaction.newBuilder();
Ethereum.Transaction.Transfer.Builder transfer = Ethereum.Transaction.Transfer.newBuilder();
String signData = "0xa9059cbb0000000000000000000000000c5dBa0A59776c3C31c31ac1C19AaFAeb800d1E80000000000000000000000000000000000000000000000000de0b6b3a7640000";
transfer.setData(ByteString.copyFrom(signData.getBytes()));
transaction.setTransfer(transfer);
SigningInput signerInput = SigningInput.newBuilder()
.setChainId(ByteString.copyFrom(new BigInteger("01").toByteArray()))
.setPrivateKey(ByteString.copyFrom(privateKey.getBytes()))
.setGasPrice(ByteString.copyFrom(new BigInteger("d693a400",16).toByteArray())) //$0.gasPrice = Data(hexString: "d693a400")! // decimal 3600000000
.setGasLimit(ByteString.copyFrom(new BigInteger("5208",16).toByteArray()))
.setNonce(ByteString.copyFrom(new BigInteger("1").toByteArray()))
.setToAddress(contract address)
.setTransaction(transaction)
.build();
SigningOutput signingOutput = AnySigner.sign(signerInput, CoinType.ETHEREUM, SigningOutput.parser());
Beta Was this translation helpful? Give feedback.
All reactions