Skip to content

Version 0.12.2

Compare
Choose a tag to compare
@psiemens psiemens released this 30 Nov 06:00
· 1134 commits to master since this release

Network Compatibility

Emulator v0.10.0 (CLI v0.9.0) Emulator v0.12.0 (CLI v0.11.0) Testnet Mainnet

💥 Breaking Changes

Multiple contracts per account (#106)

By @janezpodhostnik

The Flow protocol now supports multiple contracts per account. This SDK has been updated with additional functionality to create and manage multiple contracts on the same account.

  • The flow.Account struct now contains a Contracts field that maps contractName => contractSource (map[string][]byte). Code is preserved for backwards compatibility.
  • The templates.CreateAccount function has changed to accept a list of contracts rather than a single code parameter. This list allows multiple contracts to be deployed upon account creation.
  • templates.UpdateAccountContract function replaces templates.UpdateAccountCode. This function updates a single contract by name.
  • The templates.AddAccountContract function was added, allowing a contract to be deployed to an existing account.

Reduce transaction template size

By @janezpodhostnik

Byte array values ([UInt8]) used in Cadence templates (CreateAccount, UpdateAccountContract, AddAccountContract) are now typed as String and passed as hexadecimal strings. This was done to reduce the size of the accompanying transaction argument values; hexadecimal strings are much more compact in JSON-CDC than array literals.

This is a breaking change because it alters the deterministic template formats, on which some applications may depend.

⭐ Enhancements

  • Example and documentation cleanup (#108, #109) @qq976739120