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

fix: ScriptedContracts in Origination #806

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

dianasavvatina
Copy link
Contributor

@dianasavvatina dianasavvatina commented Aug 13, 2024

What:
Changed the type of TezosOriginationOperation.script from string to ScriptedContracts.

Why:
The string type doesn't match the Tezos RPC specification.

Details:

The Origination operation has a script field with the following parameters: (doc)

  • size: determined from data
  • contents: $alpha.scripted.contracts

The ScriptedContracts type is matching the definition of $alpha.scripted.contracts (doc)

  • # 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 Tezos RPC specification.

AndreasGassmann and others added 2 commits May 15, 2024 11:01
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.
@dianasavvatina dianasavvatina marked this pull request as ready for review August 13, 2024 15:35
@IsaccoSordo IsaccoSordo self-requested a review August 14, 2024 07:28
@IsaccoSordo IsaccoSordo changed the base branch from master to develop August 14, 2024 07:28
@IsaccoSordo IsaccoSordo merged commit 84d5328 into airgap-it:develop Aug 14, 2024
4 checks passed
@IsaccoSordo
Copy link
Collaborator

Hi @dianasavvatina,
Thank you for identifying this issue. Your changes will be included in the upcoming release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants