diff --git a/mocks/mock_rpc_provider.go b/mocks/mock_rpc_provider.go index 2dfddd4a..bbd47649 100644 --- a/mocks/mock_rpc_provider.go +++ b/mocks/mock_rpc_provider.go @@ -297,7 +297,7 @@ func (mr *MockRpcProviderMockRecorder) Events(ctx, input any) *gomock.Call { } // GetMessagesStatus mocks base method. -func (m *MockRpcProvider) GetMessagesStatus(ctx context.Context, transactionHash *felt.Felt) ([]rpc.MessageStatusResp, error) { +func (m *MockRpcProvider) GetMessagesStatus(ctx context.Context, transactionHash rpc.NumAsHex) ([]rpc.MessageStatusResp, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetMessagesStatus", ctx, transactionHash) ret0, _ := ret[0].([]rpc.MessageStatusResp) diff --git a/rpc/provider.go b/rpc/provider.go index d1c04a81..3a8c72e2 100644 --- a/rpc/provider.go +++ b/rpc/provider.go @@ -60,7 +60,7 @@ type RpcProvider interface { EstimateMessageFee(ctx context.Context, msg MsgFromL1, blockID BlockID) (*FeeEstimation, error) Events(ctx context.Context, input EventsInput) (*EventChunk, error) GetTransactionStatus(ctx context.Context, transactionHash *felt.Felt) (*TxnStatusResp, error) - GetMessagesStatus(ctx context.Context, transactionHash *felt.Felt) ([]MessageStatusResp, error) + GetMessagesStatus(ctx context.Context, transactionHash NumAsHex) ([]MessageStatusResp, error) Nonce(ctx context.Context, blockID BlockID, contractAddress *felt.Felt) (*felt.Felt, error) SimulateTransactions(ctx context.Context, blockID BlockID, txns []BroadcastTxn, simulationFlags []SimulationFlag) ([]SimulatedTransaction, error) StateUpdate(ctx context.Context, blockID BlockID) (*StateUpdateOutput, error) diff --git a/rpc/transaction.go b/rpc/transaction.go index 06403b0b..32485d10 100644 --- a/rpc/transaction.go +++ b/rpc/transaction.go @@ -72,15 +72,15 @@ func (provider *Provider) GetTransactionStatus(ctx context.Context, transactionH return &receipt, nil } -// Given an l1 tx hash, returns the associated l1_handler tx hashes and statuses for all L1 -> L2 messages sent by the l1 transaction, ordered by the l1 tx sending order +// Given an L1 tx hash, returns the associated l1_handler tx hashes and statuses for all L1 -> L2 messages sent by the l1 transaction, ordered by the L1 tx sending order // // Parameters: // - ctx: the context.Context object for cancellation and timeouts. -// - transactionHash: The hash of the L1 transaction that sent L1->L2 messages as a felt +// - transactionHash: The hash of the L1 transaction that sent L1->L2 messages // Returns: -// - [] MessageStatusResp: An array containing the status of the messages sent by the l1 transaction +// - [] MessageStatusResp: An array containing the status of the messages sent by the L1 transaction // - error, if one arose. -func (provider *Provider) GetMessagesStatus(ctx context.Context, transactionHash *felt.Felt) ([]MessageStatusResp, error) { +func (provider *Provider) GetMessagesStatus(ctx context.Context, transactionHash NumAsHex) ([]MessageStatusResp, error) { var response []MessageStatusResp err := do(ctx, provider.c, "starknet_getMessagesStatus", &response, transactionHash) if err != nil { diff --git a/rpc/types_transaction_receipt.go b/rpc/types_transaction_receipt.go index 41607257..86217179 100644 --- a/rpc/types_transaction_receipt.go +++ b/rpc/types_transaction_receipt.go @@ -29,7 +29,7 @@ type MsgFromL1 struct { } type MessageStatusResp struct { - // The hash of a Starknet transaction + // The hash of a L1 handler transaction TransactionHash *felt.Felt `json:"transaction_hash"` // The finality status of the transaction, including the case the txn is still in the mempool or failed validation during the block construction phase FinalityStatus TxnStatus `json:"finality_status"`