1. 02 Dec, 2020 2 commits
    • Michael Müller's avatar
      Ensure topics are unique (#594) · 64eec2c2
      Michael Müller authored
      
      
      * Ensure topics are unique
      
      * Remove unavailable method
      
      * Fix salt appending in Wasm
      
      * Remove salt param
      
      * Add missing assignment
      
      * Update crates/lang/src/events.rs
      
      Co-authored-by: default avatarHero Bird <robin.freyler@gmail.com>
      
      * Add suggestions
      
      * Remove always inline
      
      * Fix event hashing in examples
      
      * Make nightly clippy happy
      
      * Remove unnecessary return param
      
      * Do not use internal type for hash calculation
      
      * Hide internal type from docs
      
      * Expose `PrefixedValue` from ink_env::topics
      
      * Apply cargo fmt
      
      * Apply cargo fmt
      
      * Apply comments
      
      * Apply comments
      
      * Apply comments
      
      Co-authored-by: default avatarHero Bird <robin.freyler@gmail.com>
      64eec2c2
    • Michael Müller's avatar
      Fix dead code (#596) · 8e8fe095
      Michael Müller authored
      * Remove dead impls
      
      * Remove dead code from test (subtract not implemented for Key)
      
      * Make nightly clippy happy
      8e8fe095
  2. 17 Nov, 2020 1 commit
  3. 30 Oct, 2020 1 commit
    • Michael Müller's avatar
      Add example which uses ext_transfer + ext_terminate (#554) · 89620e7d
      Michael Müller authored
      
      
      * [chores] Fix typo: invokation ➜ invocation
      
      * [chores] Fix typo: timstamp ➜ timestamp
      
      * [chores] Fix typo: ininitialized ➜ initialized
      
      * [env] Implement terminate_contract in off-chain env
      
      * [examples] Add lock-until
      
      * [env] Implement proper off-chain testing for ext_terminate
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarHero Bird <robin.freyler@gmail.com>
      
      * [env] Fix Environment type
      
      * [env] Derive Balance/AccountId from Environment
      
      * [env] Fix types in macro
      
      * [examples] Remove lock-until
      
      * [examples] Add contract-terminate
      
      * [examples] Add contract-transfer
      
      * [examples] Make clippy happy
      
      * [examples] Fix example name
      
      * [examples] Remove Default impls
      
      * [examples] Move macro to contract-terminate/test_utils
      
      * [env] Migrate macro to fn which gets Environment type param
      
      * [env] Add explanatory dev comment
      
      * [examples] Allow clippy::new_without_default
      
      Co-authored-by: default avatarHero Bird <robin.freyler@gmail.com>
      89620e7d
  4. 26 Oct, 2020 1 commit
  5. 21 Oct, 2020 1 commit
    • Andrew Jones's avatar
      [core] storage2::BinaryHeap (#481) · 75ad19a2
      Andrew Jones authored
      * BinaryHeap::new()
      
      * Failing FromIterator test
      
      * Dumb push impl
      
      * Dumb peek impl
      
      * Naive push implementation
      
      * Copy in some reference impls for inspiration
      
      * WIP: use storage2::Vec and implement pop
      
      * Fix sift_up
      
      * Fix sift_down
      
      * Test with heap from slice
      
      * Add pass through clear impl
      
      * Add storage trait impls
      
      * Add binary_heap bench, start experimentation
      
      # Conflicts:
      #	core/Cargo.toml
      
      * Add tests for push/pull from storage
      
      * Get basic bench working for pushing largest value
      
      * Fmt
      
      * Prevent storage from being cleared in test env
      
      * iter batched
      
      * Make inline setup to test consistency
      
      * Revert to iter_batch tests
      
      * Add populated cache benches
      
      * Fmt
      
      * Factor out bench push
      
      * Refactor benchmark loop on push
      
      * Configure warm-up and measurement times to improve consistency
      
      * Remove redundant test
      
      * Refactor push benches
      
      * Refactor push benches again
      
      * Add Pop benchmark
      
      * Fmt
      
      * Add some comments to the benchmarks
      
      * Remove some todos
      
      * Use iter_batched_ref
      
      * Fix pop benchmark name
      
      * Add test for worst case O(log n) push
      
      * Fmt
      
      * Add push test
      
      * Add peek and pop test
      
      * Fix up sift comments and log tests
      
      * Comments
      
      * Add Reverse wrapper type for min heaps
      
      * Fmt
      
      * Peek mut
      
      * Fmt
      
      * Add empty tests
      
      * Check complexity of pushing smallest value
      
      * Test drop clears cells
      
      * Fix stable build
      
      * Basic property test
      
      * Fix wasm build
      
      * Fmt
      
      * Derive Default, PartialEq, Eq
      
      * Add property test to feature
      
      * Fix doc links
      
      * Fmt
      
      * Remove commented out println
      
      * Avoid potential false positive
      
      * Add punctuation
      
      * Comments
      
      * Fmt
      
      * Move binary_heap to crates
      
      * Make it compile
      
      * Fix up doc test and benches
      
      * Fmt
      
      * Fix license headers
      75ad19a2
  6. 08 Oct, 2020 2 commits
    • Hero Bird's avatar
      Rename EnvTypes -> Env (and many other renamings) (#513) · 8edbfd28
      Hero Bird authored
      * [env] rename Env -> EnvBackend, TypedEnv -> TypedEnvBackend
      
      * [env] rename EnvError -> Error
      
      * [*] rename ink_env::EnvTypes -> Environment
      
      Namely rename:
      ink_env::EnvTypes -> Environment
      ink_env::DefaultEnvTypes -> DefaultEnvironment
      
      * [*] update cfg-if dependency 0.1 -> 1.0
      
      * [alloc] rename ink_alloc -> ink_allocator
      
      * [env] forgot to rename in lib.rs
      
      * [env, lang] fix some bugs with ink_env::EnvError -> Error renaming
      
      * [ci] adjust renaming of ink_alloc -> ink_allocator
      
      * [env] apply rustfmt
      
      * [lang/macro] re-enable disabled UI test
      
      * [examples] DNS: apply rustfmt
      
      * [examples] ERC-20, ERC-721: apply rustfmt
      8edbfd28
    • Hero Bird's avatar
      Implement event topic code generation (#510) · 6f701e50
      Hero Bird authored
      * [env] remove unnecessary copy of no longer used mod.rs
      
      * [env, lang] make crates compile again under newest Rust nightly
      
      * [env] on-chain: enhance ScopedBuffer
      
      Add append_encoded and take_appended methods.
      
      * [env] remove old Topics trait
      
      * [env] add new Topics infrastructure
      
      * [env] implement new Topics infrastructure for on/off chain environments
      
      * [env] remove dummy event
      
      * [env] make env::topics::state mod externally accessible
      
      It stays hidden in docs.
      
      * [lang/codegen] generate proper Topics impls for ink! events
      
      * [env] apply rustfmt
      
      * [lang/codegen] fix codegen for events without topics
      
      * [lang/macro] fix UI test
      
      * [env] off-chain: clean-up slightly
      
      * [examples] ERC-20: improve tests for event topics
      
      * [env] remove commented-out line
      
      * [lang/codegen] include event signature into topics
      
      This is the same as it is done for non-anonymous Solidity events.
      The signature of an ink! event is: ContractName::EventName.
      E.g. for ERC-20's Transfer event it is: Erc20::Transfer
      
      * [examples] ERC-20: adjust test for changes with event topics
      
      * [lang/ir] add support for anonymous events
      
      * [lang/codegen] add codegen for anonymous events
      
      * [lang/ir] apply rustfmt
      
      * [lang/macro] comment out failing unit test
      
      Fails due to rustc version mismatch and some recent error display change.
      
      * [examples] apply rustfmt
      6f701e50
  7. 02 Oct, 2020 1 commit
    • Hero Bird's avatar
      Minor API surface clean-up (#502) · 4770498c
      Hero Bird authored
      * [env] remove crate-level re-exports for the hash module
      
      * [env] rename ink_env::println -> debug_println
      
      This makes the usage intent clearer.
      
      * [lang] remove deprecated method
      
      * [lang] hide all definitions that are only needed for codegen purposes
      
      * [lang] remove False, move True
      
      * [lang] remove unnecessary where bounds
      
      * [lang] add EnvAccess forwarding for built-in crypto hashes
      
      * [README] add ink_lang doc link
      
      * [env] fix on-chain compilation
      
      * [lang] apply clippy suggestion
      4770498c
  8. 01 Oct, 2020 1 commit
    • Hero Bird's avatar
      Split ink_core crate into ink_env and ink_storage (#500) · cfe52e98
      Hero Bird authored
      * [*] split ink_core into ink_env and ink_storage
      
      The workspace does not yet compile!
      
      * [env] make compile again
      
      * [env] fix doc tests
      
      * [storage] make crate compile again
      
      * [env] fix some doc comment links
      
      * [README] flipper example: remove unused import
      
      * [storage/derive] fix compilation of generated code
      
      * [README] add ink_storage and ink_env doc links
      
      * [env, primitives, storage] fix docs
      
      * [lang] make compile again
      
      * [lang/codegen] use absolute paths in #[ink::test] proc. macro
      
      * [examples] make compile again
      
      * [*] apply rustfmt
      
      * [env] remove unneeded dependencies
      
      * [storage] remove all unneeded dependencies and crate features
      
      * [*] update outdated dependencies
      
      * [env, lang] remove unused dependencies
      
      * [*] fix comments
      
      * [*] fix some intra doc links
      
      * [ci] adjust to split ink_env and ink_storage crates
      
      * [ci] forgot to handle split ink_env and ink_storage in docs
      
      * [storage] fix fuzz tests
      
      * [examples] apply rustfmt
      
      * [examples] apply rustfmt (ERC-721)
      cfe52e98