Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2307 smart rollup types #2324

Merged
merged 18 commits into from
Jan 30, 2023
Merged
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
3 changes: 3 additions & 0 deletions packages/taquito-rpc/src/opkind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ export enum OpKind {
VDF_REVELATION = 'vdf_revelation',
EVENT = 'event',
TICKET_UPDATES = 'ticket_updates',
SMART_ROLLUP_ORIGINATE = 'smart_rollup_originate',
SMART_ROLLUP_ADD_MESSAGES = 'smart_rollup_add_messages',
SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE = 'smart_rollup_execute_outbox_message',
}
88 changes: 87 additions & 1 deletion packages/taquito-rpc/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,24 @@ export interface OperationContentsAndResultMetadataDrainDelegate {
allocated_destination_contract?: boolean;
}

export interface OperationContentsAndResultMetadataSmartRollupOriginate {
balance_updates?: OperationMetadataBalanceUpdates[];
operation_result: OperationResultSmartRollupOriginate;
internal_operation_results?: InternalOperationResult[];
}

export interface OperationContentsAndResultMetadataSmartRollupAddMessages {
balance_updates?: OperationMetadataBalanceUpdates[];
operation_result: OperationResultSmartRollupAddMessages;
internal_operation_results?: InternalOperationResult[];
}

export interface OperationContentsAndResultMetadataSmartRollupExecuteOutboxMessage {
balance_updates?: OperationMetadataBalanceUpdates[];
operation_result: OperationResultSmartRollupExecuteOutboxMessage;
internal_operation_results?: InternalOperationResult[];
}

export interface OperationContentsAndResultEndorsement {
kind: OpKind.ENDORSEMENT;
block_payload_hash?: string;
Expand Down Expand Up @@ -914,6 +932,44 @@ export interface OperationContentsAndResultVdfRevelation {
metadata: OperationContentsAndResultMetadata;
}

export interface OperationContentsAndResultSmartRollupOriginate {
kind: OpKind.SMART_ROLLUP_ORIGINATE;
source: string;
fee: string;
counter: string;
gas_limit: string;
storage_limit: string;
pvm_kind: PVMKind;
kernel: string;
origination_proof: string;
parameters_ty: MichelsonV1Expression;
metadata: OperationContentsAndResultMetadataSmartRollupOriginate;
}

export interface OperationContentsAndResultSmartRollupAddMessages {
kind: OpKind.SMART_ROLLUP_ADD_MESSAGES;
source: string;
fee: string;
counter: string;
gas_limit: string;
storage_limit: string;
message: string[];
metadata: OperationContentsAndResultMetadataSmartRollupAddMessages;
}

export interface OperationContentsAndResultSmartRollupExecuteOutboxMessage {
kind: OpKind.SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE;
source: string;
fee: string;
counter: string;
gas_limit: string;
storage_limit: string;
rollup: string;
cemented_commitment: string;
output_proof: string;
metadata: OperationContentsAndResultMetadataSmartRollupExecuteOutboxMessage;
}

export type OperationContentsAndResult =
| OperationContentsAndResultEndorsement
| OperationContentsAndResultPreEndorsement
Expand Down Expand Up @@ -943,7 +999,10 @@ export type OperationContentsAndResult =
| OperationContentsAndResultIncreasePaidStorage
| OperationContentsAndResultUpdateConsensusKey
| OperationContentsAndResultDrainDelegate
| OperationContentsAndResultVdfRevelation;
| OperationContentsAndResultVdfRevelation
| OperationContentsAndResultSmartRollupOriginate
| OperationContentsAndResultSmartRollupAddMessages
| OperationContentsAndResultSmartRollupExecuteOutboxMessage;

export enum OPERATION_METADATA {
TOO_LARGE = 'too large',
Expand Down Expand Up @@ -1308,6 +1367,31 @@ export interface OperationResultRegisterGlobalConstant {
consumed_milligas?: string;
}

export interface OperationResultSmartRollupOriginate {
status: OperationResultStatusEnum;
balance_updates: OperationBalanceUpdates;
address: string;
genesis_commitment_hash: string;
consumed_milligas?: string;
size: string;
errors?: TezosGenericOperationError[];
}

export interface OperationResultSmartRollupAddMessages {
status: OperationResultStatusEnum;
consumed_milligas?: string;
errors?: TezosGenericOperationError[];
}

export interface OperationResultSmartRollupExecuteOutboxMessage {
status: OperationResultStatusEnum;
balance_updates: OperationBalanceUpdates;
ticket_updates: TicketUpdates[];
consumed_milligas?: string;
paid_storage_size_diff?: string;
errors?: TezosGenericOperationError[];
}

export interface ContractBigMapDiffItem {
key_hash?: string;
key?: MichelsonV1Expression;
Expand Down Expand Up @@ -1941,3 +2025,5 @@ export interface TxRollupInboxResponse {
cumulated_size: number;
merkle_root: string;
}

export type PVMKind = 'wasm_2_0_0' | 'arith';
Loading