1. 04 Oct, 2021 1 commit
    • Robin Freyler's avatar
      Implement selector_id!, selector_bytes! and blake2x256! macros (#947) · bd4b51e3
      Robin Freyler authored
      * add selector_id! and selector_bytes! proc macros
      
      * implement blake2x256! macro
      
      * re-export blake2x256! macro from ink_lang crate
      
      * apply rustfmt
      
      * add BLAKE2b to hunspell dictionary
      
      * add UI tests for blake2x256! macro
      
      * improve span for non-literal inputs to blake2x256! macro
      
      * add non-literal input failure UI test to blake2x256! macro
      
      * improve error span for non-literal selector_{id,bytes}! macro inputs
      
      * rename UI test blake2x256 -> blake2x256_macro
      
      * rename UI test
      
      * add UI tests for selector_id! proc. macro
      
      * fix UI test
      
      * fix UI test expectation
      
      * add UI tests for seletor_bytes! macro
      
      * make flaky and broken codecov CI happy again ...
      bd4b51e3
  2. 23 Sep, 2021 2 commits
  3. 22 Sep, 2021 2 commits
    • Robin Freyler's avatar
    • Michael Müller's avatar
      Fix code coverage (#917) · 511b9c68
      Michael Müller authored
      * Add `-Clink-dead-code`
      
      * Test trait cross-call only when not measuring code coverage
      
      Otherwise a linker error will happen due
      to `__ink_enforce_error` being included.
      
      * Fix `clippy::derivable_impls`
      
      * Fix `dead_code`
      
      The `struct` is only a public-facing API.
      
      * Fix yaml
      
      * Remove `allow(dead_code)`
      
      * Actually use `$POLL_SLEEP`
      
      * Produce `unreachable!` instead of linker error for `codecov` CI stage
      
      * Move `if` condition outside of `quote`
      
      * Improve macro hygiene
      
      * Reduce code duplication
      511b9c68
  4. 21 Sep, 2021 5 commits
    • Robin Freyler's avatar
      Misc cleanups in ink! codegen (#935) · b4e2781c
      Robin Freyler authored
      * remove some duplicated AsRef impl code in generators
      
      * improve #[ink::test] macro hygiene and error message upon failure
      
      * import standard ink! traits anonymously in codegen
      
      * modernize and improve macro hygiene of metadata codegen
      
      * modernize and simplify and improve macro hygiene of storage codegen
      
      * extend selector_works unit test
      
      * fix minor error in item impl error message
      b4e2781c
    • Robin Freyler's avatar
      Move ink_lang_macro UI tests into macro-specific folders (#934) · 87867ef8
      Robin Freyler authored
      * move ink_lang_macro UI tests into macro-specific folders
      
      * fix GitLab CI formatting pass
      
      * migrate back to a single trybuild test case
      
      This is because our CI currently fails if we have multiple test cases.
      87867ef8
    • Robin Freyler's avatar
      Refactor and modernize dispatch codegen (#933) · 0270add0
      Robin Freyler authored
      * implement Display for ink_lang::Error
      
      * re-export HexLiteral trait from ink_lang_ir crate
      
      * use big-letters for hex-encoded message and constructor identifiers in codegen
      
      * improve panic messages in dispatch codegen for call and deploy fns
      
      * improve macro hygiene in dispatch codegen
      
      * add ir::Selector::into_be_u32 method
      
      * improve and modernize dispatch selector namespace codegen
      0270add0
    • Robin Freyler's avatar
      Check namespace argument is identifier (#931) · 41b0a1c0
      Robin Freyler authored
      * check that argument in #[ink(namespace = "argument")] is a Rust identifier
      
      * add UI tests for #[ink(namespace = "..")] ink! property
      
      # Conflicts:
      #	crates/lang/macro/tests/compile_tests.rs
      #	crates/lang/macro/tests/ui/fail/N-01-namespace-invalid-identifier.rs
      #	crates/lang/macro/tests/ui/fail/N-01-namespace-invalid-identifier.stderr
      #	crates/lang/macro/tests/ui/fail/N-02-namespace-invalid-type.rs
      #	crates/lang/macro/tests/ui/fail/N-02-namespace-invalid-type.stderr
      #	crates/lang/macro/tests/ui/fail/N-03-namespace-missing-argument.rs
      #	crates/lang/macro/tests/ui/fail/N-03-namespace-missing-argument.stderr
      
      * fix error message for non-identifier namespace argument
      41b0a1c0
    • Robin Freyler's avatar
      09ec050e
  5. 20 Sep, 2021 2 commits
    • Robin Freyler's avatar
      Expand selectors as hex-encoded literals in metadata (#927) · 725c2f70
      Robin Freyler authored
      * add HexLiteral utility trait to expand hex-encoded integer literals
      
      * add ir::Selector::hex_lits method
      
      * expand into hex-encoded integer literals for metadata selectors
      
      * simplify Selector::hex_lits method using array::map API
      
      * add unit test for Selector::hex_lits method
      725c2f70
    • Robin Freyler's avatar
      Make #[ink(selector = ..)] take a u32 parameter instead of a string (#928) · c9a97bbe
      Robin Freyler authored
      * make #[ink(selector = ..)] take an integer instead of a string
      
      Also warn about deprecation if a user still uses the old string parameter.
      
      * update tests for new selector int parameter
      
      * update contract examples for new selector int parameter
      
      * remove unused regex dependency from ink_lang_ir
      
      Also remove unnecessary regex dependency from ink_lang_codegen
      
      * update README for new selector int parameter
      
      Also update namespace parameter description.
      
      * update preliminary release notes
      
      * update spellcheck dict
      c9a97bbe
  6. 09 Sep, 2021 1 commit
  7. 06 Sep, 2021 1 commit
  8. 02 Sep, 2021 1 commit
  9. 25 Aug, 2021 1 commit
  10. 12 Aug, 2021 1 commit
  11. 05 Aug, 2021 1 commit
    • Michael Müller's avatar
      Run clippy with `--all-targets` (#884) · 4b909706
      Michael Müller authored
      * Add clippy flag `--all-targets`
      
      * Fix `redundant_closure`
      
      * Fix `redundant_clone`
      
      * Fix `clone_on_copy`
      
      * Fix `needless_borrow`
      
      * Fix `bool_assert_comparison`
      
      * Fix `len_zero`
      
      * Fix `stable_sort_primitive`
      
      * Forward feature
      
      * Allow `type_complexity`
      
      * Fix `unnecessary_mut_passed`
      
      * Fix `manual_map`
      
      * Fix `match_like_matches_macro`
      
      * Remove duplicate test
      
      * Fix `new_without_default`
      
      * Fix `match_ref_pats`
      
      * Allow clippy rules for  tests
      
      * Fix `unit_arg`
      
      * Apply `cargo fmt`
      
      * Add explanatory comments
      
      * Remove `--all-targets` for Wasm tests
      
      * Fix `or_fun_call`
      
      * Fix `bool_comparison`
      
      * Fix `needless_collect`
      
      * Revert "Forward feature"
      
      This reverts commit 472c50ed.
      
      * Fix `bool_assert_comparison`
      
      * Deactivate test because of feature issue with dev-dependencies
      
      * Add flag
      
      * Fix `unique_topics` tests
      
      * Allow `clippy:bool_assert_comparison`
      
      * Revert "Fix `bool_assert_comparison`"
      
      This reverts commit bceb2dc2.
      
      * Revert "Fix `bool_comparison`"
      
      This reverts commit 02960f98.
      
      * Fix flags positioning
      
      * Add comment for clarification
      
      * Fix comparison
      
      * Do not check all targets for target = wasm32
      
      * Adapt `check-workspace.sh` with clippy flag
      
      * Add clarification comment
      
      * Ignore test
      
      * Revert `CLIPPY_FLAGS` hack
      
      * Link ink! issue
      
      * Fix `assert`'s
      
      * Fix `assert`'s
      4b909706
  12. 22 Jul, 2021 1 commit
  13. 19 Jul, 2021 1 commit
  14. 13 Jul, 2021 2 commits
  15. 08 Jul, 2021 2 commits
  16. 02 Jul, 2021 1 commit
    • Michael Müller's avatar
      Add example usage comments to `EnvAccess` methods (#797) · da5a1247
      Michael Müller authored
      * Add example usage comments to env methods
      
      * Remove superfluous line
      
      * wip
      
      * Remove debug code
      
      * Make doc comment examples compile
      
      * Remove superfluous line
      
      * Surround with complete contract code
      
      * Experiment with macro to reduce code duplication
      
      * Revert "Experiment with macro to reduce code duplication"
      
      This reverts commit f7319126
      
      .
      
      * Add complete contract code in doc tests
      
      * Remove unnecessary `[dev-dependencies]`
      
      * Improve code in doc tests
      
      * Fix doc tests
      
      * Improve code appearance
      
      * Add better doc test examples
      
      * Make `gas` be of type `u64` instead of `Balance`
      
      * Make `gas` be of type `u64` instead of `Balance`
      
      * Make `gas` be of type `u64` instead of `Balance`
      
      * Apply suggestions from code review
      Co-authored-by: default avatarRobin Freyler <robin.freyler@gmail.com>
      
      * Add simple access permission contract
      
      * Fix syntax
      Co-authored-by: default avatarRobin Freyler <robin.freyler@gmail.com>
      da5a1247
  17. 25 Jun, 2021 1 commit
    • Hernando Castano's avatar
      Update Spelling List (#828) · 98bf5a99
      Hernando Castano authored
      * Add `refcount` and `postfix` as real words
      
      Also sorts the spellcheck dictionary for your viewing pleasure
      
      * Fix a couple of typos
      
      * Nightly RustFmt
      
      Sorry, I have it set to stable by default
      98bf5a99
  18. 17 Jun, 2021 1 commit
  19. 09 Jun, 2021 3 commits
  20. 27 May, 2021 1 commit
    • Michael Müller's avatar
      Implement `seal_rent_status` (#798) · 2310400c
      Michael Müller authored
      * Implement `seal_rent_status`
      
      * Add `at_refcount: Option<u32>` param
      
      * Fix param
      
      * Improve `at_refcount` comment
      
      * Replace `u32` with `core::num::NonZeroU32`
      2310400c
  21. 26 May, 2021 1 commit
    • Michael Müller's avatar
      Implement `seal_rent_params` (#755) · cbf08a02
      Michael Müller authored
      * Fix typo
      
      * Add `seal_rent_params`
      
      * Make `rent_params` only available on `ink-unstable`
      
      * wip
      
      * wip
      
      * Wrap `seal_rent_params` in `__unstable__`
      
      * Add `rent_params` to experimental off-chain env
      
      * Fix return type
      
      * Remove comments
      
      * Remove debugging code
      
      * Remove `ink-unstable` feature
      cbf08a02
  22. 25 May, 2021 1 commit
  23. 10 May, 2021 1 commit
    • Michael Müller's avatar
      Implement MVP for new off-chain testing engine (#712) · 1a19f937
      Michael Müller authored
      * Add `engine` crate
      
      * Add `env_types` crate
      
      * Adapt `env`, `lang` and `storage`
      
      * Adapt examples
      
      * Adapt CI
      
      * Symlink license and readme
      
      * Throw `TypedEncoded` out of `engine`
      
      * Improve Erc20
      
      * Bump versions to rc3
      
      * Fix clippy error: Manual implementation of `Option::map` (#717)
      
      * Implement comments
      
      * Fix yml
      
      * Improve structure
      
      * Add tests
      
      * Fix function signature
      
      * Get rid of `engine`s singleton
      
      * Revert instantiate stuff
      
      * Implement review comments
      
      * Make `Storage` non-generic
      
      * Improve API for emmitted events
      
      * Migrate to `panic_any`
      
      * Clean up import
      
      * Import `panic_any`
      
      * Implement comments
      
      * Fix param
      
      * Use type
      
      * Store balances in chain storage
      
      * Fix tests
      
      * Use individual storage per contract
      
      * Implement comments
      1a19f937
  24. 21 Apr, 2021 1 commit
    • Michael Müller's avatar
      Fix `Greeter` and run documentation tests in CI (#773) · c2e43fc6
      Michael Müller authored
      * Run documentation tests in CI
      
      * Use `format` from `prelude`
      
      The contract build will fail otherwise due to
      the usage of `std::string::String` because of
      `std::format`.
      
      * Remove superfluous mutable
      
      * Reduce amount of fuzz runs
      
      The CI run already takes quite long and I don't think
      it makes that much difference if we reduce the amount
      of runs. The bugs we catched so far were always catched
      with way less runs than even this new number.
      
      * Run documentation tests as part of `test` stage
      c2e43fc6
  25. 19 Apr, 2021 1 commit
  26. 16 Apr, 2021 1 commit
  27. 07 Apr, 2021 1 commit
  28. 01 Apr, 2021 1 commit
  29. 19 Mar, 2021 1 commit