git.delta.rocks / unique-network / refs/commits / eff94a7bb42c

difftreelog

UI types update

str-mv2020-08-04parent: #c460406.patch.diff
in: master

2 files changed

modifiedREADME.mddiffbeforeafterboth
--- a/README.md
+++ b/README.md
@@ -124,8 +124,7 @@
   },
   "CollectionType": {
     "Owner": "AccountId",
-    "Mode": "u8",
-    "ModeParam": "u32",
+    "Mode": "CollectionMode",
     "Access": "u8",
     "NextItemId": "u64",
     "DecimalPoints": "u32",
modifiedsmart_contract/ink-types-node-runtime/README.mddiffbeforeafterboth
before · smart_contract/ink-types-node-runtime/README.md
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```
after · smart_contract/ink-types-node-runtime/README.md
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": "CollectionMode",77    "Access": "u8",78    "NextItemId": "u64",79    "DecimalPoints": "u32",80    "Name": "Vec<u16>",81    "Description": "Vec<u16>",82    "TokenPrefix": "Vec<u8>",83    "CustomDataSize": "u32",84    "OffchainSchema": "Vec<u8>",85    "Sponsor": "AccountId",86    "UnconfirmedSponsor": "AccountId"87  },88  "RawData": "Vec<u8>",89  "Address": "AccountId",90  "LookupSource": "AccountId",91  "Weight": "u64"92}93```