Skip to content

Commit 11dc600

Browse files
authored
feat: rpc 0.7.1 (#1071)
1 parent c213c29 commit 11dc600

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/types/api/rpcspec_0_7/components.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export type FELT = string;
1414
export type ETH_ADDRESS = string;
1515
/**
1616
* A storage key. Represented as up to 62 hex digits, 3 bits, and 5 leading zeroes.
17-
* @pattern ^0x0[0-7]{1}[a-fA-F0-9]{0,62}$
17+
* @pattern ^0x(0|[0-7]{1}[a-fA-F0-9]{0,62}$)
1818
*/
1919
export type STORAGE_KEY = string;
2020
export type ADDRESS = FELT;
@@ -407,12 +407,19 @@ export type L1_HANDLER_TXN = {
407407
export type COMMON_RECEIPT_PROPERTIES = {
408408
transaction_hash: TXN_HASH;
409409
actual_fee: FEE_PAYMENT;
410-
execution_status: TXN_EXECUTION_STATUS;
411410
finality_status: TXN_FINALITY_STATUS;
412411
messages_sent: MSG_TO_L1[];
413-
revert_reason?: string;
414412
events: EVENT[];
415413
execution_resources: EXECUTION_RESOURCES;
414+
} & (SUCCESSFUL_COMMON_RECEIPT_PROPERTIES | REVERTED_COMMON_RECEIPT_PROPERTIES);
415+
416+
type SUCCESSFUL_COMMON_RECEIPT_PROPERTIES = {
417+
execution_status: 'SUCCEEDED';
418+
};
419+
420+
type REVERTED_COMMON_RECEIPT_PROPERTIES = {
421+
execution_status: 'REVERTED';
422+
revert_reason: string;
416423
};
417424

418425
export type INVOKE_TXN_RECEIPT = {
@@ -639,6 +646,7 @@ export type L1_HANDLER_TXN_TRACE = {
639646
type: 'L1_HANDLER';
640647
function_invocation: FUNCTION_INVOCATION;
641648
state_diff?: STATE_DIFF;
649+
execution_resources: EXECUTION_RESOURCES;
642650
};
643651

644652
// Represents a nested function call.

src/types/api/rpcspec_0_7/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* version v0.7.0-rc1
2+
* version v0.7.1
33
*/
44

55
export { Methods } from './methods';

0 commit comments

Comments
 (0)