wallet-core icon indicating copy to clipboard operation
wallet-core copied to clipboard

[Everscale] i can not broadcast success everscale transaction by walletCore.

Open weixuefeng opened this issue 1 year ago • 4 comments
trafficstars

my code:

  Future<String> signTransaction(String? toAddress, String privateKeyHex,
      BigInt amount, String? encodedContractData) async {
    var expire =
        (DateTime.now().microsecondsSinceEpoch / 1000000 + 300).toInt();
    var transfer = Everscale.Transfer(
        amount: $fixnum.Int64(amount.toInt()),
        expiredAt: expire,
        to: toAddress,
        behavior: Everscale.MessageBehavior.SimpleTransfer,
        bounce: false,
        encodedContractData: encodedContractData);
    var signingInput = Everscale.SigningInput(
        transfer: transfer, privateKey: privateKeyHex.toUint8List());
    var signed = AnySigner.sign(
        signingInput.writeToBuffer(), TWCoinType.TWCoinTypeEverscale);
    Everscale.SigningOutput output = Everscale.SigningOutput.fromBuffer(signed);
    return output.encoded;
  }

when i broadcast raw transaction by eversdk, i got error:

message: 'Transaction wait timeout.\n' +
    'Possible reason: Contract execution was terminated with error: Contract did not accept message, exit code: 35.\n' +
    'Tip: For more information about exit code check the contract source code or ask the contract developer',

weixuefeng avatar Apr 02 '24 03:04 weixuefeng

Hi @weixuefeng, thank you for opening the issue! Could you clarify if standard Everscale coins transfer works (encodedContractData is empty)?

satoshiotomakan avatar Apr 02 '24 07:04 satoshiotomakan

Yes,i set encodedContractData is empty. Because my account state is UNINIT. i use everWallet create A account, and get token from faucet for A. then i transfer ever token to B account. B account is generate by wallet-core. now. B account have everToken. buy i can not transfer it. @satoshiotomakan

other problem. when i make transaction like android test. it broken. because to is null. and it throw invalid address string!

weixuefeng avatar Apr 02 '24 12:04 weixuefeng

Hi @weixuefeng, unfortunately, we do not have recourses to make a research on this issue. I'll put this issue on track as well as https://github.com/trustwallet/wallet-core/issues/3748

satoshiotomakan avatar Apr 05 '24 14:04 satoshiotomakan

Regarding the following

other problem. when i make transaction like android test. it broken. because to is null. and it throw invalid address string!

I think it was done on purpose, but I'm out of the context. See the discussion:

H: I don't see recipient address here, how does transfer work? R: It was a deployment-only message. Replaced it with a regular transfer, and refactored proto so that it was impossible to create such messages, they are not needed.

satoshiotomakan avatar Apr 05 '24 14:04 satoshiotomakan