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
{{ message }}
Repository navigation
[@0xsequence/relayer] prepareTransactions doesn't work with undeployed wallets #309
My approach was that I firstly signed the txns using wallet.signTransactions and then passed the attributes from the signed Transactions to prepareTransactions.
I found the issue was in these LOC
constnonce=readSequenceNonce(...transactions)if(!nonce){thrownewError('Unable to prepare transactions without a defined nonce')}
The transaction produced by signTransactions has the nonce of 0 instead of BigNumber { 0x0 } hence this check !nonce is true for both undefined and 0 values.
How can I do differently to use this prepareTransactions for the first txns?
This successfully deploy the wallet and execute the given transaction. However I wanted to get the output data to pass to our local relayer in another process instead of executing it immediately. Hence I needed the prepareTransactions output.
Activity
attente commentedon Nov 3, 2022
Thanks for your report, could you please add what version of sequence.js you encountered this error on?
attente commentedon Nov 3, 2022
Also, can you try calling:
directly to see if that resolves your issue?
sondnm commentedon Nov 3, 2022
I'm tested against v0.42.8
This successfully deploy the wallet and execute the given transaction. However I wanted to get the output data to pass to our local relayer in another process instead of executing it immediately. Hence I needed the
prepareTransactionsoutput.attente commentedon Nov 3, 2022
Can you please try is copying this:
sequence.js/packages/relayer/src/rpc-relayer/index.ts
Lines 189 to 197 in 114d881
to(the "to" address) andinput(the calldata).(Replace
thiswith your BaseRelayer if necessary.)sondnm commentedon Nov 4, 2022
Thanks for the suggestion. I already gave it a try and it worked well. I guess the
!noncecheck with0value is a bug withprepareTransactionsthen.