Skip to content

Commit

Permalink
feat: rpc 0.7.1 (starknet-io#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
tabaktoni authored Apr 11, 2024
1 parent c213c29 commit 11dc600
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions src/types/api/rpcspec_0_7/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type FELT = string;
export type ETH_ADDRESS = string;
/**
* A storage key. Represented as up to 62 hex digits, 3 bits, and 5 leading zeroes.
* @pattern ^0x0[0-7]{1}[a-fA-F0-9]{0,62}$
* @pattern ^0x(0|[0-7]{1}[a-fA-F0-9]{0,62}$)
*/
export type STORAGE_KEY = string;
export type ADDRESS = FELT;
Expand Down Expand Up @@ -407,12 +407,19 @@ export type L1_HANDLER_TXN = {
export type COMMON_RECEIPT_PROPERTIES = {
transaction_hash: TXN_HASH;
actual_fee: FEE_PAYMENT;
execution_status: TXN_EXECUTION_STATUS;
finality_status: TXN_FINALITY_STATUS;
messages_sent: MSG_TO_L1[];
revert_reason?: string;
events: EVENT[];
execution_resources: EXECUTION_RESOURCES;
} & (SUCCESSFUL_COMMON_RECEIPT_PROPERTIES | REVERTED_COMMON_RECEIPT_PROPERTIES);

type SUCCESSFUL_COMMON_RECEIPT_PROPERTIES = {
execution_status: 'SUCCEEDED';
};

type REVERTED_COMMON_RECEIPT_PROPERTIES = {
execution_status: 'REVERTED';
revert_reason: string;
};

export type INVOKE_TXN_RECEIPT = {
Expand Down Expand Up @@ -639,6 +646,7 @@ export type L1_HANDLER_TXN_TRACE = {
type: 'L1_HANDLER';
function_invocation: FUNCTION_INVOCATION;
state_diff?: STATE_DIFF;
execution_resources: EXECUTION_RESOURCES;
};

// Represents a nested function call.
Expand Down
2 changes: 1 addition & 1 deletion src/types/api/rpcspec_0_7/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* version v0.7.0-rc1
* version v0.7.1
*/

export { Methods } from './methods';
Expand Down

0 comments on commit 11dc600

Please sign in to comment.