Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Enrich metadata with type information #8615

Merged
618 commits merged into from
Sep 15, 2021
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
618 commits
Select commit Hold shift + click to select a range
f612dd9
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 6, 2021
bdfc96d
Cargo.lock after merge
ascjones Jul 6, 2021
4a550a1
Restore scale-info feature
ascjones Jul 6, 2021
5ec82c1
Fully qualify TypeInfo derive
ascjones Jul 6, 2021
8b5ba7c
Skip PendingSwap T
ascjones Jul 6, 2021
e6d7970
Add missing skip_type_params attr
ascjones Jul 6, 2021
833c821
metadata docs features
ascjones Jul 6, 2021
6558710
Reduce pallet event attribute to struct
ascjones Jul 6, 2021
e85008b
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 6, 2021
cb0af26
Cargo.lock
ascjones Jul 6, 2021
2a6dc3f
Update frame/balances/src/tests_composite.rs
ascjones Jul 7, 2021
0de9fea
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 7, 2021
c350d88
Merge branch 'aj-metadata-vnext' of github.com:paritytech/substrate i…
ascjones Jul 7, 2021
7372505
Line widths check
ascjones Jul 7, 2021
f9052c2
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 7, 2021
2cd71b6
Cargo.lock
ascjones Jul 7, 2021
848d3b6
Add scale-info/std
ascjones Jul 7, 2021
6e2313c
Update frame/system/src/lib.rs
ascjones Jul 7, 2021
8a2bbdb
Use `skip_type_params` to remove `TypeInfo` requirements on checks
ascjones Jul 7, 2021
5de104e
Revert "Remove unused Call metadata stuff"
ascjones Jul 7, 2021
b825c08
Skip BalanceSwapAction type parameter
ascjones Jul 7, 2021
72c8e8e
Remove unused event metadata macro
ascjones Jul 7, 2021
8c7abdc
Update frame-metadata
ascjones Jul 7, 2021
90d6239
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 7, 2021
6a199e5
Update primitives/npos-elections/compact/src/codec.rs
ascjones Jul 7, 2021
501a7c8
Merge branch 'aj-metadata-vnext' of github.com:paritytech/substrate i…
ascjones Jul 7, 2021
876d77b
Manual TypeInfo for Header
ascjones Jul 7, 2021
b7a2a78
Remove TypeInfo requirement for consts in BoundedVec etc.
ascjones Jul 7, 2021
b63835a
Another TypeInfo bound removed
ascjones Jul 7, 2021
e9e60c0
review: fix indentation
ascjones Jul 7, 2021
0f331df
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 8, 2021
68f4659
TypeInfo impls for Identity types
ascjones Jul 8, 2021
24adee5
Add some todos to add custom TypeInfo impls
ascjones Jul 8, 2021
ea6ce17
Update frame/support/procedural/src/pallet/expand/pallet_struct.rs
ascjones Jul 8, 2021
f56a2c1
Add some todos to add custom TypeInfo impls
ascjones Jul 8, 2021
63a8d1d
Merge remote-tracking branch 'origin/aj-metadata-vnext' into aj-metad…
ascjones Jul 8, 2021
6fbce22
Add a test for manual Data TypeInfo impl
ascjones Jul 9, 2021
39073c1
Add custom TypeInfo impl for Vote
ascjones Jul 9, 2021
481d77e
Era custom TypeInfo crimes
ascjones Jul 9, 2021
214aa23
Revert finality-grandpa version to 0.14.z
ascjones Jul 9, 2021
cc2456d
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 9, 2021
90315e6
review: renamed module to pallet_constants_metadata
ascjones Jul 9, 2021
38de836
New line at end of file
ascjones Jul 9, 2021
7ea7943
Add missing scale-info/std
ascjones Jul 9, 2021
ce2ecc8
Update frame/support/src/storage/types/mod.rs
ascjones Jul 12, 2021
60b5887
Remove StorageEntryType::Map unused flag
ascjones Jul 12, 2021
6156440
Merge branch 'aj-metadata-vnext' of github.com:paritytech/substrate i…
ascjones Jul 12, 2021
5da01d6
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 12, 2021
3050fac
Add missing scale-info dependency after merge
ascjones Jul 12, 2021
aa5417b
SignedExtension::AdditionalSigned metadata
ascjones Jul 13, 2021
6a9dc0d
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 13, 2021
e42fe3e
Update frame-metadata, use abbreviated docs and args fields
ascjones Jul 13, 2021
1dd2990
Update frame/example/Cargo.toml
ascjones Jul 13, 2021
166c9bb
Add scale_info/std and remove unused scale-info dependency
ascjones Jul 13, 2021
e1ba36c
Merge remote-tracking branch 'origin/aj-metadata-vnext' into aj-metad…
ascjones Jul 13, 2021
4bee356
Remove scale-info dependency
ascjones Jul 13, 2021
cab3bb5
Remove treasury pallet::metadata
ascjones Jul 13, 2021
bacc000
Remove redundant Event test
ascjones Jul 13, 2021
c91215c
Add back scale-info as dev dependency
ascjones Jul 14, 2021
27fa7e2
fix error metadata when no error defined in decl_module
gui1117 Jul 14, 2021
82fb538
Add Module3 to tests
ascjones Jul 14, 2021
f944dbe
Merge branch 'aj-metadata-vnext' of github.com:paritytech/substrate i…
ascjones Jul 14, 2021
7410615
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 14, 2021
e3865c2
Fix metadata test
ascjones Jul 14, 2021
b2d9c25
Add docs feature to frame-support test
ascjones Jul 14, 2021
9fcccb8
WIP fixing pallet metadata test
ascjones Jul 14, 2021
cdf65fc
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 14, 2021
3c3945c
Remove redundant FunctionMetadata, FunctionArgumentMetadata as per ht…
ascjones Jul 14, 2021
c849732
Use main branch of frame-metadata
ascjones Jul 14, 2021
97174b5
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 15, 2021
93ba3c7
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 16, 2021
fa4b2d7
Use patch of scale-info for latest changes
ascjones Jul 16, 2021
22ab7d2
Use latest patched scale-info
ascjones Jul 16, 2021
9d67a31
Manual TypeInfo for DigestItem
ascjones Jul 16, 2021
4491a42
Manual TypeInfo for DigestItem
ascjones Jul 16, 2021
094f0da
Update scale-info
ascjones Jul 19, 2021
c2c10c5
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 19, 2021
eb43e7b
Skip __Ignore variants for Error, depends on https://github.com/parit…
ascjones Jul 19, 2021
72db5b3
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 19, 2021
a83be03
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 20, 2021
a83096e
Named fields for FRAME v2 pallet Call variants
ascjones Jul 20, 2021
42752e6
Named fields for FRAME v1 pallet Call variants
ascjones Jul 21, 2021
6053b08
Add missing scale-info dependency
ascjones Jul 21, 2021
0397626
WIP expand benchmark call variant
ascjones Jul 21, 2021
dbb0c1e
fix benchmark with new function
gui1117 Jul 21, 2021
fe85997
fix tests
gui1117 Jul 21, 2021
5e499ea
more fix
gui1117 Jul 21, 2021
9b426ac
Fix staking tests
ascjones Jul 21, 2021
11f7419
Fix offchain workers calls
ascjones Jul 21, 2021
1576ce5
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 21, 2021
d5818d8
Cherry pick rustfmt.toml from master
ascjones Jul 21, 2021
3b74c20
cargo +nightly-2021-06-22 fmt --all
ascjones Jul 21, 2021
1a6d126
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 22, 2021
d92d9b5
Update to new call variant structs
ascjones Jul 22, 2021
d2c8dfd
More call variant struct updates
ascjones Jul 22, 2021
bfd13c1
Remove unused import
ascjones Jul 22, 2021
5651295
More call variant structs
ascjones Jul 22, 2021
529d0d8
More call variant structs
ascjones Jul 22, 2021
cb4c2ee
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 22, 2021
6b88259
Even more call variant structs
ascjones Jul 22, 2021
0d69600
Mooar variant structs
ascjones Jul 22, 2021
490d742
Evermore variant structs
ascjones Jul 22, 2021
bc17010
Call variant structs ad infinitum
ascjones Jul 23, 2021
64bb2c8
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 23, 2021
759c715
Fmt
ascjones Jul 23, 2021
fe357cf
More call variants
ascjones Jul 23, 2021
c2d2708
Last call variant
ascjones Jul 23, 2021
5b4cc00
Call variants all done?
ascjones Jul 23, 2021
125695a
Fix SS58Prefix type
ascjones Jul 23, 2021
7adee68
Potential workaround for BitFlags<IdentityFields> TypeInfo
ascjones Jul 26, 2021
d2466f3
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 26, 2021
006b248
Enable docs capturing for Call, Event, and Error types
ascjones Jul 26, 2021
fc49b39
Fix IdentityFields TypeInfo
ascjones Jul 26, 2021
9e18d2d
Remove metadata-docs feature
ascjones Jul 26, 2021
a32257b
Add capture_docs = true for legacy Call, Event and Error types
ascjones Jul 26, 2021
686dd77
Fmt
ascjones Jul 26, 2021
2aaf01d
Fix metadata test type
ascjones Jul 27, 2021
26bcc50
Update benchmarks with call struct variants
ascjones Jul 27, 2021
d74d11e
Fmt
ascjones Jul 27, 2021
de94f5d
More test fixes
ascjones Jul 27, 2021
a39bb31
Fmt
ascjones Jul 27, 2021
2b41890
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 27, 2021
ab822b5
Fix benches
ascjones Jul 27, 2021
2a53f72
Use latest capture_docs attr
ascjones Jul 28, 2021
9194f00
Latest scale_info
ascjones Jul 28, 2021
cfc4af8
Merge branch 'master' into aj-metadata-vnext
ascjones Jul 29, 2021
98b4c28
Fmt
ascjones Jul 29, 2021
b0abff3
review: change &Vec to &[]
ascjones Jul 29, 2021
c7786aa
Remove pallet metadata attr
ascjones Jul 29, 2021
b5f1f27
review: remove commented out test code
ascjones Jul 29, 2021
52488ec
review: skip_type_params trailing comma suggestion
ascjones Jul 29, 2021
a11fc27
Update to scale-info 0.10.0
ascjones Jul 29, 2021
66f28d2
Update construct_runtime ui tests, different because of metadata Type…
ascjones Jul 29, 2021
2237de8
Add some TypeInfo derives for UI tests
ascjones Jul 29, 2021
4763c9d
Update storage ensure span ui stderrs
ascjones Jul 29, 2021
66aa463
Update call argument bound ui tests
ascjones Jul 29, 2021
8ce94a8
Add scale-info dev dependency
ascjones Jul 30, 2021
7683b7d
Update to latest finality-grandpa release
ascjones Jul 30, 2021
4cbfc85
review: missing newline
ascjones Jul 30, 2021
e20f56f
review: missing scale-info/std
ascjones Jul 30, 2021
106eea1
review: remove duplicate scale-info/std
ascjones Jul 30, 2021
b664596
review: remove fully qualified TypeInfo
ascjones Jul 30, 2021
5c1f8fe
review: add missing scale-info/std
ascjones Jul 30, 2021
1551a83
review: remove unnecessary imports.
ascjones Jul 30, 2021
54147eb
Fmt
ascjones Jul 30, 2021
288385a
Use crates.io RC version of frame-metadata
ascjones Jul 30, 2021
ee5299f
Remove scale-info/std because it is a dev dependency
ascjones Jul 30, 2021
00a6476
Add missing scale_info dev-dependency for test
ascjones Jul 30, 2021
a96a65f
Delete empty metadata folder
ascjones Aug 2, 2021
79e8d10
Fix sp_std import
ascjones Aug 2, 2021
ee9b70e
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 2, 2021
e5d95bb
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 2, 2021
030f732
review: improve manual UncheckedExtrinsic TypeInfo impl
ascjones Aug 2, 2021
0905ccf
review: use full scale-info for dev-dependency
ascjones Aug 2, 2021
6e2c25c
Remove DefaultByteGetter impl
ascjones Aug 3, 2021
f4814ed
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 3, 2021
9d0b217
review: derive TypeInfo for generic header
ascjones Aug 3, 2021
fb09d4f
Fmt
ascjones Aug 3, 2021
8956089
Update primitives/runtime/src/generic/unchecked_extrinsic.rs
ascjones Aug 3, 2021
a48635c
Update primitives/runtime/src/generic/unchecked_extrinsic.rs
shawntabrizi Aug 3, 2021
cc86b08
Update bin/node/executor/Cargo.toml
ascjones Aug 3, 2021
9cbdff5
Update frame/identity/src/types.rs
ascjones Aug 3, 2021
911ca7d
Update frame/support/src/dispatch.rs
ascjones Aug 3, 2021
f082b5d
Remove redundant derive
ascjones Aug 3, 2021
5b1297d
Simplify scale-info dependency
ascjones Aug 3, 2021
1268e74
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 3, 2021
2b91aa8
Strip underscore prefix from call variant struct names
ascjones Aug 4, 2021
03f43ba
Another underscore field
ascjones Aug 4, 2021
eced48b
More underscore fields
ascjones Aug 4, 2021
594b0e8
Another underscore field
ascjones Aug 4, 2021
942683c
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 4, 2021
3f01437
Update to frame-metadata 14.0.0-rc.2 with combined StorageEntryType::Map
ascjones Aug 4, 2021
c740873
Fmt
ascjones Aug 4, 2021
214e8f3
Revert weights formatting
ascjones Aug 4, 2021
b56e6bf
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 4, 2021
640e1d3
Fix up some tests
ascjones Aug 4, 2021
8c0bb8e
Fix up some tests for StorageEntryTypeMetadata
ascjones Aug 4, 2021
82481dd
scale-info dev dependency
ascjones Aug 4, 2021
f615b16
Fix test error
ascjones Aug 4, 2021
0e157e5
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 4, 2021
0ccfdb4
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 5, 2021
c905e48
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 5, 2021
da90c11
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 5, 2021
75dabfb
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 6, 2021
adf72ee
Add missing TypeInfo derives
ascjones Aug 6, 2021
5a2122a
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 23, 2021
aa185bb
Add back missing scale-info dependency
ascjones Aug 23, 2021
2c47f9b
Add back missing scale-info dependency
ascjones Aug 23, 2021
32371bb
Fix npos compact impls
ascjones Aug 23, 2021
91f8206
Cargo.lock
ascjones Aug 23, 2021
9dbdbdc
Fmt
ascjones Aug 23, 2021
f695da4
Fix errors
ascjones Aug 23, 2021
e2d74d0
Fmt
ascjones Aug 23, 2021
a61df94
Fix renamed raw_solution field
ascjones Aug 23, 2021
8e37997
Fix error
ascjones Aug 23, 2021
2f526bc
Fmt
ascjones Aug 23, 2021
7b386d8
Fix some benchmarks
ascjones Aug 23, 2021
1f12152
Fmt
ascjones Aug 23, 2021
cd8a63a
Stray R
ascjones Aug 23, 2021
9cf4223
Fix
ascjones Aug 24, 2021
1ce3f1d
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 24, 2021
fda7a89
Add missing TypeInfos
ascjones Aug 24, 2021
2d15ec0
ui test fix
ascjones Aug 24, 2021
9b0e650
Fix line widths
ascjones Aug 24, 2021
24d1caa
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 24, 2021
9289212
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 25, 2021
c094c04
Revert "ui test fix"
ascjones Aug 25, 2021
047bb17
Upgrade to scale-info 0.11.0
ascjones Aug 25, 2021
6b18b04
Revert "Upgrade to scale-info 0.11.0"
ascjones Aug 25, 2021
7518d5d
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 26, 2021
dc4314c
Merge branch 'master' into aj-metadata-vnext
ascjones Aug 31, 2021
c3567ba
Add Runtime type
ascjones Aug 31, 2021
3497b6f
Update to scale-info 0.12
ascjones Aug 31, 2021
894f0a4
Update to scale-info 1.0
ascjones Sep 1, 2021
4022140
Update frame-metadata to version 14.0.0
ascjones Sep 1, 2021
e332c5d
Patch finality-grandpa until release available
ascjones Sep 1, 2021
3e4b18c
Merge branch 'master' into aj-metadata-vnext
ascjones Sep 1, 2021
29a077e
Fix metadata tests
ascjones Sep 1, 2021
6616dc2
Fix metadata tests
ascjones Sep 1, 2021
5c78705
Fmt
ascjones Sep 2, 2021
d4566d1
Remove patched finality-grandpa
ascjones Sep 2, 2021
16d002d
Fix tests, use scale_info imports
ascjones Sep 2, 2021
fa01b4f
Fix pallet tests
ascjones Sep 2, 2021
6a49e30
Merge branch 'master' into aj-metadata-vnext
ascjones Sep 2, 2021
84f048e
Add BlockNumber TypeInfo bound
ascjones Sep 2, 2021
af2903c
ui test fix
ascjones Aug 24, 2021
62f92fe
Merge branch 'master' into aj-metadata-vnext
ascjones Sep 2, 2021
4539f03
Merge branch 'master' into aj-metadata-vnext
ascjones Sep 3, 2021
bc90e36
Merge branch 'master' into aj-metadata-vnext
ascjones Sep 6, 2021
e10a528
Cargo.lock
ascjones Sep 6, 2021
c37994e
Merge branch 'master' into aj-metadata-vnext
ascjones Sep 7, 2021
ae88f63
Merge branch 'master' into aj-metadata-vnext
ascjones Sep 9, 2021
9436947
Remove pallet metadata
ascjones Sep 9, 2021
db4b16d
Merge branch 'master' into aj-metadata-vnext
ascjones Sep 13, 2021
9610410
Cargo.lock
ascjones Sep 13, 2021
4e5372d
Merge branch 'master' into aj-metadata-vnext
ascjones Sep 15, 2021
09280c2
Add missing scale-info dependency
ascjones Sep 15, 2021
44b6259
Remove pallet event metadata
ascjones Sep 15, 2021
0bd45fa
Fix error
ascjones Sep 15, 2021
c1e06c6
Fix collective errors
ascjones Sep 15, 2021
48c3076
Semicolol
ascjones Sep 15, 2021
fe3ed51
Fmt
ascjones Sep 15, 2021
7345cb2
Remove another metadata attribute
ascjones Sep 15, 2021
3f2b619
Add new variant to custom digest TypeInfo
ascjones Sep 15, 2021
b993d85
Fmt
ascjones Sep 15, 2021
a0851e2
Cargo.lock from master
ascjones Sep 15, 2021
73e6801
Remove comma lol
ascjones Sep 15, 2021
3737c03
Merge branch 'master' into aj-metadata-vnext
ascjones Sep 15, 2021
cb2605a
Fix example call error
ascjones Sep 15, 2021
6875219
Fix example call error properly
ascjones Sep 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 118 additions & 6 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ members = [
"frame/merkle-mountain-range",
"frame/merkle-mountain-range/primitives",
"frame/merkle-mountain-range/rpc",
"frame/metadata",
"frame/multisig",
"frame/nicks",
"frame/node-authorization",
Expand Down
2 changes: 2 additions & 0 deletions bin/node-template/pallets/template/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
scale-info = { version = "0.10.0", default-features = false, features = ["derive"] }
frame-support = { default-features = false, version = "4.0.0-dev", path = "../../../../frame/support" }
frame-system = { default-features = false, version = "4.0.0-dev", path = "../../../../frame/system" }
frame-benchmarking = { default-features = false, version = "4.0.0-dev", path = "../../../../frame/benchmarking", optional = true }
Expand All @@ -29,6 +30,7 @@ sp-runtime = { default-features = false, version = "4.0.0-dev", path = "../../..
default = ['std']
std = [
'codec/std',
'scale-info/std',
'frame-support/std',
'frame-system/std',
'frame-benchmarking/std',
Expand Down
1 change: 0 additions & 1 deletion bin/node-template/pallets/template/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ pub mod pallet {
// Pallets use events to inform users when important changes are made.
// https://substrate.dev/docs/en/knowledgebase/runtime/events
#[pallet::event]
#[pallet::metadata(T::AccountId = "AccountId")]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
/// Event documentation should end with an array that provides descriptive names for event
Expand Down
2 changes: 2 additions & 0 deletions bin/node-template/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
scale-info = { version = "0.10.0", default-features = false, features = ["derive"] }

pallet-aura = { version = "4.0.0-dev", default-features = false, path = "../../../frame/aura" }
pallet-balances = { version = "4.0.0-dev", default-features = false, path = "../../../frame/balances" }
Expand Down Expand Up @@ -54,6 +55,7 @@ substrate-wasm-builder = { version = "5.0.0-dev", path = "../../../utils/wasm-bu
default = ["std"]
std = [
"codec/std",
"scale-info/std",
"frame-executive/std",
"frame-support/std",
"frame-system-rpc-runtime-api/std",
Expand Down
2 changes: 1 addition & 1 deletion bin/node-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ impl_runtime_apis! {

impl sp_api::Metadata<Block> for Runtime {
fn metadata() -> OpaqueMetadata {
Runtime::metadata().into()
OpaqueMetadata::new(Runtime::metadata().into())
ascjones marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down
3 changes: 2 additions & 1 deletion bin/node/cli/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,8 @@ mod tests {
};
let signer = charlie.clone();

let function = Call::Balances(BalancesCall::transfer(to.into(), amount));
let function =
Call::Balances(BalancesCall::transfer { dest: to.into(), value: amount });

let check_spec_version = frame_system::CheckSpecVersion::new();
let check_tx_version = frame_system::CheckTxVersion::new();
Expand Down
1 change: 1 addition & 0 deletions bin/node/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0" }
scale-info = { version = "0.10.0", features = ["derive"] }
node-primitives = { version = "2.0.0", path = "../primitives" }
node-runtime = { version = "3.0.0-dev", path = "../runtime" }
sc-executor = { version = "0.10.0-dev", path = "../../../client/executor" }
Expand Down
7 changes: 5 additions & 2 deletions bin/node/executor/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,14 @@ fn test_blocks(
let mut test_ext = new_test_ext(genesis_config);
let mut block1_extrinsics = vec![CheckedExtrinsic {
signed: None,
function: Call::Timestamp(pallet_timestamp::Call::set(0)),
function: Call::Timestamp(pallet_timestamp::Call::set { now: 0 }),
}];
block1_extrinsics.extend((0..20).map(|i| CheckedExtrinsic {
signed: Some((alice(), signed_extra(i, 0))),
function: Call::Balances(pallet_balances::Call::transfer(bob().into(), 1 * DOLLARS)),
function: Call::Balances(pallet_balances::Call::transfer {
dest: bob().into(),
value: 1 * DOLLARS,
}),
}));
let block1 =
construct_block(executor, &mut test_ext.ext(), 1, GENESIS_HASH.into(), block1_extrinsics);
Expand Down
72 changes: 36 additions & 36 deletions bin/node/executor/tests/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ fn changes_trie_block() -> (Vec<u8>, Hash) {
vec![
CheckedExtrinsic {
signed: None,
function: Call::Timestamp(pallet_timestamp::Call::set(time)),
function: Call::Timestamp(pallet_timestamp::Call::set { now: time }),
},
CheckedExtrinsic {
signed: Some((alice(), signed_extra(0, 0))),
function: Call::Balances(pallet_balances::Call::transfer(
bob().into(),
69 * DOLLARS,
)),
function: Call::Balances(pallet_balances::Call::transfer {
dest: bob().into(),
value: 69 * DOLLARS,
}),
},
],
(time / SLOT_DURATION).into(),
Expand All @@ -110,14 +110,14 @@ fn blocks() -> ((Vec<u8>, Hash), (Vec<u8>, Hash)) {
vec![
CheckedExtrinsic {
signed: None,
function: Call::Timestamp(pallet_timestamp::Call::set(time1)),
function: Call::Timestamp(pallet_timestamp::Call::set { now: time1 }),
},
CheckedExtrinsic {
signed: Some((alice(), signed_extra(0, 0))),
function: Call::Balances(pallet_balances::Call::transfer(
bob().into(),
69 * DOLLARS,
)),
function: Call::Balances(pallet_balances::Call::transfer {
dest: bob().into(),
value: 69 * DOLLARS,
}),
},
],
(time1 / SLOT_DURATION).into(),
Expand All @@ -130,21 +130,21 @@ fn blocks() -> ((Vec<u8>, Hash), (Vec<u8>, Hash)) {
vec![
CheckedExtrinsic {
signed: None,
function: Call::Timestamp(pallet_timestamp::Call::set(time2)),
function: Call::Timestamp(pallet_timestamp::Call::set { now: time2 }),
},
CheckedExtrinsic {
signed: Some((bob(), signed_extra(0, 0))),
function: Call::Balances(pallet_balances::Call::transfer(
alice().into(),
5 * DOLLARS,
)),
function: Call::Balances(pallet_balances::Call::transfer {
dest: alice().into(),
value: 5 * DOLLARS,
}),
},
CheckedExtrinsic {
signed: Some((alice(), signed_extra(1, 0))),
function: Call::Balances(pallet_balances::Call::transfer(
bob().into(),
15 * DOLLARS,
)),
function: Call::Balances(pallet_balances::Call::transfer {
dest: bob().into(),
value: 15 * DOLLARS,
}),
},
],
(time2 / SLOT_DURATION).into(),
Expand All @@ -165,11 +165,11 @@ fn block_with_size(time: u64, nonce: u32, size: usize) -> (Vec<u8>, Hash) {
vec![
CheckedExtrinsic {
signed: None,
function: Call::Timestamp(pallet_timestamp::Call::set(time * 1000)),
function: Call::Timestamp(pallet_timestamp::Call::set { now: time * 1000 }),
},
CheckedExtrinsic {
signed: Some((alice(), signed_extra(nonce, 0))),
function: Call::System(frame_system::Call::remark(vec![0; size])),
function: Call::System(frame_system::Call::remark { remark: vec![0; size] }),
},
],
(time * 1000 / SLOT_DURATION).into(),
Expand Down Expand Up @@ -356,7 +356,7 @@ fn full_native_block_import_works() {
let mut fees = t.execute_with(|| transfer_fee(&xt()));

let transfer_weight = default_transfer_call().get_dispatch_info().weight;
let timestamp_weight = pallet_timestamp::Call::set::<Runtime>(Default::default())
let timestamp_weight = pallet_timestamp::Call::set::<Runtime> { now: Default::default() }
.get_dispatch_info()
.weight;

Expand Down Expand Up @@ -645,28 +645,28 @@ fn deploying_wasm_contract_should_work() {
vec![
CheckedExtrinsic {
signed: None,
function: Call::Timestamp(pallet_timestamp::Call::set(time)),
function: Call::Timestamp(pallet_timestamp::Call::set { now: time }),
},
CheckedExtrinsic {
signed: Some((charlie(), signed_extra(0, 0))),
function: Call::Contracts(
pallet_contracts::Call::instantiate_with_code::<Runtime>(
1000 * DOLLARS + subsistence,
500_000_000,
transfer_code,
Vec::new(),
Vec::new(),
),
pallet_contracts::Call::instantiate_with_code::<Runtime> {
endowment: 1000 * DOLLARS + subsistence,
gas_limit: 500_000_000,
code: transfer_code,
data: Vec::new(),
salt: Vec::new(),
},
),
},
CheckedExtrinsic {
signed: Some((charlie(), signed_extra(1, 0))),
function: Call::Contracts(pallet_contracts::Call::call::<Runtime>(
sp_runtime::MultiAddress::Id(addr.clone()),
10,
500_000_000,
vec![0x00, 0x01, 0x02, 0x03],
)),
function: Call::Contracts(pallet_contracts::Call::call::<Runtime> {
dest: sp_runtime::MultiAddress::Id(addr.clone()),
value: 10,
gas_limit: 500_000_000,
data: vec![0x00, 0x01, 0x02, 0x03],
}),
},
],
(time / SLOT_DURATION).into(),
Expand Down
2 changes: 1 addition & 1 deletion bin/node/executor/tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub fn sign(xt: CheckedExtrinsic) -> UncheckedExtrinsic {
}

pub fn default_transfer_call() -> pallet_balances::Call<Runtime> {
pallet_balances::Call::transfer::<Runtime>(bob().into(), 69 * DOLLARS)
pallet_balances::Call::<Runtime>::transfer { dest: bob().into(), value: 69 * DOLLARS }
}

pub fn from_block_number(n: u32) -> Header {
Expand Down
10 changes: 6 additions & 4 deletions bin/node/executor/tests/fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ fn fee_multiplier_increases_and_decreases_on_big_weight() {
vec![
CheckedExtrinsic {
signed: None,
function: Call::Timestamp(pallet_timestamp::Call::set(time1)),
function: Call::Timestamp(pallet_timestamp::Call::set { now: time1 }),
},
CheckedExtrinsic {
signed: Some((charlie(), signed_extra(0, 0))),
function: Call::System(frame_system::Call::fill_block(Perbill::from_percent(60))),
function: Call::System(frame_system::Call::fill_block {
ratio: Perbill::from_percent(60),
}),
},
],
(time1 / SLOT_DURATION).into(),
Expand All @@ -75,11 +77,11 @@ fn fee_multiplier_increases_and_decreases_on_big_weight() {
vec![
CheckedExtrinsic {
signed: None,
function: Call::Timestamp(pallet_timestamp::Call::set(time2)),
function: Call::Timestamp(pallet_timestamp::Call::set { now: time2 }),
},
CheckedExtrinsic {
signed: Some((charlie(), signed_extra(1, 0))),
function: Call::System(frame_system::Call::remark(vec![0; 1])),
function: Call::System(frame_system::Call::remark { remark: vec![0; 1] }),
},
],
(time2 / SLOT_DURATION).into(),
Expand Down
26 changes: 19 additions & 7 deletions bin/node/executor/tests/submit_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fn should_submit_unsigned_transaction() {
validators_len: 0,
};

let call = pallet_im_online::Call::heartbeat(heartbeat_data, signature);
let call = pallet_im_online::Call::heartbeat { heartbeat: heartbeat_data, signature };
SubmitTransaction::<Runtime, pallet_im_online::Call<Runtime>>::submit_unsigned_transaction(
call.into(),
)
Expand Down Expand Up @@ -84,7 +84,10 @@ fn should_submit_signed_transaction() {
t.execute_with(|| {
let results =
Signer::<Runtime, TestAuthorityId>::all_accounts().send_signed_transaction(|_| {
pallet_balances::Call::transfer(Default::default(), Default::default())
pallet_balances::Call::transfer {
dest: Default::default(),
value: Default::default(),
}
});

let len = results.len();
Expand Down Expand Up @@ -118,7 +121,10 @@ fn should_submit_signed_twice_from_the_same_account() {
t.execute_with(|| {
let result =
Signer::<Runtime, TestAuthorityId>::any_account().send_signed_transaction(|_| {
pallet_balances::Call::transfer(Default::default(), Default::default())
pallet_balances::Call::transfer {
dest: Default::default(),
value: Default::default(),
}
});

assert!(result.is_some());
Expand All @@ -127,7 +133,10 @@ fn should_submit_signed_twice_from_the_same_account() {
// submit another one from the same account. The nonce should be incremented.
let result =
Signer::<Runtime, TestAuthorityId>::any_account().send_signed_transaction(|_| {
pallet_balances::Call::transfer(Default::default(), Default::default())
pallet_balances::Call::transfer {
dest: Default::default(),
value: Default::default(),
}
});

assert!(result.is_some());
Expand Down Expand Up @@ -163,7 +172,7 @@ fn should_submit_signed_twice_from_all_accounts() {
t.execute_with(|| {
let results = Signer::<Runtime, TestAuthorityId>::all_accounts()
.send_signed_transaction(|_| {
pallet_balances::Call::transfer(Default::default(), Default::default())
pallet_balances::Call::transfer { dest: Default::default(), value: Default::default() }
});

let len = results.len();
Expand All @@ -174,7 +183,7 @@ fn should_submit_signed_twice_from_all_accounts() {
// submit another one from the same account. The nonce should be incremented.
let results = Signer::<Runtime, TestAuthorityId>::all_accounts()
.send_signed_transaction(|_| {
pallet_balances::Call::transfer(Default::default(), Default::default())
pallet_balances::Call::transfer { dest: Default::default(), value: Default::default() }
});

let len = results.len();
Expand Down Expand Up @@ -227,7 +236,10 @@ fn submitted_transaction_should_be_valid() {
t.execute_with(|| {
let results =
Signer::<Runtime, TestAuthorityId>::all_accounts().send_signed_transaction(|_| {
pallet_balances::Call::transfer(Default::default(), Default::default())
pallet_balances::Call::transfer {
dest: Default::default(),
value: Default::default(),
}
});
let len = results.len();
assert_eq!(len, 1);
Expand Down
2 changes: 2 additions & 0 deletions bin/node/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
scale-info = { version = "0.10.0", default-features = false, features = ["derive"] }
frame-system = { version = "4.0.0-dev", default-features = false, path = "../../../frame/system" }
sp-application-crypto = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/application-crypto" }
sp-core = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/core" }
Expand All @@ -25,6 +26,7 @@ pretty_assertions = "0.6.1"
default = ["std"]
std = [
"codec/std",
"scale-info/std",
"frame-system/std",
"sp-application-crypto/std",
"sp-core/std",
Expand Down
2 changes: 2 additions & 0 deletions bin/node/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"]

# third-party dependencies
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] }
scale-info = { version = "0.10.0", default-features = false, features = ["derive"] }
static_assertions = "1.1.0"
hex-literal = { version = "0.3.1", optional = true }
log = { version = "0.4.14", default-features = false }
Expand Down Expand Up @@ -110,6 +111,7 @@ std = [
"pallet-bounties/std",
"sp-block-builder/std",
"codec/std",
"scale-info/std",
"pallet-collective/std",
"pallet-contracts/std",
"pallet-contracts-primitives/std",
Expand Down
Loading