- 02 Aug, 2021 1 commit
-
-
Hernando Castano authored
-
- 30 Jul, 2021 1 commit
-
-
Michael Müller authored
* Improve language * Add test with mocked chain extension * Export off-chain trait `ChainExtension` * Add missing space * Remove unequal assert
-
- 28 Jul, 2021 1 commit
-
-
Alexander Theißen authored
* Force the `DEBUG_ENABLED = enabled` code to be executed when RPC is used * Fix clippy * Flip the conditional
-
- 22 Jul, 2021 2 commits
-
-
Michael Müller authored
* Utilize `--recursive` instead of loop * Increase verbosity level * Add missing words to dictionary
-
Michael Müller authored
* Add `Fixed` entry for #842 * Replace `3.0.0-rc3` with `3.0.0-rc4` * Add bump allocator to release notes
-
- 21 Jul, 2021 1 commit
-
-
Michael Müller authored
* Add fuzz tests for `StorageVec::binary_search*` * Decrease number of fuzz tests which are run We found that bugs are usually already found with low numbers. * Apply suggestions from code review Co-authored-by:
Hernando Castano <HCastano@users.noreply.github.com> * Improve expect * Fix variable naming Co-authored-by:
Hernando Castano <HCastano@users.noreply.github.com>
-
- 20 Jul, 2021 2 commits
-
-
Hernando Castano authored
* Add bump allocator skeleton * Implement `alloc` for our bump allocator * Make the allocator usable globally * Remove unused `init()` function * Nightly RustFmt * Use global mutable static instead of Mutex This will reduce our use of dependencies which will hopefully reduce our final Wasm binary size. Also, apparently spinlocks aren't actually all that efficient. See: https://matklad.github.io/2020/01/02/spinlocks-considered-harmful.html * Stop assuming that memory is allocated at address `0` * Remove semicolon * Use correct address when checking if we're OOM * Remove unnecessary unsafe block * Return null pointers instead of panicking Panicking in the global allocator is considered undefined behaviour. * Use `checked_add` when getting upper limit memory address * Use `MAX` associated const instead of `max_value` * Inline `GlobalAlloc` methods * Turns out I can't early return from `unwrap_or_else`
🤦 * Rollback my build script hacks * Add initialization function to allocator * Add some docs * Make the bump allocator the default allocator * Allow bump allocator to be tested on Unix platforms * Remove unecessary checked_add * Add error messages to unrecoverable errors * Remove `init` function from allocator Instead we now request a new page whenver we need it, regardless of whether or not it's the first time we're allocating memory. * Try switching from `mmap` to `malloc` when in `std` env * Fix `is_null()` check when requesting memory * Stop requesting real memory for `std` testing Instead this tracks pages internally in the same way that the Wasm environment would. This means we can test our allocator implementation instead of fighting with `libc`. * Gate the global bump allocator when not in `std` * Allow for multi-page allocations * Update the module documentation * Override `alloc_zeroed` implementation * Forgot to update Wasm target function name * Appease the spellchecker * Use proper English I guess * Get rid of `page_requests` field * Explicitly allow test builds to use test implementation * All link to zero'd Wasm memory reference * Check that our initial pointer is 0 in a test * Add `cfg_if` branch for non-test, `std` enabled builds * Simplify `cfg_if` statement -
Michael Müller authored
error: constructor `lazy` has the same name as the type --> crates/storage/src/lazy/mod.rs:121:5 121 | / pub(crate) fn lazy(key: Key) -> Self { 122 | | Self { 123 | | cell: LazyCell::lazy(key), 124 | | } 125 | | } | |_____^ = note: `-D clippy::self-named-constructor` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#self_named_constructor
-
- 19 Jul, 2021 2 commits
-
-
Michael Müller authored
-
Michael Müller authored
-
- 13 Jul, 2021 4 commits
-
-
Michael Müller authored
* Revert me: Remove `codecov` CI check * Print `cargo-spellcheck` version
-
GreenBaneling | Supercolony authored
* Remove not used Salt * Updated unit test to cover case with code generation for trait. * Renamed seconds "new" constructor. Seems the same naming for constructors with different signature causes compilation error on linux platform. * Let's try to move trait definition into contract. Maybe it will resolve compilation error in CI. * Moved trait implementation to separate test. * Changed version of docker image to staging. Added `cc --version` in info section * Apply suggestions from code review Co-authored-by:
Michael Müller <mich@elmueller.net> Co-authored-by:
Michael Müller <mich@elmueller.net>
-
Michael Müller authored
* Prepare rc4 release notes * Improve language * Fix link * Fix spelling mistake * Remove duplicates of "the the"
-
Michael Müller authored
* Add missing words to dictionary * Fix grammar * Match only `callable's`
-
- 09 Jul, 2021 2 commits
-
-
Karel L. Kubat authored
* [storage] Implement binary_search * [storage] Add binary_search testcase for missing smaller element * [storage] use indexing instead of Vec::get Co-authored-by:
Robin Freyler <robbepop@web.de> * [storage] Port binary_search tests from core * [storage] Format tests * [storage] Format tests * Remove old comment Co-authored-by:
Robin Freyler <robbepop@web.de> * [storage] Incorporate review feedback * [CI] add comparator to spellcheck Porting binary_search to the storage Vec, including the documentation found in core, led to a failure in spellcheck. Since core is considered to be correct, it is updated on spellcheck. * incorporate review feedback * add permalink to stdlib source * Split long line * fix examples * RustFmt the doc examples Co-authored-by:
Robin Freyler <robbepop@web.de> Co-authored-by:
Hernando Castano <hernando@hcastano.com>
-
Michael Müller authored
* Move `pre_cache` script to hidden folder * Add `trigger_pipeline` script from Polkadot * Use `trigger_pipeline` to trigger `ink-waterfall` CI * Update GitLab config * Update GitLab config * Add debug output * Revert me: Remove all other stages * More debugging * More debugging * More debugging * More debugging * Fix syntax * Check for env variable * Revert "Revert me: Remove all other stages" This reverts commit a15ec5b0. * Decrease response time * Remove unnecessary variables * Fix link * CI: chore * CI: add rules everywhere * CI: add rust info * Add image name and tag * Revert "Add image name and tag" This reverts commit 88cd94f0 . * CI: add image to run in k8s Co-authored-by:
Denis P <denis.pisarev@parity.io>
-
- 08 Jul, 2021 4 commits
-
-
Michael Müller authored
-
Hernando Castano authored
* Add basic contract skeleton * Add dummy ERC-1155 trait implementations * Implement `balance_of` method * First attempt at `balance_of_batch` implementation I'm not sure if the output format is correct, need to read the docs more closely * Implement simple token transfer * Flatten balances BTreeMap * Clean up account usage in tests * Implement approval mechanism * Fix bug when sending tokens to an account with zero balance * Check approvals before sending tokens * Suppress warnings * Appease Clippy * Add crude support for token transfers to smart contracts * Simplify check for smart contract-ness * Handle receiving tokens as a smart contract * Implement `safe_transfer_from` method * Only do approval and recipient checks during in batch transfers * I was wrong about the compiler's cleverness... * Add documentation about interface * Make better use of some imports * Disallow owners from approving themselves for token tranfers * Allow creating and minting tokens * Derive default for storage struct * Add note on on-chain panic * Remove `with_balances` constructor It wasn't ERC-1155 compliant (no transfer events emitted) and it also leaked the internal structure of how balances were tracked. * RustFmt with Nightly Not sure I like some of the decisions though... * Tag on_received messages with selectors * Add missing event * Index topics in events * Remove note on BTreeSet usage Can't figure out how to get tests to compile with it. * Stop panicking on cross-contract call error However, this is only because I have no feedback on why this call is actually failing. This behaviour should be added back. * Nightly RustFmt * Fix RustDoc links * Remove inline questions * Remove unused `data` argument from `create/mint` * Rename magic value contants * Remove data argument from `mint/create` tests * Use entry API when decreasing account balance * Extract approvals pairs into struct This is better in terms of type safety and ease of use * Improve some of the panic messages * Cache calls to `self.env().caller()` * Allow `TransferSingle` events to contain Optional addresses This slightly deviates from the spec which says we should use the `0x00` address during certain operations, but this is more idiomatic Rust. * Add logging around calls to `onERC1155Received` * Improve debug message when receiving cross-contract results * Move warning lints to specific lines of code * Format code * Remove backticks from URLs Co-authored-by:
Michael Müller <michi@parity.io> * Fix comment wording/typo * Add expected panic messages to tests * Move imports related to x-contract calls closer to use site * Change selector bytes to hex for the humans * Remove incorrect comment about off-chain environment testing * Add documentation for `TokenId` This will make sure that it doesn't show up as `u128` in the generated docs. * Nightly RustFmt * Uppercase selector bytes * Don't repeat `erc_1155` in `Erc1155TokenReceiver` methods * Nightly RustFmt * Appease the spellchecker * Use Environment typedef * Allow tests to run in stable and experimental off-chain envs * Add explanation as to why we don't accept tokens * Return `Result` when minting tokens * Allow (most) errors to be handled gracefully by caller * Nightly RustFmt * Add shorthand zero-address to allowed spelling list * Run tests with `--features ink-experimental-engine` in CI * Perform batch balance checks before trying to transfer tokens * Move smart contract transfer checks to their own helper function * Appease Clippy * Make `ensure` macro definition more explicit Co-authored-by:
Robin Freyler <robin.freyler@gmail.com> * Iterate over values instead of references Co-authored-by:
Robin Freyler <robin.freyler@gmail.com> * Iterate over references again * Return a value from `on_batch_received` * Don't collect into intermediate Vec * Wrap 0x00 in code blocks This way the spellchecker will ignore it and we can avoid adding it to our dictionary. Co-authored-by:
Michael Müller <michi@parity.io> Co-authored-by:
Robin Freyler <robin.freyler@gmail.com>
-
Karel L. Kubat authored
* [lang] catch illegal struct destructuring pattern in ink! message arguments. * fmt
-
Michael Müller authored
-
- 02 Jul, 2021 1 commit
-
-
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:
Robin Freyler <robin.freyler@gmail.com> * Add simple access permission contract * Fix syntax Co-authored-by:
Robin Freyler <robin.freyler@gmail.com>
-
- 28 Jun, 2021 1 commit
-
-
Hernando Castano authored
* Actually add `refcount` as word * Bump `cargo-spellcheck` verbosity * Make CI spellcheck runs deterministic * Add more words to dictionary * Allow `parameterized` and `parameterizes` * Add more words to dictionary
-
- 25 Jun, 2021 1 commit
-
-
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
-
- 17 Jun, 2021 2 commits
-
-
Michael Müller authored
* Enable debug output for `contract-transfer` example It uses `debug_println!`. * Enable sending payments to `fn invoke_transaction()` It needs to be possible to send value with the transaction, because `t.transferred_value` in this function could be set to > 0. * Rename `Error::UnknownError` to `Error::Unknown` Clippy fails otherwise: = note: `-D clippy::enum-variant-names` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names * Revert "Enable sending payments to `fn invoke_transaction()`" This reverts commit 9b051d2c. * Require sending transaction payment to `fn invoke_transaction()` It needs to be possible to send value with the transaction, because `t.transferred_value` in this function could be set to > 0. * Fix interpunctuation * Introduce `ink-debug` feature * Revert "Introduce `ink-debug` feature" This reverts commit e61673a5.
-
Michael Müller authored
* Enable `spellcheck` CI job * Fix spellchecking mistakes * Implement review suggestion * Reword `>= 2`
-
- 09 Jun, 2021 3 commits
-
-
GreenBaneling | Supercolony authored
-
Michael Müller authored
* Spellcheck examples as well * Remove non-existent method * Fix language * Fix clippy `needless_borrow` https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow * Fix spellchecking for examples * Add `block_timestamp` in `engine` * Update examples/erc721/lib.rs Co-authored-by:
Robin Freyler <robin.freyler@gmail.com> * Find solution for words which are non-existent Co-authored-by:
Robin Freyler <robin.freyler@gmail.com>
-
Andrew Jones authored
* Implement `seal_debug_message` * Update docs * Fmt * Fix debug_print macro * review: use newline char Co-authored-by:
Robin Freyler <robin.freyler@gmail.com> * Fix example * Revert to newline string * Fmt * Single call to debug_print for debug_println! * Add missing ReturnCode, still need to handle it * Inline debug_println! * If logging is disabled then subsequent calls will be a no-op * Fmt * Fix missing error match in experimental off-chain * Add safety comment to debug_message * Only re-export ink_prelude::format, and explain * Satisfy clippy * Encapsulate DEBUG_ENABLED global in module * Move seal_denug_message to unstable module * Update unstable and safety comments * Add more comments about the required features to be enabled on the node runtime * Add `ink-debug` feature, make debug messages a noop if not enabled * Fmt * Noop macro formatting * Enable debug printing for std * Comment formatting * Encapsulate static variable inside the function * Fmt * Remove debug_assert!(true) for disabled macros Co-authored-by:
Robin Freyler <robin.freyler@gmail.com>
-
- 07 Jun, 2021 1 commit
-
-
Sacha L authored
Fix link for FRAME in Substrate.dev Knowledgebase
-
- 27 May, 2021 1 commit
-
-
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`
-
- 26 May, 2021 2 commits
-
-
Michael Müller authored
* Adjust `max_gas` * Fix discord link
-
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
-
- 25 May, 2021 1 commit
-
-
Michael Müller authored
-
- 21 May, 2021 1 commit
-
-
Michael Müller authored
* Fix nightly clippy warning for `from_iter_instead_of_collect` * Fix broken discord link * Improve `rand-extension` readme * Link `ink-docs`
-
- 17 May, 2021 1 commit
-
-
Michael Müller authored
* Update `rand-extension` example * Fix nightly clippy error
-
- 11 May, 2021 2 commits
-
-
Michael Müller authored
-
Michael Müller authored
This reverts commit 4c4c1fbd.
-
- 10 May, 2021 3 commits
-
-
Michael Müller authored
* Improve `contract-transfer` example * Test for assertion
-
Michael Müller authored
* Create workspace for examples * Enable dependabot for examples * Choose unique package names in workspace * Prevent nested workspaces * Add comments * Make crate and lib name equal
-
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
-