Alexander Theißen
e01ac8cea0
contracts: Allow contracts to dispatch calls into the runtime ( #9276 )
...
* contracts: Allow contracts to dispatch calls into the runtime
* Fix RPC tests
* Fix typo
* Replace () by AllowAllFilter and DenyAllFilter
* Add rust doc
* Fixup for `()` removal
* Fix lowest gas calculation
* Rename AllowAllFilter and DenyAllFilter
* Updated changelog
2021-07-12 20:40:27 +00:00
Xiliang Chen
223529e4dd
Named reserve ( #7778 )
...
* add NamedReservableCurrency
* move currency related trait and types into a new file
* implement NamedReservableCurrency
* remove empty reserves
* Update frame/support/src/traits.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* fix build
* bump year
* add MaxReserves
* repatriate_reserved_named should put reserved fund into named reserved
* add tests
* add some docs
* fix warning
* Update lib.rs
* fix test
* fix test
* fix
* fix
* triggier CI
* Move NamedReservableCurrency.
* Use strongly bounded vec for reserves.
* Fix test.
* remove duplicated file
* trigger CI
* Make `ReserveIdentifier` assosicated type
* add helpers
* make ReserveIdentifier assosicated type
* fix
* update
* trigger CI
* Apply suggestions from code review
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* trigger CI
* Apply suggestions from code review
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Gavin Wood <i@gavwood.com >
Co-authored-by: Shaun Wang <spxwang@gmail.com >
2021-06-04 09:32:46 +02:00
Gavin Wood
643d2b669f
Introduce OnSetCode type into system config trait. ( #8496 )
...
* Introduce OnSetCode type into system config trait.
* Docs.
* Fixes
* Fixes
2021-04-01 12:20:24 +00:00
Shaun Wang
2e5522444a
Replace 'Module' with 'Pallet' in construct_runtime macro ( #8372 )
...
* Use 'Pallet' struct in construct_runtime.
* Fix genesis and metadata macro.
* Fix 'Pallet' type alias.
* Replace 'Module' with 'Pallet' for all construct_runtime use cases.
* Replace more deprecated 'Module' struct.
* Bring back AllModules and AllPalletsWithSystem type, but deprecate them.
* Replace deprecated 'Module' struct from merge master.
* Minor fix.
* Fix UI tests.
* Revert UI override in derive_no_bound.
* Fix more deprecated 'Module' use from master branch.
* Fix more deprecated 'Module' use from master branch.
2021-03-18 08:50:08 +00:00
Gavin Wood
363db4f086
staking: Flexible generation of reward curve and associated tweaks ( #8327 )
...
* Initial abstraction
* Alter rest of APIs
* Fixes
* Some extra getters in Gilt pallet.
* Refactor Gilt to avoid u128 conversions
* Simplify and improve pow in per_things
* Add scalar division to per_things
* Renaming from_fraction -> from_float, drop _approximation
* Fixes
* Fixes
* Fixes
* Fixes
* Make stuff build
* Fixes
* Fixes
* Fixes
* Fixes
* Update .gitignore
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/gilt/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/gilt/src/mock.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Fixes
* Fixes
* Fixes
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2021-03-16 12:03:58 +00:00
Gavin Wood
a49210693b
Introduce IgnoredIssuance into Gilts ( #8299 )
...
* IgnoredIssuance
* Fixes
* Fixes
2021-03-09 14:03:47 +01:00
Gavin Wood
643a0ecd38
Assets: Remove zombies, introduce approvals ( #8220 )
...
* Initial work
* Tests for frame system
* Self-sufficient account ref-counting
* Fixes
* Benchmarks building.
* Update frame/system/src/lib.rs
Co-authored-by: Jaco Greeff <jacogr@gmail.com >
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Test approvals
* Fixes
* Report assets pallet tests
* Tests for approvals & force_cancel_approval
* Use structs rather than tuples for approval data
* Add force_asset_status, force_set_metadata
* Add clear_metadata.
* approval benchmarks
* force_asset_status benchmarks
* final benchmarks
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Update frame/system/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Update frame/system/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Update frame/system/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Docs for new approval dispatches.
* Docs for pallet.
* Remove accidental code.
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Fixes
* Update frame/assets/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Grumbles.
* Transfer zero works, use DispatchResult
* fix test
* Remove force_destroy
* Remove TODO
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* transfer_keep_alive
* Fixes
* Fixes
* Fixes
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
Co-authored-by: Jaco Greeff <jacogr@gmail.com >
Co-authored-by: Parity Benchmarking Bot <admin@parity.io >
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-03-09 13:38:33 +01:00
Gavin Wood
ed365da8b9
Gilts Pallet ( #8139 )
...
* Initial draft
* Enlarge function drafted.
* Thaw draft
* Retract_bid draft
* Final bits of draft impl.
* Test mockup
* Tests
* Docs
* Add benchmark scaffold
* Integrate weights
* All benchmarks done
* Missing file
* Remove stale comments
* Fixes
* Fixes
* Allow for priority queuing.
* Another test and a fix
* Fixes
* Fixes
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_gilt --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/gilt/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Grumble
* Update frame/gilt/src/tests.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update frame/gilt/src/tests.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Grumble
* Update frame/gilt/src/tests.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update frame/gilt/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update frame/gilt/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Fix unreserve ordering
* Grumble
* Fixes
Co-authored-by: Parity Benchmarking Bot <admin@parity.io >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-02-27 16:11:27 +01:00