diff --git a/relayer/pkg/chainlink/txm/txm.go b/relayer/pkg/chainlink/txm/txm.go index fa3be2fca..2796e10e7 100644 --- a/relayer/pkg/chainlink/txm/txm.go +++ b/relayer/pkg/chainlink/txm/txm.go @@ -277,10 +277,8 @@ func (txm *starktxm) broadcast(ctx context.Context, publicKey *felt.Felt, accoun tx.Signature = signature // get fee for tx - // optional - pass nonce to fee estimate (if nonce gets ahead, estimate may fail) - // can we estimate fee without calling estimate - tbd with 1.0 simFlags := []starknetrpc.SimulationFlag{starknetrpc.SKIP_VALIDATE} - feeEstimate, err := account.EstimateFee(ctx, []starknetrpc.BroadcastTxn{tx}, simFlags, starknetrpc.BlockID{Tag: "latest"}) + feeEstimate, err := account.EstimateFee(ctx, []starknetrpc.BroadcastTxn{tx}, simFlags, starknetrpc.BlockID{Tag: "pending"}) if err != nil { var data any if err, ok := err.(ethrpc.DataError); ok { diff --git a/relayer/pkg/starknet/client.go b/relayer/pkg/starknet/client.go index 02de45433..934fc2bef 100644 --- a/relayer/pkg/starknet/client.go +++ b/relayer/pkg/starknet/client.go @@ -203,5 +203,5 @@ func (c *Client) AccountNonce(ctx context.Context, accountAddress *felt.Felt) (* if err != nil { return nil, errors.Wrap(err, "error in client.AccountNonce") } - return account.Nonce(ctx, starknetrpc.BlockID{Tag: "latest"}, account.AccountAddress) + return account.Nonce(ctx, starknetrpc.BlockID{Tag: "pending"}, account.AccountAddress) }