Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cyan-laws-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/sdk': minor
---

Slightly modifies the MessageStatus enum to map to strings instead of integers
12 changes: 6 additions & 6 deletions packages/sdk/src/interfaces/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,34 +120,34 @@ export enum MessageStatus {
/**
* Message is an L1 to L2 message and has not been processed by the L2.
*/
UNCONFIRMED_L1_TO_L2_MESSAGE,
UNCONFIRMED_L1_TO_L2_MESSAGE = 'UNCONFIRMED_L1_TO_L2_MESSAGE',

/**
* Message is an L1 to L2 message and the transaction to execute the message failed.
* When this status is returned, you will need to resend the L1 to L2 message, probably with a
* higher gas limit.
*/
FAILED_L1_TO_L2_MESSAGE,
FAILED_L1_TO_L2_MESSAGE = 'FAILED_L1_TO_L2_MESSAGE',

/**
* Message is an L2 to L1 message and no state root has been published yet.
*/
STATE_ROOT_NOT_PUBLISHED,
STATE_ROOT_NOT_PUBLISHED = 'STATE_ROOT_NOT_PUBLISHED',

/**
* Message is an L2 to L1 message and awaiting the challenge period.
*/
IN_CHALLENGE_PERIOD,
IN_CHALLENGE_PERIOD = 'IN_CHALLENGE_PERIOD',

/**
* Message is ready to be relayed.
*/
READY_FOR_RELAY,
READY_FOR_RELAY = 'READY_FOR_RELAY',

/**
* Message has been relayed.
*/
RELAYED,
RELAYED = 'RELAYED',
}

/**
Expand Down