Skip to content

Conversation

@jasonpaulos
Copy link
Contributor

@jasonpaulos jasonpaulos commented Dec 7, 2021

This PR contains a small set of improvements to the ABI. I've separated them into two categories:

Technical changes

  • Remove the appId field in favor of a new networks field on Contract. This change has two benefits:
    • A single contract JSON object can now represent a contract deployed to multiple networks, such as to TestNet and MainNet.
    • A contract JSON object can now describe a contract that has not yet been deployed by omitting the networks field. Previously the appId field was always required.
  • If a method has exactly 15 arguments, the last argument is no longer required to be encoded in a tuple.
    • This makes the encoding more efficient for this number of arguments, rather than making the 15th argument appear in a tuple of size 1.
  • Clarify that in the case of multiple logged values with the special 4-byte return prefix, the last one is the return value.
  • Explicitly allow 0 indexes to be used when passing the transaction sender as an account value or the called application as an application value.

Formatting changes

  • Add comments to all JSON definitions and enable code highlighting
  • Expand example JSON objects to contain valid fields
  • Rename "foreign" types to reference types

@jannotti
Copy link
Contributor

jannotti commented Dec 7, 2021

These look like good changes to me.

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