Releases: odradev/odra
Releases · odradev/odra
Odra 1.5.0: Clever Louse
What's Changed
Full Changelog: 1.4.0...1.5.0
Odra 1.4.0: Johnny Bytes
Odra 1.3.0: High Water
What's Changed
- Group all derived module structs into single trait by @kpob in #509
- Updated chainspec to be compatible with casper-execution-engine 7.0.3 by @kubaplas in #512
Full Changelog: 1.2.0...1.3.0
Odra 1.2.0: Festival Mania
What's Changed
- Add EventInstance trait to emit_event functions by @kpob in #495
- Improve UnwrapOrRevert interface by @kpob in #493
- Now out of gas error can be handled in livenet. by @kubaplas in #496
- Add External component by @kpob in #494
- RPC client: Replaced blocking reqwest with async version. by @kubaplas in #497
- Fix schema generation for generic types by @kpob in #505
- Cep78 burn by @zie1ony in #507
Full Changelog: 1.1.0...1.2.0
Odra 1.1.0: Bullseye: Phantom Menace
Added
- Support for CSPR.cloud's auth token.
new
method forAddress
to create an address from a string.transfer
function in theHostEnv
allowing native token transfers between accounts.- Reverse lookup feature for
CEP78
. Addressable
trait for types that can be converted toAddress
.
Updated
- Fix
get_block_time
incasper-rpc-client
. - Calling
try_
functions in the livenet context now returns aResult
instead of panicking. - Improve error messages in the livenet context.
- Update
HostEnv
functions acceptAddressable
instead ofAddress
.
What's Changed
- New logo by @zie1ony in #457
- Protect static mocks with Mutex by @kpob in #461
- Move named keys related marcos to core by @kpob in #456
- Prevent from sending tokens when calling a non-payable function on Od… by @kpob in #459
- CEP-78: Reverse lookup order feature by @kpob in #455
- Get event-related data in a non-failing way by @kpob in #464
- Move the code that generates contract schema to
odra-build
by @kpob in #468 - Refactor cep18 storage modules by @kpob in #476
- Native transfer between accounts by @kpob in #471
- CSPR.cloud auth token support. by @zie1ony in #474
- Fix block time parsing by @kpob in #479
- Create Address from a static str by @kpob in #477
- Publish access token of the contract for locked contracts. by @zie1ony in #486
- More CEP78 public fns in lib. by @zie1ony in #484
- Try to read user errors from the schema on livenet by @kpob in #473
- Add Addressable trait implementation and update HostEnv api by @kpob in #483
- Update version, changelog and examples by @kpob in #491
Full Changelog: 1.0.0...1.1.0
Odra 1.0.0 - 💯
Added
- Add
try_deploy
function to theDeployer
trait, which allows deploying a contract and returning an error if the deployment fails. - Add
Cep18
toodra-modules
- a standard for fungible tokens. - Add
Cep78
toodra-modules
- a standard for non-fungible tokens. - Add
cep18
andcep78
templates.
Changed
- Update casper crates to the latest versions.
- Fix minor bugs in generated code.
- Fix events collection in submodules.
AI Summary
- Fix workspace template. Add schema generation to templates tests. by @zie1ony in #401
- Refactor contract deployment functions to return Result types by @kpob in #415
- CEP-18 by @kubaplas in #402
- Validate args at deploy time by @kpob in #418
- Fix bugs in the generated code by @kpob in #424
- Update casper crates by @kpob in #426
- CEP-78 by @kpob in #410
- Fix/events and cep78 extensions by @zie1ony in #431
- Add Serde to Address by @zie1ony in #432
- Templates.json 🥖 by @kubaplas in #441
- Add new templates for cep18 and cep78 by @kpob in #434
- Add missing odra::prelude path in generated code by @kpob in #436
- Update CHANGELOG.md by @kpob in #440
- Add block_time() to HostEnv by @zie1ony in #442
- Example for CEP-18 tutorial. by @kubaplas in #447
- 1.0.0 version bump + small updates by @zie1ony in #448
- Update Readme for odra crate. by @zie1ony in #449
- Rebuild proxy getter by @zie1ony in #451
Full Changelog: 0.9.1...1.0.0
Odra 0.9.1 - Mahalo
Odra 0.9.0 - Aloha
What's Changed
- Reenable livenet tests by @kubaplas in #377
- Update enum conversion from u32 to u8 by @kpob in #374
- Handling optional entry point argument by @kpob in #380
- Contract schema by @kpob in #382
- Generate contract schemas by @kpob in #388
- Allow to declare a reference as a constructor arg by @kpob in #387
- Use casper-contract-schema from crates.io by @zie1ony in #389
- Replace derive macros with attribute macros by @kpob in #390
- Bump versions to 0.9.0. by @kubaplas in #392
Full Changelog: 0.8.1...0.9.0
Odra 0.8.1: Stonka
What's Changed
- Livenet tests now run on local docker node and in CI by @kubaplas in #352
- Tests of templates in CI by @kubaplas in #361
- Enabled missing docs lint by @kubaplas in #362
- Fix for infinite loop when transferring tokens by @kubaplas in #371
- New feature - disable-allocator by @kubaplas in #370
- Build crate. Version bump. by @kubaplas in #369
Full Changelog: 0.8.0...0.8.1
Odra 0.8.0: Business Class
Changed
- Replaced
contract_env::
withself.env()
in the contract context (of typeContractEnv
).
For example, instead ofcontract_env::caller()
useself.env.caller()
. - Replaced
test_env
withodra_test::env()
in the test context (of typeHostEnv
). - It is no longer possible to put a Mapping inside a Mapping. Use tuple keys instead, for example, instead of
allowances: Mapping<Address, Mapping<Address, U256>>
useallowances: Mapping<(Address, Address), U256>
. Ref
has been divided into two:HostRef
andContractRef
depending on the context.- Storage keys are constructed differently, keep that in mind when querying the storage outside the contract.
token_balance(address: Address)
in test context is nowbalance_of(address: &Address)
.- Modules needs to be wrapped in SubModule<> when used in another module.
HostRef
(formerlyRef
) methods parameters accept values even if endpoints expect references.unwrap_or_revert
andunwrap_or_revert_with
now require&HostEnv
as a first parameter.Variable
has been renamed toVar
.- Spent Gas is taken into account when checking an account balance.
This means that all calls appear to cost 0 gas to the test accounts,
but it is still possible to check the costs of the calls. - Various changes of method signatures in
odra-modules
, e.g.&[U256]
changed toVec<U256>
inon_erc1155_batch_received
method. get_block_time()
now returnsu64
instead of wrapped typeBlocktime(u64)
.- The
name
property inOdra.toml
is not required anymore. odra-casper-backend
crate is nowodra-casper-wasm-env
odra-mock-vm
crate is nowodra-vm
odra-proc-macros
is the only code generation point.
Removed
- Removed
#[odra::init]
macro - now only one method can be a constructor,
and it has to be namedinit
. - Removed
emit()
method from events. Useself.env.emit_event(event)
instead. - Removed
assert_events!
macro. Useenv.emitted_event
and similar methods instead. - Removed
native_token_metadata()
and its respective structs. - Removed
assert_exception!
macro. Usetry_
prefix for endpoints instead. It returns aResult
which can be used with a regularassert_eq!
macro.` - Removed
odra(using)
macro. - Removed
default()
method fromDeployer
. Useinit()
instead. - Removed
StaticInstance
andDynamicInstance
traits. UseModule
instead. - Removed
Node
trait. - Removed
odra-types
,odra-ir
,odra-codegen
,odra-casper-backend
,odra-casper-shared
,odra-utils
crates. - Removed
OdraEvent
trait,odra
reexportscasper_event_standard
crate instead.
Added
last_call()
in test env withContractCallResult
struct which holds all information about the last call.odra::prelude::*
module which reexports all basic types and traits.
It is recommended to use it in the module code.odra-test
crate providingHostEnv
for testing purposes.odra-core
crate providing framework core functionalities.odra-casper-rcp-client
crate providingCasperClient
for interacting with Casper node.odra-casper-livenet-env
crate providing a host environment fo for the Casper livenet.HostRef
trait - a host side reference to a contract.HostRefLoader
trait for loading a contract from the host environment.EntryPointsCallerProvider
trait.Deployer
trait - a struct implementing that trait can deploy a contract.InitArgs
trait - a struct implementing that trait can be used as a constructor argument.NoArgs
struct, an implementation ofInitArgs
for empty/none (no constructor) arguments.
Very Brief Upgrade Path
- Copy
bin
folder andbuild.rs
files from a freshly generated project
usingcargo-odra
at version at least0.1.0
. - Update
Cargo.toml
by removing features and adding [[bin]] sections (SeeCargo.toml
from generated project). - Update the code to reflect changes in the framework.
Full Changelog: 0.7.1...0.8.0