diff --git a/gno.land/pkg/gnoland/genesis.go b/gno.land/pkg/gnoland/genesis.go index f076eae0728..7d03758bcc9 100644 --- a/gno.land/pkg/gnoland/genesis.go +++ b/gno.land/pkg/gnoland/genesis.go @@ -165,16 +165,14 @@ func LoadPackagesFromDir(dir string, creatorMnemonic string, chainID string, fee nonDraftPkgs := sortedPkgs.GetNonDraftPkgs() txs := make([]TxWithMetadata, 0, len(nonDraftPkgs)) - baseAccount := std.NewBaseAccountWithAddress(info.GetAddress()) - for _, pkg := range nonDraftPkgs { - accountSequence := baseAccount.GetSequence() tx, err := LoadPackage(pkg, info.GetAddress(), fee, nil) if err != nil { return nil, fmt.Errorf("unable to load package %q: %w", pkg.Dir, err) } - txData, err := tx.GetSignBytes(chainID, 0, accountSequence) + // Both account number and account sequence are 0 on genesis transactions + txData, err := tx.GetSignBytes(chainID, 0, 0) if err != nil { return nil, fmt.Errorf("unable to generate mnemonic, %w", err) } @@ -189,7 +187,6 @@ func LoadPackagesFromDir(dir string, creatorMnemonic string, chainID string, fee txs = append(txs, TxWithMetadata{ Tx: tx, }) - baseAccount.SetSequence(accountSequence + 1) } return txs, nil diff --git a/tm2/pkg/sdk/auth/ante.go b/tm2/pkg/sdk/auth/ante.go index 49662b47a55..4d77b25455f 100644 --- a/tm2/pkg/sdk/auth/ante.go +++ b/tm2/pkg/sdk/auth/ante.go @@ -435,15 +435,17 @@ func SetGasMeter(simulate bool, ctx sdk.Context, gasLimit int64) sdk.Context { // and an account. func GetSignBytes(chainID string, tx std.Tx, acc std.Account, genesis bool) ([]byte, error) { var accNum uint64 + var accSequence uint64 if !genesis { accNum = acc.GetAccountNumber() + accSequence = acc.GetSequence() } return std.GetSignaturePayload( std.SignDoc{ ChainID: chainID, AccountNumber: accNum, - Sequence: acc.GetSequence(), + Sequence: accSequence, Fee: tx.Fee, Msgs: tx.Msgs, Memo: tx.Memo,