[go: up one dir, main page]

Proto: native contracts

TODO

  • Add tests
  • Fix TODOs
  • Add comments

What

Adds enshrined / native contracts in the protocol.

Why

See design document

How

Also so design document, as it describes implementation choices.

Note that the views will be handled in !19583

Manually testing the MR

A dummy contract has been originated that serves as an example for enshrined contracts. It has a storage of type nat * nat: the first nat is an accumulator, the second a counter. It takes a parameter of type nat, and adds it to the accumulator and increments the counter.

  • Start a sandbox and activate Alpha
  • Try to call the contract:
octez-client call KT1HjbQKPJsxHgG7tvpqPapTn1hSuxxVtLQE from bootstrap1 --arg "18"

It should return a storage of value Pair 18 1.

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Pierrick Couderc

Merge request reports

Loading