1. 19 Jan, 2021 1 commit
    • Andrew Jones's avatar
      [env] pass salt argument to instantiate host function (#599) · 1daf6a8e
      Andrew Jones authored
      * WIP
      
      * Add salt argument to instantiate call
      
      * Fix lang compilation
      
      * Fix salt to [u8; 4]
      
      * Make create builder generic over Salt
      
      * Use type state instead of ()
      
      * Rename salt to salt_bytes
      
      * Fmt
      
      * Apply review suggestion: type state enum
      
      * Apply review suggestion: separate impl block for salt_bytes getter
      
      * Apply review suggestion: take salt bytes directly to avoid copy overhead
      
      * Apply review suggestion: use Salt type state instead of leftover concrete type
      
      * Apply review suggestion: fix doc tests
      1daf6a8e
  2. 13 Jan, 2021 3 commits
  3. 12 Jan, 2021 1 commit
    • Hero Bird's avatar
      Implement ink! chain extensions (#592) · 59a7f5ed
      Hero Bird authored
      
      
      * add new tests for #[ink(namespace = ..)] and #[ink(selector = ..)] attrs
      
      * [lang] implement new errors for ink! attributes: namespace, selector
      
      * add #[ink(extension = N: u32)] attribute
      
      * apply rustfmt
      
      * [lang] add initial implementation of chain extension proc. macro
      
      * [lang] rename AttributeArg -> AttributeFrag
      
      * rename AttributeFrag::kind field to arg
      
      * rename AttributeArgKind -> AttributeArg
      
      Also introduce a new AttributeArgKind type and AttributeArg::kind method.
      
      * [lang] apply rustfmt
      
      * add Display impl for AttributeArgKind
      
      * [lang] use AttributeArgKind in sanitize_attributes and ensure_first methods
      
      * [lang/ir] improve error reporting for duplicate ink! attributes
      
      * [lang/ir] refactoring and improvements to chain extension IR impl
      
      * [lang/ir] add tests for IR implementation of chain extensions
      
      * [lang/ir] remove some code dupe
      
      * [lang/ir] add getters to ChainExtension
      
      * [lang/ir] add re-exports for ChainExtension definitions
      
      * [lang/codegen] add initial impl for ChainExtensions
      
      * [env] add ChainExtension assoc type to the Environment trait
      
      * [lang] initial impl to make it possible to use chain extension syntax
      
      * [env] improvements to chain extensions API
      
      Also removes the unstable crate feature guarding the feature.
      
      * [lang/macro] add UI test for chain extension
      
      * [lang/macro] register new UI test
      
      * [lang/codegen] fix some codegen bugs with new chain extension feature
      
      * [lang, env] apply rustfmt
      
      * [lang/ir] apply clippy suggestions and fix outdated error messages
      
      * [lang/ir] fix some tests and incorrect error messages
      
      * [examples] apply clippy suggestion
      
      * add ErrorCode to ink! chain extension trait
      
      * add FromStatusCode trait to ink_lang
      
      * add #[ink(expect_output)] and #[ink(expect_ok)] attributes
      
      Also add their handling for the #[ink::chain_extension] proc. macro.
      
      * add ink_lang::IsResultType trait
      
      * add ChainExtensionMethodInputs iterator
      
      * hide docs for IsResultType trait
      
      * add some docs to chain extension codegen
      
      * implement expect_ok and expect_output where bounds in codegen
      
      * apply code review suggestions by (cmichi)
      
      * add ReturnCode::into_u32 getter
      
      * change return type of ext::call_chain_extension: RetCode -> u32
      
      Chain extensions do not follow the general scheme of error return code because they have their own set of errors that is custom defined by the author of the chain extension.
      
      * [lang] add ChainExtension trait
      
      Not yet sure we need it.
      
      * change EnvBackend::call_chain_extension signature
      
      The new signature is much more low-level and supports all the different ways to call a chain extension method.
      This commit already implements the chain extension call on the on-chain environment.
      More work needs to be done to properly support this for the off-chain environment.
      
      * remove old high-level API for calling chain extension methods
      
      * [env] add new high-level module to handle chain extension calls
      
      * rename ChainExtensionMethodInstance -> ChainExtensionMethod
      
      * [env] add doc examples to chain extension method API
      
      * apply rustfmt
      
      * [env] clippy: allow complex type in ChainExtensionMethod type state
      
      * silence some warnings
      
      * re-export IsResultType from ink_lang crate
      
      * [lang] remove FromStatusCode trait
      
      This trait already exists in the ink_env crate.
      
      * [lang] update codegen for chain extensions
      
      Not yet done but close.
      
      * [lang] update simple chain extension test
      
      Compiles now again.
      
      * apply rustfmt
      
      * update some license headers
      
      * [env] fix where bound
      
      * extend chain extension test case to cover all cases
      
      * add messages for read_small, access and unlock_access
      
      * fix some bugs with chain extension method signatures in test
      
      * fix some bugs and docs in chain extension test
      
      * fix test
      
      * update quickcheck to 1.0
      
      * [env] implement chain extension calling for off-chain env
      
      The new interface is much more lower-level and it is still impossible to use chain state from within the chain extension call. The latter must be fixed as soon as the off-chain environment receives its rework.
      
      * apply rustfmt
      
      * add docs to #[ink::chain_extension] proc. macro
      
      * rename env_types -> env everywhere
      
      * make doc examples for #[ink::chain_extension] compile
      
      * add yet another technical limitation
      
      * make link to simple.rs test case more stable (point to revision)
      
      * fix docs (code suggestion)
      
      Co-authored-by: Michael Müller's avatarMichael Müller <michi@parity.io>
      
      * fix docs (code suggestion)
      
      Co-authored-by: Michael Müller's avatarMichael Müller <michi@parity.io>
      
      * fix docs (code suggestion)
      
      Co-authored-by: Michael Müller's avatarMichael Müller <michi@parity.io>
      
      * fix docs (code suggestion)
      
      Co-authored-by: Michael Müller's avatarMichael Müller <michi@parity.io>
      
      * add dev. note to Backend::call_chain_extension
      
      * fix docs example (code suggestion)
      
      Co-authored-by: Andrew Jones's avatarAndrew Jones <ascjones@gmail.com>
      
      * [env] chain extension: make doc examples/tests compile
      
      * fix some doc comments according to review suggestions
      
      * review suggestion: telling -> meaning
      
      * fix docs (review suggestion)
      
      Co-authored-by: Andrew Jones's avatarAndrew Jones <ascjones@gmail.com>
      
      * fix docs (review suggestion)
      
      Co-authored-by: Andrew Jones's avatarAndrew Jones <ascjones@gmail.com>
      
      * improve docs (review suggestion)
      
      Co-authored-by: Andrew Jones's avatarAndrew Jones <ascjones@gmail.com>
      
      * rename chain extension test file
      
      * analyse_error_code add doc comments for possible errors
      
      * rename expect_ok -> returns_result and expect_output -> handle_status
      
      Some examples and docs might be invalidated or outdated.
      
      * [lang/ir] improve error reporting for ink! namespace attribute with missing parameter
      
      * [lang/*] implement new handle_status and returns_result attributes
      
      * [env] apply rustfmt
      
      Co-authored-by: Michael Müller's avatarMichael Müller <michi@parity.io>
      Co-authored-by: Andrew Jones's avatarAndrew Jones <ascjones@gmail.com>
      59a7f5ed
  4. 05 Jan, 2021 1 commit
  5. 04 Jan, 2021 1 commit
  6. 28 Dec, 2020 1 commit
  7. 16 Dec, 2020 1 commit
  8. 14 Dec, 2020 1 commit
  9. 11 Dec, 2020 1 commit
  10. 09 Dec, 2020 1 commit
  11. 08 Dec, 2020 1 commit
  12. 07 Dec, 2020 1 commit
  13. 04 Dec, 2020 2 commits
    • Michael Müller's avatar
      [ci] Test workspace docs (#602) · 5115146d
      Michael Müller authored
      * Revert me: Provoke doc failures
      
      * [ci] Test workspace docs
      
      * Revert "Revert me: Provoke doc failures"
      
      This reverts commit cbc45cf0.
      
      * Fix spaces
      
      * Revert me: Provoke doc failures and see if `exit 1` can be removed
      
      * Revert "Revert me: Provoke doc failures and see if `exit 1` can be removed"
      
      This reverts commit d0e0878e.
      
      * Supply `--all-features` to make artifacts reusable
      
      * Use `RUSTDOCFLAGS=-Dwarnings`
      
      * Revert me: Provoke doc failures
      
      * Revert "Revert me: Provoke doc failures"
      
      This reverts commit e0152681.
      
      * Reuse artifacts of `docs` job for `publish-docs`
      
      * Two spaces
      
      * Two spaces
      
      * Remove `test`, needs already covers this
      
      * Revert me: Test if `publish-docs` job works
      
      * Fix target dir path
      
      * Revert "Revert me: Test if `publish-docs` job works"
      
      This reverts commit 7554b987.
      
      * Revert me: Publish for testing
      
      * Revert "Revert me: Publish for testing"
      
      This reverts commit 3b0ba224.
      5115146d
    • Denis_P's avatar
      Nightly tested ci image (#603) · 1758e45a
      Denis_P authored
      * CI: nightly tested ci image [skip ci]
      
      * CI: add comment
      1758e45a
  14. 02 Dec, 2020 4 commits
    • Michael Müller's avatar
      [storage] Implement `Drop` for `Pack` (#600) · bad0c88b
      Michael Müller authored
      * [storage] Implement `Drop` for `Pack`
      
      * Implement comments
      
      * Make `new_with_key` non-public
      
      * Remove `new_with_key`
      bad0c88b
    • 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
    • Michael Müller's avatar
      Update to new `cargo-contract` cli (#575) · 7d330a60
      Michael Müller authored
      * Update to new cargo-contract cli commands
      
      * Fail `build-all` if one of the individual builds fails
      
      * Improve text
      
      * Remove mentions of new .contract file
      
      * Revert "Remove mentions of new .contract file"
      
      This reverts commit a3c959ac.
      
      * Improve readme text
      7d330a60
  15. 27 Nov, 2020 1 commit
    • Michael Müller's avatar
      Make `Lazy::Drop` always clear up all its storage (#597) · 2100fa7c
      Michael Müller authored
      * Make `Lazy::Drop` always clear up all its storage
      
      * Fix typo: yet ➜ get
      
      * Fix macro import
      
      * Make tests off-chain since they interact with storage now due to Drop
      
      * Make use of `REQUIRES_DEEP_CLEAN_UP`
      
      * Clear up all footprint cells
      
      * Fix typo: yet ➜ get
      
      * Fix case
      
      * Macro ➜ fn
      2100fa7c
  16. 26 Nov, 2020 1 commit
  17. 23 Nov, 2020 2 commits
    • Michael Müller's avatar
      Make logo visible in GitHub App (#582) · dd890b89
      Michael Müller authored
      * Fix naming
      
      * Make logo visible in dark mode
      
      * Close div correctly
      
      * Add glow version of logo
      
      * Tune height
      
      * Bring centering back
      
      * Revert "Bring centering back"
      
      This reverts commit ab05c59b.
      
      * Revert "Close div correctly"
      
      This reverts commit 38a79257.
      dd890b89
    • Michael Müller's avatar
      Some minor fixes (#587) · fd541250
      Michael Müller authored
      * Fix typo
      
      * Fn does not need to take mutable self
      
      * Fix naming: #[ink(implemenetation)] ➜ #[ink(impl)]
      
      * #[ink(storage)] can not be applied to enum
      
      * Fix typo: accesses ➜ accessed
      
      * Fix typo: sturctures ➜ structures
      fd541250
  18. 17 Nov, 2020 2 commits
  19. 13 Nov, 2020 1 commit
  20. 12 Nov, 2020 1 commit
    • Michael Müller's avatar
      Simplify regression test (#574) · b4d27fe9
      Michael Müller authored
      * Simplify regression test
      
      * Add asserts for Some/None
      
      * Add assertions for expected ptr
      
      * Introduce second regression test
      
      * Introduce second regression test
      
      * Fix syntax
      b4d27fe9
  21. 11 Nov, 2020 1 commit
    • Michael Müller's avatar
      Make CI check format of UI tests (#534) · fe82d173
      Michael Müller authored
      * [ci] Check format of UI tests as well
      
      * [lang] Apply our formatting guidelines to UI tests
      
      * [ci] Make Gitlab happy
      
      * [ci] Remove superfluous space
      
      * [ci] Output rustfmt version
      
      * [ci] Tune rustfmt params
      
      * Remove todo's
      
      * Migrate erc721 ui test contract to recent example contract
      
      * Remove --version command used to debug
      
      * Apply cargo fmt
      
      * .gitlab-ci.yml formatting
      
      * Add main fn
      
      * Remove todo from stderr expect
      
      * Adapt fixtures
      
      * Revert "Adapt fixtures"
      
      This reverts commit 174c012e.
      
      * Adapt fixtures
      fe82d173
  22. 10 Nov, 2020 4 commits
  23. 06 Nov, 2020 1 commit
  24. 04 Nov, 2020 2 commits
    • Michael Müller's avatar
      Bring discord badge to life (#567) · eee8dd1d
      Michael Müller authored
      * Switch to discord badge with number of users in it
      
      * Make matrix badge consistent with discord badge
      eee8dd1d
    • Michael Müller's avatar
      [lang] Improve invalid selector error (#561) · 0eca603f
      Michael Müller authored
      * [lang] Improve invalid selector message
      
      * [lang] Improve span
      
      * [lang] Return syn::Error instead of panicking
      
      * Make clippy happy
      
      * [lang] Reduce code dup with non_hex_err
      
      * [lang] Rename fn
      
      * [lang] Fix err functions
      
      * [lang] Add comments
      
      * [lang] Remove unnecessary lifetime
      0eca603f
  25. 03 Nov, 2020 2 commits
    • Michael Müller's avatar
      Readme makeover (#560) · c85cb782
      Michael Müller authored
      * Fix typo: anonmyous ➜ anonymous
      
      * Readme makeover
      
      * Improve titles
      
      * Migrate to table
      
      * Remove default() impl
      
      * Remove default() impl
      
      * Fix id
      
      * Update table
      
      * Update title
      
      * Shorten example instructions
      
      * Link examples
      
      * Link to lines
      
      * Link to lines
      
      * Link to lines
      c85cb782
    • Michael Müller's avatar
      Add demonstration how to mock transferred_balance (#555) · a35f76ac
      Michael Müller authored
      * [chores] implicitely ➜ implicitly
      
      * [examples] Add demonstration of how to mock transferred_balance
      
      * [lang] Fix clippy 'needless_lifetimes'
      
      Error was:
      
      explicit lifetimes given in parameter types where they could
      be elided (or replaced with `'_` if needed by type declaration)
      
      * [lang] Apply cargo fmt
      
      * [examples] Fix param
      a35f76ac
  26. 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
  27. 28 Oct, 2020 1 commit
    • Michael Müller's avatar
      Fix fuzz setup (#549) · aedd7561
      Michael Müller authored
      * Execute fuzz stage on this branch, remove variable
      
      * Move fuzz to first stage
      
      * Fix ALL_CRATES
      
      * Undo debugging changes
      
      * Reduce number of tests for debugging
      
      * Debug further
      
      * Debug further
      
      * Debug further
      
      * Debug further
      
      * Improve curl
      
      * Fix markdown
      
      * Exit 1 after fuzz tests failed
      
      * Revert debugging changes
      
      * Improve readability
      aedd7561