* Add `pub` to functions in Contract module
This is to support a wrapper module which will add an access control layer to the SRML Contract module.
* Remove `pub` from `on_finalize`
* Intro `ChildStorageKey` for checked child keys
* Get rid of Into in Externalities trait
* Use Cow in ChildStorageKey
* Fix tests for state-machine.
* Clean
* child_storage_root always return a value
* Don't return Option from Ext::child_storage_root
* Return 42 in child_storage_root
* Return CHILD_STORAGE_KEY_PREFIX from trie id gen
* Bump spec and impl version.
* Require `:default:` in `is_child_trie_key_valid`
* Add `default:` prefix.
* Introduce `into_owned` for `ChildStorageKey`.
* Add documentation.
* Fix state-machine tests
* Remove outdated TODO
I check out with Emeric and he is ok with that
* child_storage_root is infailable
* Nit
* Move assert after check.
* Apply suggestions from @DemiMarie-parity
Co-Authored-By: pepyakin <s.pepyakin@gmail.com>
* Formatting nit in core/executor/src/wasm_executor.rs
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Formatting nits from @thiolliere
* Implement `ext_println` in contract runtime
* Only allow contracts to import `ext_println` on dev chains
* Configure dev chain to allow contracts with `ext_println`
* Increment spec version
* Docs
* Rename config to the more specific enable_println
* all the ise
* forgot a misspelling
* a few more replacements
* bump impl
* rollback and fixes
* bump impl again
* Add aliases for RPC
* Update on_demand.rs
* Add: documentation for srml_contract, per @sergeis comments. TODO: make concise and add usage example
* Fix: minor spelling and grammar
* Add: Revisions to the doc clarification from @Sergei on trx revert behavior
* Edit: added spacing btw function list for better readability
* Remove: usage create contract example todo later
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicolezhuis@gmail.com>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicolezhuis@gmail.com>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicolezhuis@gmail.com>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicolezhuis@gmail.com>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicolezhuis@gmail.com>
* Edit: explained max gas limit revert behavior in greater detail
* Edit: incorporated first round of PRs, mostly syntax/styling
* Edit: incorporated Sergeis mental model, terms, and added usage examples
* Fix: staking module is no longer closely related to contract. Balances now manages the reaping of accounts
* Minor cleanup of links/text that are not ready to be shown
* Update srml/contract/src/lib.rs
made more concise
Co-Authored-By: nczhu <nicole@parity.io>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicole@parity.io>
* Minor edits from PR
* Explained contract creation in more detail, fixed PR suggestions
* Linted according to contri guidelines
* Created a notable scenarios section, unlisted public functions in lieu of a direct link to the module
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicole@parity.io>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicole@parity.io>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicole@parity.io>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicole@parity.io>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicole@parity.io>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicole@parity.io>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicole@parity.io>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicole@parity.io>
* Update srml/contract/src/tests.rs
Co-Authored-By: nczhu <nicole@parity.io>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicole@parity.io>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicole@parity.io>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicole@parity.io>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicole@parity.io>
* Update srml/contract/src/lib.rs
Co-Authored-By: nczhu <nicole@parity.io>
* minor commit after pr feedback
* s/codehash/code_hash for consistency
* Be a little safer with total issuance.
* PairT instead of _Pair
* Remove rev causing upset
* Remove fees stuff.
* Fix build (including tests)
* Update runtime, bump version
* Fix
* Handle gas refunds properly.
* Rename identifier
ala #2025
* Address grumbles
* New not-quite-linear-typing API
* Slimmer API
* More linear-type test fixes
* Fix tests
* Tidy
* Fix some grumbles
* Keep unchecked functions private
* Remove another less-than-safe currency function and ensure that
contracts module can never create cash.
* Address a few grumbles and fix tests
* first implementation
* remove done comment
* origin done
* impl log for instance
* impl inherent for instance
* Fix wasm build + full example build
this requires parity codec implements codec for core::marker::PhantomData
* patch parity-codec link to github branch
* improve internal names and fix instance prefix
* Fix in macros
* add test modules for support
this allow to test for construct_runtime as well.
The reason to have put that in another crate is:
* if we put test in `tests/` dir of srml/support then decl_storage fails to get
srml-support access because it believes it is inside srml-support
crate and so derive access to `quote!{ crate }` but this is wrong
(and I don't see any way to prevent that, and it only bother us so I
don't think that matters that much)
* if we put test inside lib.rs then contruct_runtime cannot be used
because it call some macros that are defined with macros
(decl_outer_event and decl_outer_origin) and thus rustc complains.
* defaultinstance to its own struct to avoid errors
* enforce <T, I> for Event and Config, impl test
* add origin, log, inherent to test
* test more code generation
* basic storage test
* fix typo
* rename a few imports and field
* delete wip test in example and runtime
* change default prefix to make it backward compatible with test
* rename Instance to I and Instantiable to Instance
note: the name of generic parameter I is only enforce by decl_module!
and this could be rewritten
* doc
* clean old TODOs
* update parity-codec to 3.2
* update node impl version + builds
* fix warning
* fix unrelated grandpa test
* refactor code
* Clean up session key rotation
* Fix build
* Bump version
* Introduce feature to balances.
* Move staking locking logic over to central point
* ^^^ rest
* First part of assimilation
* More assimilation
* More assimilation
* Fix most tests
* Fix build
* Move Balances to new locking system
* :q!
* Bump runtime version
* Build runtime
* Convenience function
* Test fix.
* Whitespace
* Improve type legibility.
* Fix comment.
* More tests.
* More tests.
* Bump version
* Caps
* Whitespace
* Whitespace
* Remove unneeded function.
* Make use of parity-codec "derive" crate feature
* Bump impl_version
* Update wasm files and Cargo.lock files
* Transferred to parity_codec derive feature for the rest of the crates
* Update wasm binaries and lock files
* Update core and node wasm binaries
* remove amount associated
* make a new trait to bound some arithmetics to balances or assets:
It also remove arithmetic bounds of srml-support::traits::Currency.
To update your code then use srml_support::traits::ArithmeticType like:
`type Currency: ArithmeticType + Currency<Self::AccountId, Balance=BalanceOf<Self>>; `
with `type BalanceOf<T> = <<T as Trait>::Currency as ArithmeticType>::Type; `
* improve decl_storage when it explicit serde bound: basically don't try to be smarter than rust and just use where clause.
Went through the TODOs, removed a bunch, which are outdated or nothing more than a regular comment, documented a bunch more as actual tickets and made them FIXMEs and unified their structure (`FIXME #TICKETNO DESC` for local tickets, `FIXME: DESC LINK` for external tickets) for easier in-editor support. Further more remove unnecessary remarks and related old code that I noticed in that instance.