v1.11.0
github-actions
released this
30 Mar 01:32
·
84 commits
to testnet3
since this release
Enhanced Dependency System
The latest update dramatically simplifies the development of Leo projects with enhanced support for external calls to both on-chain and local programs.
- Breaking Change: Now use import foo.aleo instead of import foo.leo, and attach the dependency using the CLI.
- New
.aleo/registry
structure in the~/.aleo
file system to store.aleo
files from the Aleo network. - Ability to automatically retrieve network dependencies and build complicated nested dependency structures.
// Pull credits.aleo as a dependency
leo add -n credits
// Add a local dependency named foo.aleo at path ../foo
leo add -l ../foo foo
// Attach dependencies in the Leo file
import credits.aleo
import foo.aleo
Reading External Mappings
Leo allows users to read external mappings.
let val:u32 = Mapping::get(token.aleo/account, 0u32);
let val_2:u32 = Mapping::get_or_use(token.aleo/account, 0u32, 0u32);
Relaxed Shadowing
Local mapping, struct, record and function names can now overlap with external objects.
let bar: hello.aleo/foo = bye.aleo/foo(foo {a: 1u32, b: 1u32});