Skip to content

Commit

Permalink
feat: rpc 0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tabaktoni committed Nov 13, 2023
1 parent 39b3fa7 commit 0306b90
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/types/api/rpcspec/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export type FUNCTION_ABI_TYPE = 'function' | 'l1_handler' | 'constructor';
// Represents the type of an entry point.
export type ENTRY_POINT_TYPE = 'EXTERNAL' | 'L1_HANDLER' | 'CONSTRUCTOR';
// Represents the type of a function call.
export type CALL_TYPE = 'LIBRARY_CALL' | 'CALL';
export type CALL_TYPE = 'DELEGATE' | 'LIBRARY_CALL' | 'CALL';
// Represents the status of the transaction
export type TXN_STATUS = 'RECEIVED' | 'REJECTED' | 'ACCEPTED_ON_L2' | 'ACCEPTED_ON_L1';
// Flags that indicate how to simulate a given transaction. By default, the sequencer behavior is replicated locally (enough funds are expected to be in the account, and the fee will be deducted from the balance before the simulation of the next transaction). To skip the fee charge, use the SKIP_FEE_CHARGE flag.
Expand Down Expand Up @@ -520,34 +520,35 @@ export type TRANSACTION_TRACE = {

// Represents a transaction trace for an invoke transaction.
export type INVOKE_TXN_TRACE = {
validate_invocation: FUNCTION_INVOCATION;
execute_invocation: FUNCTION_INVOCATION | { revert_reason: string };
fee_transfer_invocation: FUNCTION_INVOCATION;
state_diff: STATE_DIFF;
type: 'INVOKE';
execute_invocation: FUNCTION_INVOCATION | { revert_reason: string };
validate_invocation?: FUNCTION_INVOCATION;
fee_transfer_invocation?: FUNCTION_INVOCATION;
state_diff?: STATE_DIFF;
};

// Represents a transaction trace for a declare transaction.
export type DECLARE_TXN_TRACE = {
validate_invocation: FUNCTION_INVOCATION;
fee_transfer_invocation: FUNCTION_INVOCATION;
state_diff: STATE_DIFF;
type: 'DECLARE';
validate_invocation?: FUNCTION_INVOCATION;
fee_transfer_invocation?: FUNCTION_INVOCATION;
state_diff?: STATE_DIFF;
};

// Represents a transaction trace for a deploy account transaction.
export type DEPLOY_ACCOUNT_TXN_TRACE = {
validate_invocation: FUNCTION_INVOCATION;
constructor_invocation: FUNCTION_INVOCATION;
fee_transfer_invocation: FUNCTION_INVOCATION;
state_diff: STATE_DIFF;
type: 'DEPLOY_ACCOUNT';
constructor_invocation: FUNCTION_INVOCATION;
validate_invocation?: FUNCTION_INVOCATION;
fee_transfer_invocation?: FUNCTION_INVOCATION;
state_diff?: STATE_DIFF;
};

// Represents a transaction trace for an L1 handler transaction.
export type L1_HANDLER_TXN_TRACE = {
function_invocation: FUNCTION_INVOCATION;
type: 'L1_HANDLER';
function_invocation: FUNCTION_INVOCATION;
state_diff?: STATE_DIFF;
};

// Represents a nested function call.
Expand Down
4 changes: 4 additions & 0 deletions src/types/api/rpcspec/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* version 0.5.1
*/

export { Methods } from './methods';
export { ABI } from './contract';
export * as Errors from './errors';
Expand Down

0 comments on commit 0306b90

Please sign in to comment.