Skip to content

Commit

Permalink
fix: ScriptedContracts in Origination
Browse files Browse the repository at this point in the history
Origination operation has a "script" field. Tezos description says:
[https://tezos.gitlab.io/shell/p2p_api.html#origination-tag-109]
 - size: determined from data
 - contents: $alpha.scripted.contracts
The ScriptedContracts type is matching the definition of
$alpha.scripted.contracts
[https://tezos.gitlab.io/shell/p2p_api.html#alpha-scripted-contracts]
 - # bytes in next field, 4 bytes, unsigned 30-bit big-endian integer
 - code, Variable, bytes
 - # bytes in next field, 4 bytes, unsigned 30-bit big-endian integer
 - storage, Variable, bytes

 Fixed the definition of TezosOriginationOperation to match the TezosRPC
 specification.
  • Loading branch information
dianasavvatina committed Aug 13, 2024
1 parent 82a6778 commit a0435b9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { TezosBaseOperation, TezosOperationType } from '../../..'
import { ScriptedContracts } from '../common'

/**
* @internalapi
Expand All @@ -13,5 +14,5 @@ export interface TezosOriginationOperation extends TezosBaseOperation {
storage_limit: string
balance: string
delegate?: string
script: string
script: ScriptedContracts
}

0 comments on commit a0435b9

Please sign in to comment.