Skip to content

Commit

Permalink
fix: operation types
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaccoSordo committed Dec 20, 2024
1 parent b2a8567 commit 9634ffa
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 50 deletions.
8 changes: 4 additions & 4 deletions packages/beacon-types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ import { PermissionEntity } from './types/PermissionEntity'
import { WalletInfo } from './types/WalletInfo'
import { ChangeAccountRequest } from './types/beacon/messages/ChangeAccountRequest'
import { TezosAttestationOperation } from './types/tezos/operations/Attestation'
import { TezosAttestationWithSlotOperation } from './types/tezos/operations/AttestationWithSlot'
import { TezosAttestationWithDalOperation } from './types/tezos/operations/AttestationWithDal'
import { TezosDoubleAttestationEvidenceOperation } from './types/tezos/operations/DoubleAttestationEvidence'
import { TezosDoublePreEndorsementEvidenceOperation } from './types/tezos/operations/DoublePreEndorsementEvidence'
import { TezosDrainDelegateOperation } from './types/tezos/operations/DrainDelegate'
import { TezosEndorsementWithSlotOperation } from './types/tezos/operations/EndorsementWithSlot'
import { TezosEndorsementWithDalOperation } from './types/tezos/operations/EndorsementWithDal'
import { TezosFailingNoopOperation } from './types/tezos/operations/FailingNoop'
import { TezosIncreasePaidStorageOperation } from './types/tezos/operations/IncreasePaidStorage'
import { TezosPreAttestationOperation } from './types/tezos/operations/PreAttestation'
Expand Down Expand Up @@ -237,8 +237,8 @@ export {
TezosSetDepositsLimitOperation,
TezosDoublePreAttestationEvidenceOperation,
TezosDoublePreEndorsementEvidenceOperation,
TezosAttestationWithSlotOperation,
TezosEndorsementWithSlotOperation,
TezosAttestationWithDalOperation,
TezosEndorsementWithDalOperation,
TezosDoubleAttestationEvidenceOperation,
TezosFailingNoopOperation,
TezosRegisterGlobalConstantOperation,
Expand Down
52 changes: 26 additions & 26 deletions packages/beacon-types/src/types/tezos/OperationTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,42 @@
* @category Tezos
*/
export enum TezosOperationType {
ORIGINATION = 'origination',
DELEGATION = 'delegation',
REVEAL = 'reveal',
TRANSACTION = 'transaction',
ACTIVATE_ACCOUNT = 'activate_account',
ENDORSEMENT = 'endorsement',
SEED_NONCE_REVELATION = 'seed_nonce_revelation',
DOUBLE_ENDORSEMENT_EVIDENCE = 'double_endorsement_evidence',
DOUBLE_BAKING_EVIDENCE = 'double_baking_evidence',
PROPOSALS = 'proposals',
BALLOT = 'ballot',
ATTESTATION = 'attestation',
PREATTESTATION = 'preattestation',
PREENDORSEMENT = 'preendorsement',
SET_DEPOSITS_LIMIT = 'set_deposits_limit',
ATTESTATION_WITH_DAL = 'attestation_with_dal',
BALLOT = 'ballot',
DAL_PUBLISH_COMMITMENT = 'dal_publish_commitment',
DELEGATION = 'delegation',
DRAIN_DELEGATE = 'drain_delegate',
DOUBLE_ATTESTATION_EVIDENCE = 'double_attestation_evidence',
DOUBLE_BAKING_EVIDENCE = 'double_baking_evidence',
DOUBLE_ENDORSEMENT_EVIDENCE = 'double_endorsement_evidence',
DOUBLE_PREATTESTATION_EVIDENCE = 'double_preattestation_evidence',
DOUBLE_PREENDORSEMENT_EVIDENCE = 'double_preendorsement_evidence',
ATTESTATION_WITH_SLOT = 'attestation_with_slot',
ENDORSEMENT_WITH_SLOT = 'endorsement_with_slot',
DOUBLE_ATTESTATION_EVIDENCE = 'double_attestation_evidence',
ENDORSEMENT = 'endorsement',
ENDORSEMENT_WITH_DAL = 'endorsement_with_dal',
EVENT = 'event',
FAILING_NOOP = 'failing_noop',
REGISTER_GLOBAL_CONSTANT = 'register_global_constant',
TRANSFER_TICKET = 'transfer_ticket',
INCREASE_PAID_STORAGE = 'increase_paid_storage',
UPDATE_CONSENSUS_KEY = 'update_consensus_key',
DRAIN_DELEGATE = 'drain_delegate',
VDF_REVELATION = 'vdf_revelation',
EVENT = 'event',
TICKET_UPDATES = 'ticket_updates',
SMART_ROLLUP_ORIGINATE = 'smart_rollup_originate',
ORIGINATION = 'origination',
PREATTESTATION = 'preattestation',
PREENDORSEMENT = 'preendorsement',
PROPOSALS = 'proposals',
REGISTER_GLOBAL_CONSTANT = 'register_global_constant',
REVEAL = 'reveal',
SEED_NONCE_REVELATION = 'seed_nonce_revelation',
SET_DEPOSITS_LIMIT = 'set_deposits_limit',
SMART_ROLLUP_ADD_MESSAGES = 'smart_rollup_add_messages',
SMART_ROLLUP_CEMENT = 'smart_rollup_cement',
SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE = 'smart_rollup_execute_outbox_message',
SMART_ROLLUP_ORIGINATE = 'smart_rollup_originate',
SMART_ROLLUP_PUBLISH = 'smart_rollup_publish',
SMART_ROLLUP_CEMENT = 'smart_rollup_cement',
SMART_ROLLUP_RECOVER_BOND = 'smart_rollup_recover_bond',
SMART_ROLLUP_REFUTE = 'smart_rollup_refute',
SMART_ROLLUP_TIMEOUT = 'smart_rollup_timeout',
DAL_PUBLISH_COMMITMENT = 'dal_publish_commitment'
TICKET_UPDATES = 'ticket_updates',
TRANSACTION = 'transaction',
TRANSFER_TICKET = 'transfer_ticket',
UPDATE_CONSENSUS_KEY = 'update_consensus_key',
VDF_REVELATION = 'vdf_revelation'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { TezosOperationType } from '../OperationTypes'
import { TezosBaseOperation } from '../TezosBaseOperation'

export interface TezosAttestationWithDalOperation extends TezosBaseOperation {
kind: TezosOperationType.ATTESTATION_WITH_DAL;
slot: number;
level: number;
round: number;
block_payload_hash: string;
dal_attestation: string;
}

This file was deleted.

2 changes: 1 addition & 1 deletion packages/beacon-types/src/types/tezos/operations/Ballot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { TezosBaseOperation, TezosOperationType } from '../../..'
export interface TezosBallotOperation extends TezosBaseOperation {
kind: TezosOperationType.BALLOT
source: string
period: string
period: number
proposal: string
ballot: 'nay' | 'yay' | 'pass'
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ export interface TezosDoubleEndorsementEvidenceOperation extends TezosBaseOperat
kind: TezosOperationType.DOUBLE_ENDORSEMENT_EVIDENCE
op1: InlinedEndorsement
op2: InlinedEndorsement
slot?: number
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { TezosOperationType } from '../OperationTypes'
import { TezosBaseOperation } from '../TezosBaseOperation'

export interface TezosEndorsementWithDalOperation extends TezosBaseOperation {
kind: TezosOperationType.ENDORSEMENT_WITH_DAL;
slot: number;
level: number;
round: number;
block_payload_hash: string;
dal_attestation: string;
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ export interface TezosOriginationOperation extends TezosBaseOperation {
storage_limit: string
balance: string
delegate?: string
script: ScriptedContracts
script?: ScriptedContracts
}

0 comments on commit 9634ffa

Please sign in to comment.