difftreelog
UI types update
in: master
2 files changed
README.mddiffbeforeafterboth--- a/README.md
+++ b/README.md
@@ -81,3 +81,65 @@
```
Additional CLI usage options are available and may be shown by running `cargo run -- --help`.
+
+
+## UI custom types
+```
+{
+ "Schedule": {
+ "version": "u32",
+ "put_code_per_byte_cost": "Gas",
+ "grow_mem_cost": "Gas",
+ "regular_op_cost": "Gas",
+ "return_data_per_byte_cost": "Gas",
+ "event_data_per_byte_cost": "Gas",
+ "event_per_topic_cost": "Gas",
+ "event_base_cost": "Gas",
+ "call_base_cost": "Gas",
+ "instantiate_base_cost": "Gas",
+ "dispatch_base_cost": "Gas",
+ "sandbox_data_read_cost": "Gas",
+ "sandbox_data_write_cost": "Gas",
+ "transfer_cost": "Gas",
+ "instantiate_cost": "Gas",
+ "max_event_topics": "u32",
+ "max_stack_height": "u32",
+ "max_memory_pages": "u32",
+ "max_table_size": "u32",
+ "enable_println": "bool",
+ "max_subject_len": "u32"
+ },
+ "CollectionMode": {
+ "_enum": {
+ "Invalid": null,
+ "NFT": "u32",
+ "Fungible": "u32",
+ "ReFungible": "(u32, u32)"
+ }
+ },
+ "NftItemType": {
+ "Collection": "u64",
+ "Owner": "AccountId",
+ "Data": "Vec<u8>"
+ },
+ "CollectionType": {
+ "Owner": "AccountId",
+ "Mode": "u8",
+ "ModeParam": "u32",
+ "Access": "u8",
+ "NextItemId": "u64",
+ "DecimalPoints": "u32",
+ "Name": "Vec<u16>",
+ "Description": "Vec<u16>",
+ "TokenPrefix": "Vec<u8>",
+ "CustomDataSize": "u32",
+ "OffchainSchema": "Vec<u8>",
+ "Sponsor": "AccountId",
+ "UnconfirmedSponsor": "AccountId"
+ },
+ "RawData": "Vec<u8>",
+ "Address": "AccountId",
+ "LookupSource": "AccountId",
+ "Weight": "u64"
+}
+```
\ No newline at end of file
smart_contract/ink-types-node-runtime/README.mddiffbeforeafterboth1# Node runtime types for `ink!`23Defines types for [ink!](https://github.com/paritytech/ink) smart contracts targeting [Substrate's `node-runtime`](https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs).45Supplies an implementation of the [ink! `EnvTypes` trait](https://github.com/paritytech/ink/blob/master/core/src/env/types.rs#L128).67See `ink!` [examples](./examples) for usage.89## Requirements10```11rustup component add rust-src --toolchain nightly12rustup target add wasm32-unknown-unknown --toolchain nightly13rustup target add wasm32-unknown-unknown --toolchain stable14cargo install cargo-contract --vers 0.6.1 --force15```1617## Build1819### Runtime Dependencies20```21cargo +nightly build --release22```2324### ink! Smart Contract25```26cargo +nightly contract build27cargo +nightly contract generate-metadata28```2930## Test31```32cargo +nightly test33```3435## UI custom types36```37{38 "Schedule": {39 "version": "u32",40 "put_code_per_byte_cost": "Gas",41 "grow_mem_cost": "Gas",42 "regular_op_cost": "Gas",43 "return_data_per_byte_cost": "Gas",44 "event_data_per_byte_cost": "Gas",45 "event_per_topic_cost": "Gas",46 "event_base_cost": "Gas",47 "call_base_cost": "Gas",48 "instantiate_base_cost": "Gas",49 "dispatch_base_cost": "Gas",50 "sandbox_data_read_cost": "Gas",51 "sandbox_data_write_cost": "Gas",52 "transfer_cost": "Gas",53 "instantiate_cost": "Gas",54 "max_event_topics": "u32",55 "max_stack_height": "u32",56 "max_memory_pages": "u32",57 "max_table_size": "u32",58 "enable_println": "bool",59 "max_subject_len": "u32"60 },61 "CollectionMode": {62 "_enum": {63 "Invalid": null,64 "NFT": "u32",65 "Fungible": "u32",66 "ReFungible": null67 }68 },69 "NftItemType": {70 "Collection": "u64",71 "Owner": "AccountId",72 "Data": "Vec<u8>"73 },74 75 76"CollectionType": {77 "Owner": "AccountId",78 "Mode": "u8",79 "ModeParam": "u32",80 "Access": "u8",81 "NextItemId": "u64",82 "DecimalPoints": "u32",83 "Name": "Vec<u16>",84 "Description": "Vec<u16>",85 "TokenPrefix": "Vec<u8>",86 "CustomDataSize": "u32",87 "OffchainSchema": "Vec<u8>",88 "Sponsor": "AccountId",89 "UnconfirmedSponsor": "AccountId"90 },91 "RawData": "Vec<u8>",92 "Address": "AccountId",93 "LookupSource": "AccountId",94 "Weight": "u64"95}96```1# Node runtime types for `ink!`23Defines types for [ink!](https://github.com/paritytech/ink) smart contracts targeting [Substrate's `node-runtime`](https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs).45Supplies an implementation of the [ink! `EnvTypes` trait](https://github.com/paritytech/ink/blob/master/core/src/env/types.rs#L128).67See `ink!` [examples](./examples) for usage.89## Requirements10```11rustup component add rust-src --toolchain nightly12rustup target add wasm32-unknown-unknown --toolchain nightly13rustup target add wasm32-unknown-unknown --toolchain stable14cargo install cargo-contract --vers 0.6.1 --force15```1617## Build1819### Runtime Dependencies20```21cargo +nightly build --release22```2324### ink! Smart Contract25```26cargo +nightly contract build27cargo +nightly contract generate-metadata28```2930## Test31```32cargo +nightly test33```3435## UI custom types36```37{38 "Schedule": {39 "version": "u32",40 "put_code_per_byte_cost": "Gas",41 "grow_mem_cost": "Gas",42 "regular_op_cost": "Gas",43 "return_data_per_byte_cost": "Gas",44 "event_data_per_byte_cost": "Gas",45 "event_per_topic_cost": "Gas",46 "event_base_cost": "Gas",47 "call_base_cost": "Gas",48 "instantiate_base_cost": "Gas",49 "dispatch_base_cost": "Gas",50 "sandbox_data_read_cost": "Gas",51 "sandbox_data_write_cost": "Gas",52 "transfer_cost": "Gas",53 "instantiate_cost": "Gas",54 "max_event_topics": "u32",55 "max_stack_height": "u32",56 "max_memory_pages": "u32",57 "max_table_size": "u32",58 "enable_println": "bool",59 "max_subject_len": "u32"60 },61 "CollectionMode": {62 "_enum": {63 "Invalid": null,64 "NFT": "u32",65 "Fungible": "u32",66 "ReFungible": "(u32, u32)"67 }68 },69 "NftItemType": {70 "Collection": "u64",71 "Owner": "AccountId",72 "Data": "Vec<u8>"73 },74 "CollectionType": {75 "Owner": "AccountId",76 "Mode": "u8",77 "ModeParam": "u32",78 "Access": "u8",79 "NextItemId": "u64",80 "DecimalPoints": "u32",81 "Name": "Vec<u16>",82 "Description": "Vec<u16>",83 "TokenPrefix": "Vec<u8>",84 "CustomDataSize": "u32",85 "OffchainSchema": "Vec<u8>",86 "Sponsor": "AccountId",87 "UnconfirmedSponsor": "AccountId"88 },89 "RawData": "Vec<u8>",90 "Address": "AccountId",91 "LookupSource": "AccountId",92 "Weight": "u64"93}94```