Version 0.12.2
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)
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 aContracts
field that mapscontractName => 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 singlecode
parameter. This list allows multiple contracts to be deployed upon account creation. templates.UpdateAccountContract
function replacestemplates.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
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.