Shaun Wang
a7e714aeb1
pallet-proxy: emit events on proxy added. ( #9546 )
...
* pallet-proxy: emit events on proxy added.
* Apply review suggestions.
2021-08-25 10:27:56 +00:00
26dec7a3ec
Impl WeightTrader for tuple ( #3601 )
...
* Impl WeightTrader for tuple.
* fmt
* Renaming.
* add tracing for buy_weight
* Add comment clarifying the default behavior of a WeightTrader tuple
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2021-08-18 00:02:24 +00:00
Shaun Wang
5e86294e4e
Polkadot companion (XCM-simulator) ( #560 )
...
* Use definitions from polkadot.
* Remove unused imports.
* Rerun CI.
2021-08-05 08:43:51 +02:00
Shaun W
1b0baab401
XCM simulator ( #3538 )
...
* Add xcm-simulator and xcm-simulator-example.
* Abstract xcmp and dmp handling.
* Use mock message queue.
* Xcm simulator example unit tests.
* Use relay chain block number on sending msg.
* Fix typo.
* fmt
* more fmt
* Fix deps.
2021-08-01 15:16:14 +00:00
Shaun W and Shawn Tabrizi
4bb487985a
Migrate slots pallet to pallet attribute macro. ( #3218 )
...
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-07-22 09:19:58 +00:00
0966c8a4c3
Fix xcmp message processing condition. ( #510 )
...
* Fix xcmp message processing condition.
* add a very simple test
* Update Cargo.lock
* remove comment
* remove comment
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Alexander Popiak <alexander.popiak@gmail.com >
2021-07-06 16:35:59 +02:00
Shaun Wang
d8dc0f8778
Export 'TakeRevenue' trait. ( #3278 )
2021-06-17 14:20:40 +00:00
Shaun Wang and Guillaume Thiolliere
b21c49524f
Migrate pallet-elections to pallet attribute macro ( #9088 )
...
* Migrate elections pallet to pallet attribute macro.
* Metadata fix.
* Update frame/elections/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2021-06-16 14:17:57 +00:00
693302bee0
Update claims pallet to FRAME v2 ( #3032 )
...
* Migrate claims pallet to pallet attribute macro.
* Trigger CI.
* Update runtime/common/src/claims.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2021-06-12 16:26:52 +00:00
Shaun Wang and Shawn Tabrizi
0869fdf9aa
Migrate pallet-staking to pallet attribute macro ( #9083 )
...
* Migrate staking pallet to pallet attribute macro.
* HistoryDepth default value.
* Make all calls public.
* Update frame/staking/src/lib.rs
* remove externalities again
* Update lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-06-12 00:22:40 +00:00
Shaun Wang
1a9dc0d8e9
Migrate mmr pallet to pallet attribute macro. ( #3061 )
2021-06-09 23:27:53 +00:00
Shaun Wang and parity-processbot
88e25f1669
Companion PR for Substrate #8824 (Migrate pallet-democracy to pallet attribute macro) ( #3030 )
...
* Add type parameter for democracy genesis config.
* update Substrate
Co-authored-by: parity-processbot <>
2021-06-03 06:28:00 -04:00
Shaun Wang
7ec6ebb627
Migrate pallet-democracy to pallet attribute macro ( #8824 )
...
* Migrate pallet-democracy to pallet attribute macro.
* Metadata fix.
* Trigger CI.
2021-06-03 08:30:21 +00:00
Shaun Wang and Shawn Tabrizi
512b366280
Update purchase pallet to FRAME v2 ( #3075 )
...
* Migrate purchase wrapper pallet to pallet attribute macro.
* Apply review suggestions.
* Update runtime/common/src/purchase.rs
* Update runtime/common/src/purchase.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-06-02 18:30:55 -04:00
Shaun Wang
22f076c6d3
Update para sudo wrapper pallet to FRAME v2 ( #3074 )
...
* Migrate para sudo wrapper pallet to pallet attribute macro.
* Apply review suggestions.
2021-06-01 20:34:47 +00:00
Shaun Wang
ca10e33788
Migrate registrar pallet to pallet attribute macro. ( #3063 )
2021-06-01 20:32:31 +00:00
Shaun Wang and Shawn Tabrizi
fe97d7eb16
XCM docstring typo fix ( #3138 )
...
* Typo fix in xcm crate.
* Update xcm/src/v0/junction.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-05-31 07:49:43 +00:00
Shaun Wang
714a0872f5
Migrate pallet-scored-pool to pallet attribute macro ( #8825 )
...
* Migrate pallet-scored-pool to pallet attribute macro.
* Remove dummy event.
* Apply review suggestions.
2021-05-31 05:57:20 +00:00
Shaun Wang
3137d94d11
Migrate crowdloan pallet to pallet attribute macro. ( #3036 )
2021-05-19 20:14:20 +00:00
Shaun Wang
8d30172a8f
Update auctions pallet to FRAME v2 ( #3031 )
...
* Migrate auctions pallet to pallet attribute macro.
* Rename extra constants.
2021-05-18 11:40:15 +00:00
Shaun Wang
4f7c1df31e
Migrate pallet-recovery to pallet attribute macro ( #8761 )
...
* Migrate pallet-recovery to pallet attribute macro.
* Fix metadata inconsistency.
* Use DispatchResult as call returns.
* Apply review suggestions.
2021-05-12 12:50:22 +00:00
Shaun Wang
6e11dd18fb
Migrate pallet-lottery to pallet attribute macro ( #8762 )
...
* Migrate pallet-lottery to pallet attribute macro.
* Fix metadata inconsistency.
* fix
* Use DispatchResult in call returns.
2021-05-12 12:44:19 +00:00
Shaun Wang
ad584733e9
frame system: add event util functions for tests. ( #8734 )
...
* frame system: add event util functions for tests.
* URemove unused fn.
* Apply review suggestions.
2021-05-12 12:17:03 +00:00
Shaun Wang
9ae9267e9a
Update pallet macro migrations. ( #8766 )
...
* Update pallet macro migrations.
* Revert dispatchable call visibility changes.
* fmt
2021-05-10 15:55:25 +02:00
Shaun Wang
2a38b23062
Add arithmetic dispatch errors. ( #8726 )
...
* Add arithmetic dispatch errors.
* Replace custom overflow errors.
* Replace custom underflow and division by zero errors.
* Replace overflow/underflow in token error.
* Add token and arithmetic errors in dispatch error equality test.
* Trigger CI.
2021-05-10 10:14:02 +02:00
Shaun Wang
68a740c071
Migrate pallet-nicks to pallet attribute macro. ( #8723 )
...
* Migrate pallet-nicks to pallet attribute macro.
* Fix constants.
2021-05-05 15:12:20 +00:00
Shaun Wang and Guillaume Thiolliere
d0efe2d1c2
Migrate pallet-im-online to pallet attribute macro. ( #8714 )
...
* Migrate pallet-im-online to pallet attribute macro.
* Move validate_unsigned into pallet macro.
* fix metadata
* fix test
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2021-05-05 14:03:21 +00:00
Shaun Wang
f93d7b874e
Migrate pallet-vesting to pallet attribute macro. ( #8440 )
...
* Migrate pallet-vesting to pallet attribute macro.
* Update metadata type alias.
* Replace 'Module' with 'Pallet' in benchmarking.
* Trigger CI.
2021-03-24 12:29:30 +00:00
Shaun Wang
4f5668b9bd
Migrate pallet-utility to pallet attribute macro. ( #8326 )
...
* Migrate pallet-utility to pallet attribute macro.
* Replace 'Module' with 'Pallet' in benchmarking.
2021-03-24 10:35:39 +00:00
Shaun Wang
4fd69de38e
Implement PartialEq for DispatchError. ( #8407 )
2021-03-20 20:50:53 -04:00
9047bbb392
Companion for #8372 (Replace 'Module' with 'Pallet' in construct_runtime macro) ( #2629 )
...
* Replace 'Module' with 'Pallet'.
* "Update Substrate"
* fix babe usage
* fix benchmark
Co-authored-by: parity-processbot <>
Co-authored-by: thiolliere <gui.thiolliere@gmail.com >
2021-03-18 10:10:17 +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
Shaun Wang and Shawn Tabrizi
c7d32ba9a6
Migrate pallet-babe to pallet attribute macro. ( #8310 )
...
* Migrate pallet-babe to pallet attribute macro.
* Remove unnecessary bound in pallet storage.
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-03-17 20:47:39 +00:00
Shaun Wang and Bastian Köcher
844e25522c
Support pallet::storage conditional compilation ( #8324 )
...
* Support pallet::storage conditional compilation.
* Add docs for cfg attributes.
* Keep strong types for get cfg attrs return.
* Update frame/support/procedural/src/pallet/parse/helper.rs
* Update frame/support/procedural/src/pallet/parse/storage.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-03-16 08:51:51 +00:00
Shaun Wang
2b73fcf45d
Support xcm local execution in xcm-handler. ( #357 )
...
* Support xcm local execution in xcm handler.
* Add docs.
2021-03-09 22:57:44 +01:00
Shaun Wang
d859734ed9
Replace XCM Error::Undefined usage ( #2580 )
...
* Replace undefined error in currency adapter.
* Update tranact asset errors.
* Update TransactAsset trait documentations.
* Update currency adapter error documentation.
2021-03-09 15:46:30 +01:00
Shaun Wang
1eecfe1acb
Update XcmError on sending failure. ( #358 )
2021-03-08 20:30:51 +01:00
Shaun Wang and Shawn Tabrizi
135cce9055
Add Xcm sender. ( #2489 )
...
* Add Xcm sender.
* Rename XCM sender and add description.
* Update copyright header.
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-03-01 14:25:55 +01:00
Shaun Wang
77549ca910
Add events for hrmp pallet. ( #2532 )
...
* Add events for hrmp pallet.
* Apply review suggestions.
2021-02-27 02:04:14 +00:00
Shaun Wang
44bba9531d
Fix links in CONTRIBUTING.md ( #2539 )
2021-02-26 22:03:07 -04:00
Shaun Wang
8ba3e66fd1
XCM handler: make send origin configurable. ( #346 )
2021-02-26 20:12:57 +01:00
Shaun Wang
f82489dbee
Deposit XCM execution success and fail events. ( #338 )
2021-02-23 09:27:47 +01:00
Shaun Wang
893c9a60ed
Fix XCM encoding in HRMP pallet. ( #2491 )
2021-02-22 23:21:17 +01:00
Shaun Wang
3fbe22f552
Migrate pallet-timestamp to pallet attribute macro. ( #8078 )
...
* Migrate pallet-timestamp to pallet attribute macro.
* Migrate inherent.
* Unify private visbility.
* Update benchmarking.
* Update storage usages.
2021-02-10 14:00:41 +00:00
Shaun Wang
445cf86762
Pallet attribute macro migrate guidelines minor fixes ( #8094 )
...
* Fix pallet attribute macro guidelines.
* Typo fixes.
2021-02-10 12:22:39 +01:00
Shaopeng Wang
06b432caba
frame-system: Index type 'MaybeSerializeDeserialize' bound. ( #8035 )
2021-02-03 11:45:52 +01:00
Shaopeng Wang
a531c5b762
Implement 'transactional' annotation for runtime functions. ( #6763 )
...
* Implement 'transactional' annotation for runtime functions.
* Allow function attributes for dispatchable calls in decl_module.
* decl_module docs: add transactional function example.
* decl_module docs: add function attributes notes.
* Fix license header.
2020-08-12 09:21:36 +00:00
Shaopeng Wang
3a853d4dde
Add mutate_exists to StorageDoubleMap. ( #6704 )
2020-08-04 10:02:24 +02:00
Shaopeng Wang
c0179cb6e7
Add try_mutate_exists to StorageDoubleMap. ( #6694 )
2020-07-21 10:50:37 +02:00
Shaopeng Wang and parity-processbot
c9046d9686
Companion for #6500 (decl_module: frame_system as default ident) ( #1314 )
...
* Update decl_storage usage with frame_system as default ident.
* More decl_module usage update.
* 'Update substrate'
Co-authored-by: parity-processbot <>
2020-07-08 09:07:19 +02:00
Shaopeng Wang
a6702b7121
decl_module! macro: use 'frame_system' instead of system as default ident ( #6500 )
...
* Use frame_system as default ident.
* Remove unused 'frame_system' to 'system' renaming.
* Fix construct_runtime_ui tests.
* Rename system to frame_system in sudo/utility pallet test.
* Bump runtime impl_version.
* Update formatting.
2020-07-07 23:06:21 +00:00
Shaopeng Wang
1813ba215e
Update stale docstring with 'EnsureOneOf' introduced. ( #6501 )
...
* Update stale docstring with 'EnsureOneOf' introduced.
* Apply review suggestions.
2020-06-25 11:33:47 +02:00
Shaopeng Wang
a43a755a91
FixedPointNumber: zero is not positive. ( #6385 )
2020-06-18 09:35:49 +02:00
Shaopeng Wang
ccdac645c8
"OR gate" for EnsureOrigin ( #6237 )
...
* 'OR gate' for EnsureOrigin.
* Formatting.
* More formatting.
* Add docstring; Update 'Success' type.
* Bump runtime impl_version.
* Fix successful_origin.
* Add either into std feature list.
* Update docs.
2020-06-10 11:11:26 +02:00
Shaopeng Wang
c2e6b91794
Perthings: derive PartialOrd and Ord under no_std. ( #4309 )
2019-12-06 09:52:42 +01:00