Skip to content

Releases: odradev/odra

Odra 1.3.0: High Water

20 Sep 12:43
523d3dd
Compare
Choose a tag to compare

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

30 Jul 12:17
6dba46d
Compare
Choose a tag to compare

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

17 Jun 09:42
5d2ea53
Compare
Choose a tag to compare

Added

  • Support for CSPR.cloud's auth token.
  • new method for Address to create an address from a string.
  • transfer function in the HostEnv allowing native token transfers between accounts.
  • Reverse lookup feature for CEP78.
  • Addressable trait for types that can be converted to Address.

Updated

  • Fix get_block_time in casper-rpc-client.
  • Calling try_ functions in the livenet context now returns a Result instead of panicking.
  • Improve error messages in the livenet context.
  • Update HostEnv functions accept Addressable instead of Address.

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 - 💯

23 May 14:22
7ddc7cd
Compare
Choose a tag to compare

Added

  • Add try_deploy function to the Deployer trait, which allows deploying a contract and returning an error if the deployment fails.
  • Add Cep18 to odra-modules - a standard for fungible tokens.
  • Add Cep78 to odra-modules - a standard for non-fungible tokens.
  • Add cep18 and cep78 templates.

Changed

  • Update casper crates to the latest versions.
  • Fix minor bugs in generated code.
  • Fix events collection in submodules.

AI Summary

Full Changelog: 0.9.1...1.0.0

Odra 0.9.1 - Mahalo

15 Apr 09:42
2edf85d
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.9.0...0.9.1

Odra 0.9.0 - Aloha

02 Apr 08:32
ca3d8f8
Compare
Choose a tag to compare

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

01 Mar 10:19
6e9fb7a
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.8.0...0.8.1

Odra 0.8.0: Business Class

06 Feb 15:34
6c92428
Compare
Choose a tag to compare

Changed

  • Replaced contract_env:: with self.env() in the contract context (of type ContractEnv).
    For example, instead of contract_env::caller() use self.env.caller().
  • Replaced test_env with odra_test::env() in the test context (of type HostEnv).
  • 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>> use allowances: Mapping<(Address, Address), U256>.
  • Ref has been divided into two: HostRef and ContractRef 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 now balance_of(address: &Address).
  • Modules needs to be wrapped in SubModule<> when used in another module.
  • HostRef (formerly Ref) methods parameters accept values even if endpoints expect references.
  • unwrap_or_revert and unwrap_or_revert_with now require &HostEnv as a first parameter.
  • Variable has been renamed to Var.
  • 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 to Vec<U256>
    in on_erc1155_batch_received method.
  • get_block_time() now returns u64 instead of wrapped type Blocktime(u64).
  • The name property in Odra.toml is not required anymore.
  • odra-casper-backend crate is now odra-casper-wasm-env
  • odra-mock-vm crate is now odra-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 named init.
  • Removed emit() method from events. Use self.env.emit_event(event) instead.
  • Removed assert_events! macro. Use env.emitted_event and similar methods instead.
  • Removed native_token_metadata() and its respective structs.
  • Removed assert_exception! macro. Use try_ prefix for endpoints instead. It returns a Result
    which can be used with a regular assert_eq! macro.`
  • Removed odra(using) macro.
  • Removed default() method from Deployer. Use init() instead.
  • Removed StaticInstance and DynamicInstance traits. Use Module instead.
  • Removed Node trait.
  • Removed odra-types, odra-ir, odra-codegen, odra-casper-backend, odra-casper-shared, odra-utils crates.
  • Removed OdraEvent trait, odra reexports casper_event_standard crate instead.

Added

  • last_call() in test env with ContractCallResult 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 providing HostEnv for testing purposes.
  • odra-core crate providing framework core functionalities.
  • odra-casper-rcp-client crate providing CasperClient 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 of InitArgs for empty/none (no constructor) arguments.

Very Brief Upgrade Path

  • Copy bin folder and build.rs files from a freshly generated project
    using cargo-odra at version at least0.1.0.
  • Update Cargo.toml by removing features and adding [[bin]] sections (See Cargo.toml from generated project).
  • Update the code to reflect changes in the framework.

Full Changelog: 0.7.1...0.8.0

Odra 0.7.1: Bangkok

13 Dec 09:18
dff1379
Compare
Choose a tag to compare

Fixed

  • colored crate had to be fixed to a version 2.0.4 as 2.1.0 doesn't work with rust 1.69

Odra 0.7.0: Audio Drivers

07 Nov 16:37
Compare
Choose a tag to compare

Changed

  • no_std is now the default mode for WASM.
  • odra-types are the only types crate.

Removed

  • Removed odra-casper-types and odra-mock-vm-types.
  • Removed OdraType in favor of ToBytes and FromBytes traits.