Bump metadata (w/ AssetBalance, AssetDetails) (#2917)

* Bump metadata (w/ AssetBalance, AssetDetails)

* Bluperint for new-style with salt as default

* Use TBalance

* Easier overrides

* Balance

* Build types
This commit is contained in:
Jaco Greeff
2020-12-06 11:31:54 +01:00
committed by GitHub
parent 4e2ab3d11c
commit 8b4d3872d7
11 changed files with 1020 additions and 16 deletions
+698 -6
View File
@@ -561,7 +561,7 @@
" - `calls`: The calls to be dispatched from the same origin.",
"",
" If origin is root then call are dispatch without checking origin filter. (This includes",
" bypassing `frame_system::Trait::BaseCallFilter`).",
" bypassing `frame_system::Config::BaseCallFilter`).",
"",
" # <weight>",
" - Complexity: O(C) where C is the number of calls to be batched.",
@@ -619,7 +619,7 @@
" - `calls`: The calls to be dispatched from the same origin.",
"",
" If origin is root then call are dispatch without checking origin filter. (This includes",
" bypassing `frame_system::Trait::BaseCallFilter`).",
" bypassing `frame_system::Config::BaseCallFilter`).",
"",
" # <weight>",
" - Complexity: O(C) where C is the number of calls to be batched.",
@@ -5971,6 +5971,26 @@
" `EmptyTerm`."
]
},
{
"name": "CandidateSlashed",
"args": [
"AccountId",
"Balance"
],
"documentation": [
" A candidate was slashed due to failing to obtain a seat as member or runner-up"
]
},
{
"name": "SeatHolderSlashed",
"args": [
"AccountId",
"Balance"
],
"documentation": [
" A seat holder (member or runner-up) was slashed due to failing to retaining their position."
]
},
{
"name": "MemberRenounced",
"args": [
@@ -7501,7 +7521,7 @@
"type": {
"Plain": "Schedule"
},
"fallback": "0x000000000004000000000200000001000080000000100000000010000000010000200000000000080075060000c26c020057790300461700003b1d0000730b0000f0170000fb29000053000000c36b0100ce0003000408000067070000e9070000720700007f190000bc2800006508000035b684088f080000ca080000100b00007b0800003c0800005008000081080000de090000cd090000a30900008209000090090000810900009d0900008d090000c6090000fc070000dc0900007209000071090000c41f0000ee1b00009a1f0000a81b0000330900008a090000540900007e0900009909000081090000bd090000b8090000c0a3370000000000a0be37000000000088183700000000001ae0780000000000743637000000000062d9370000000000765737000000000078b27f00000000006a04370000000000603137000000000098065c000000000014251c0000000000e8457200000000000d0100000000000000ea5600000000009302000000000000f812082900000000889b3524000000000ed7ac0900000000b8618b0000000000b8d7c90000000000c2dee307000000005009000000000000160d9600000000000a51491000000000cc07000000000000e23d760a0000000020e41c02000000009a05000000000000c4df050b0000000010bac407000000002eded90a000000000c02000000000000cf020000000000002a346b1d00000000f605000000000000d802000000000000c6d13000000000001710000000000000c0ee320000000000c10c0000000000001a9e2e0000000000c50500000000000024802e0000000000c705000000000000",
"fallback": "0x00000000000400000000020000000100008000000010000000001000000001000020000000000008002a0600001d620200846b03008b180000671d0000610a00001d180000cc2a00005c000000a17001003e020300f307000046070000e807000001080000f4190000db280000a908000013249208f8080000d0080000060b000007090000ad080000520800009c0800006f0a0000e7090000020a0000f30900002b0a0000f8090000d10900001b0a0000390a0000270a0000560f0000dc070000260a000036200000381c0000ec1f0000d51c0000780a0000bc0a00005f0a0000e40900003e0a0000330a0000470a0000270a00006cf1380000000000a0f938000000000040ff3800000000008ca77b00000000001a6c3800000000008876380000000000b481380000000000d4f981000000000028543800000000008a4c380000000000c87d5f00000000008a9f1c0000000000c8e57400000000000b01000000000000983c530000000000a90200000000000050de382a0000000038476124000000006467b209000000002418910000000000b2dfd100000000001a6fe7070000000039090000000000004e86990000000000dad35a1000000000cd07000000000000eaaf830a00000000a01f2a0200000000ae0500000000000008f7270b000000003675e30700000000f4753c09000000000102000000000000d20200000000000008efb81d000000000802000000000000e602000000000000b90a000000000000c25731000000000026100000000000007a8e330000000000d80c00000000000040c22f0000000000d305000000000000067f2f0000000000d705000000000000",
"documentation": [
" Current cost schedule for contracts."
]
@@ -7645,14 +7665,21 @@
{
"name": "data",
"type": "Bytes"
},
{
"name": "salt",
"type": "Bytes"
}
],
"documentation": [
" Instantiates a new contract from the `codehash` generated by `put_code`, optionally transferring some balance.",
" Instantiates a new contract from the `code_hash` generated by `put_code`,",
" optionally transferring some balance.",
"",
" The supplied `salt` is used for contract address deriviation. See `fn contract_address`.",
"",
" Instantiation is executed as follows:",
"",
" - The destination address is computed based on the sender and hash of the code.",
" - The destination address is computed based on the sender, code_hash and the salt.",
" - The smart-contract account is created at the computed address.",
" - The `ctor_code` is executed in the context of the newly-created account. Buffer returned",
" after the execution is saved as the `code` of the account. That code will be invoked",
@@ -7963,6 +7990,14 @@
"documentation": [
" The size defined in `T::MaxValueSize` was exceeded."
]
},
{
"name": "ReentranceDenied",
"documentation": [
" The action performed is not allowed while the contract performing it is already",
" on the call stack. Those actions are contract self destruction and restoration",
" of a tombstone."
]
}
],
"index": 17
@@ -8101,7 +8136,7 @@
{
"name": "SudoAsDone",
"args": [
"bool"
"DispatchResult"
],
"documentation": [
" A sudo just took place. \\[result\\]"
@@ -12088,6 +12123,663 @@
}
],
"index": 30
},
{
"name": "Assets",
"storage": {
"prefix": "Assets",
"items": [
{
"name": "Asset",
"modifier": "Optional",
"type": {
"Map": {
"hasher": "Blake2_128Concat",
"key": "AssetId",
"value": "AssetDetails",
"linked": false
}
},
"fallback": "0x00",
"documentation": [
" Details of an asset."
]
},
{
"name": "Account",
"modifier": "Default",
"type": {
"DoubleMap": {
"hasher": "Blake2_128Concat",
"key1": "AssetId",
"key2": "AccountId",
"value": "AssetBalance",
"key2Hasher": "Blake2_128Concat"
}
},
"fallback": "0x00000000000000000000",
"documentation": [
" The number of units of assets held by any given account."
]
}
]
},
"calls": [
{
"name": "create",
"args": [
{
"name": "id",
"type": "Compact<AssetId>"
},
{
"name": "admin",
"type": "LookupSource"
},
{
"name": "max_zombies",
"type": "u32"
},
{
"name": "min_balance",
"type": "Balance"
}
],
"documentation": [
" Issue a new class of fungible assets from a public origin.",
"",
" This new asset class has no assets initially.",
"",
" The origin must be Signed and the sender must have sufficient funds free.",
"",
" Funds of sender are reserved according to the formula:",
" `AssetDepositBase + AssetDepositPerZombie * max_zombies`.",
"",
" Parameters:",
" - `id`: The identifier of the new asset. This must not be currently in use to identify",
" an existing asset.",
" - `owner`: The owner of this class of assets. The owner has full superuser permissions",
" over this asset, but may later change and configure the permissions using `transfer_ownership`",
" and `set_team`.",
" - `max_zombies`: The total number of accounts which may hold assets in this class yet",
" have no existential deposit.",
" - `min_balance`: The minimum balance of this new asset that any single account must",
" have. If an account's balance is reduced below this, then it collapses to zero.",
"",
" Emits `Created` event when successful.",
"",
" Weight: `O(1)`"
]
},
{
"name": "force_create",
"args": [
{
"name": "id",
"type": "Compact<AssetId>"
},
{
"name": "owner",
"type": "LookupSource"
},
{
"name": "max_zombies",
"type": "Compact<u32>"
},
{
"name": "min_balance",
"type": "Compact<Balance>"
}
],
"documentation": [
" Issue a new class of fungible assets from a privileged origin.",
"",
" This new asset class has no assets initially.",
"",
" The origin must conform to `ForceOrigin`.",
"",
" Unlike `create`, no funds are reserved.",
"",
" - `id`: The identifier of the new asset. This must not be currently in use to identify",
" an existing asset.",
" - `owner`: The owner of this class of assets. The owner has full superuser permissions",
" over this asset, but may later change and configure the permissions using `transfer_ownership`",
" and `set_team`.",
" - `max_zombies`: The total number of accounts which may hold assets in this class yet",
" have no existential deposit.",
" - `min_balance`: The minimum balance of this new asset that any single account must",
" have. If an account's balance is reduced below this, then it collapses to zero.",
"",
" Emits `ForceCreated` event when successful.",
"",
" Weight: `O(1)`"
]
},
{
"name": "destroy",
"args": [
{
"name": "id",
"type": "Compact<AssetId>"
},
{
"name": "zombies_witness",
"type": "Compact<u32>"
}
],
"documentation": [
" Destroy a class of fungible assets owned by the sender.",
"",
" The origin must be Signed and the sender must be the owner of the asset `id`.",
"",
" - `id`: The identifier of the asset to be destroyed. This must identify an existing",
" asset.",
"",
" Emits `Destroyed` event when successful.",
"",
" Weight: `O(z)` where `z` is the number of zombie accounts."
]
},
{
"name": "force_destroy",
"args": [
{
"name": "id",
"type": "Compact<AssetId>"
},
{
"name": "zombies_witness",
"type": "Compact<u32>"
}
],
"documentation": [
" Destroy a class of fungible assets.",
"",
" The origin must conform to `ForceOrigin`.",
"",
" - `id`: The identifier of the asset to be destroyed. This must identify an existing",
" asset.",
"",
" Emits `Destroyed` event when successful.",
"",
" Weight: `O(1)`"
]
},
{
"name": "mint",
"args": [
{
"name": "id",
"type": "Compact<AssetId>"
},
{
"name": "beneficiary",
"type": "LookupSource"
},
{
"name": "amount",
"type": "Compact<Balance>"
}
],
"documentation": [
" Mint assets of a particular class.",
"",
" The origin must be Signed and the sender must be the Issuer of the asset `id`.",
"",
" - `id`: The identifier of the asset to have some amount minted.",
" - `beneficiary`: The account to be credited with the minted assets.",
" - `amount`: The amount of the asset to be minted.",
"",
" Emits `Destroyed` event when successful.",
"",
" Weight: `O(1)`",
" Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`."
]
},
{
"name": "burn",
"args": [
{
"name": "id",
"type": "Compact<AssetId>"
},
{
"name": "who",
"type": "LookupSource"
},
{
"name": "amount",
"type": "Compact<Balance>"
}
],
"documentation": [
" Reduce the balance of `who` by as much as possible up to `amount` assets of `id`.",
"",
" Origin must be Signed and the sender should be the Manager of the asset `id`.",
"",
" Bails with `BalanceZero` if the `who` is already dead.",
"",
" - `id`: The identifier of the asset to have some amount burned.",
" - `who`: The account to be debited from.",
" - `amount`: The maximum amount by which `who`'s balance should be reduced.",
"",
" Emits `Burned` with the actual amount burned. If this takes the balance to below the",
" minimum for the asset, then the amount burned is increased to take it to zero.",
"",
" Weight: `O(1)`",
" Modes: Post-existence of `who`; Pre & post Zombie-status of `who`."
]
},
{
"name": "transfer",
"args": [
{
"name": "id",
"type": "Compact<AssetId>"
},
{
"name": "target",
"type": "LookupSource"
},
{
"name": "amount",
"type": "Compact<Balance>"
}
],
"documentation": [
" Move some assets from the sender account to another.",
"",
" Origin must be Signed.",
"",
" - `id`: The identifier of the asset to have some amount transferred.",
" - `target`: The account to be credited.",
" - `amount`: The amount by which the sender's balance of assets should be reduced and",
" `target`'s balance increased. The amount actually transferred may be slightly greater in",
" the case that the transfer would otherwise take the sender balance above zero but below",
" the minimum balance. Must be greater than zero.",
"",
" Emits `Transferred` with the actual amount transferred. If this takes the source balance",
" to below the minimum for the asset, then the amount transferred is increased to take it",
" to zero.",
"",
" Weight: `O(1)`",
" Modes: Pre-existence of `target`; Post-existence of sender; Prior & post zombie-status",
" of sender; Account pre-existence of `target`."
]
},
{
"name": "force_transfer",
"args": [
{
"name": "id",
"type": "Compact<AssetId>"
},
{
"name": "source",
"type": "LookupSource"
},
{
"name": "dest",
"type": "LookupSource"
},
{
"name": "amount",
"type": "Compact<Balance>"
}
],
"documentation": [
" Move some assets from one account to another.",
"",
" Origin must be Signed and the sender should be the Admin of the asset `id`.",
"",
" - `id`: The identifier of the asset to have some amount transferred.",
" - `source`: The account to be debited.",
" - `dest`: The account to be credited.",
" - `amount`: The amount by which the `source`'s balance of assets should be reduced and",
" `dest`'s balance increased. The amount actually transferred may be slightly greater in",
" the case that the transfer would otherwise take the `source` balance above zero but",
" below the minimum balance. Must be greater than zero.",
"",
" Emits `Transferred` with the actual amount transferred. If this takes the source balance",
" to below the minimum for the asset, then the amount transferred is increased to take it",
" to zero.",
"",
" Weight: `O(1)`",
" Modes: Pre-existence of `dest`; Post-existence of `source`; Prior & post zombie-status",
" of `source`; Account pre-existence of `dest`."
]
},
{
"name": "freeze",
"args": [
{
"name": "id",
"type": "Compact<AssetId>"
},
{
"name": "who",
"type": "LookupSource"
}
],
"documentation": [
" Disallow further unprivileged transfers from an account.",
"",
" Origin must be Signed and the sender should be the Freezer of the asset `id`.",
"",
" - `id`: The identifier of the asset to be frozen.",
" - `who`: The account to be frozen.",
"",
" Emits `Frozen`.",
"",
" Weight: `O(1)`"
]
},
{
"name": "thaw",
"args": [
{
"name": "id",
"type": "Compact<AssetId>"
},
{
"name": "who",
"type": "LookupSource"
}
],
"documentation": [
" Allow unprivileged transfers from an account again.",
"",
" Origin must be Signed and the sender should be the Admin of the asset `id`.",
"",
" - `id`: The identifier of the asset to be frozen.",
" - `who`: The account to be unfrozen.",
"",
" Emits `Thawed`.",
"",
" Weight: `O(1)`"
]
},
{
"name": "transfer_ownership",
"args": [
{
"name": "id",
"type": "Compact<AssetId>"
},
{
"name": "owner",
"type": "LookupSource"
}
],
"documentation": [
" Change the Owner of an asset.",
"",
" Origin must be Signed and the sender should be the Owner of the asset `id`.",
"",
" - `id`: The identifier of the asset to be frozen.",
" - `owner`: The new Owner of this asset.",
"",
" Emits `OwnerChanged`.",
"",
" Weight: `O(1)`"
]
},
{
"name": "set_team",
"args": [
{
"name": "id",
"type": "Compact<AssetId>"
},
{
"name": "issuer",
"type": "LookupSource"
},
{
"name": "admin",
"type": "LookupSource"
},
{
"name": "freezer",
"type": "LookupSource"
}
],
"documentation": [
" Change the Issuer, Admin and Freezer of an asset.",
"",
" Origin must be Signed and the sender should be the Owner of the asset `id`.",
"",
" - `id`: The identifier of the asset to be frozen.",
" - `issuer`: The new Issuer of this asset.",
" - `admin`: The new Admin of this asset.",
" - `freezer`: The new Freezer of this asset.",
"",
" Emits `TeamChanged`.",
"",
" Weight: `O(1)`"
]
},
{
"name": "set_max_zombies",
"args": [
{
"name": "id",
"type": "Compact<AssetId>"
},
{
"name": "max_zombies",
"type": "Compact<u32>"
}
],
"documentation": []
}
],
"events": [
{
"name": "Created",
"args": [
"AssetId",
"AccountId",
"AccountId"
],
"documentation": [
" Some asset class was created. \\[asset_id, creator, owner\\]"
]
},
{
"name": "Issued",
"args": [
"AssetId",
"AccountId",
"Balance"
],
"documentation": [
" Some assets were issued. \\[asset_id, owner, total_supply\\]"
]
},
{
"name": "Transferred",
"args": [
"AssetId",
"AccountId",
"AccountId",
"Balance"
],
"documentation": [
" Some assets were transferred. \\[asset_id, from, to, amount\\]"
]
},
{
"name": "Burned",
"args": [
"AssetId",
"AccountId",
"Balance"
],
"documentation": [
" Some assets were destroyed. \\[asset_id, owner, balance\\]"
]
},
{
"name": "TeamChanged",
"args": [
"AssetId",
"AccountId",
"AccountId",
"AccountId"
],
"documentation": [
" The management team changed \\[asset_id, issuer, admin, freezer\\]"
]
},
{
"name": "OwnerChanged",
"args": [
"AssetId",
"AccountId"
],
"documentation": [
" The owner changed \\[asset_id, owner\\]"
]
},
{
"name": "ForceTransferred",
"args": [
"AssetId",
"AccountId",
"AccountId",
"Balance"
],
"documentation": [
" Some assets was transferred by an admin. \\[asset_id, from, to, amount\\]"
]
},
{
"name": "Frozen",
"args": [
"AssetId",
"AccountId"
],
"documentation": [
" Some account `who` was frozen. \\[asset_id, who\\]"
]
},
{
"name": "Thawed",
"args": [
"AssetId",
"AccountId"
],
"documentation": [
" Some account `who` was thawed. \\[asset_id, who\\]"
]
},
{
"name": "Destroyed",
"args": [
"AssetId"
],
"documentation": [
" An asset class was destroyed."
]
},
{
"name": "ForceCreated",
"args": [
"AssetId",
"AccountId"
],
"documentation": [
" Some asset class was force-created. \\[asset_id, owner\\]"
]
},
{
"name": "MaxZombiesChanged",
"args": [
"AssetId",
"u32"
],
"documentation": [
" The maximum amount of zombies allowed has changed. \\[asset_id, max_zombies\\]"
]
}
],
"constants": [],
"errors": [
{
"name": "AmountZero",
"documentation": [
" Transfer amount should be non-zero."
]
},
{
"name": "BalanceLow",
"documentation": [
" Account balance must be greater than or equal to the transfer amount."
]
},
{
"name": "BalanceZero",
"documentation": [
" Balance should be non-zero."
]
},
{
"name": "NoPermission",
"documentation": [
" The signing account has no permission to do the operation."
]
},
{
"name": "Unknown",
"documentation": [
" The given asset ID is unknown."
]
},
{
"name": "Frozen",
"documentation": [
" The origin account is frozen."
]
},
{
"name": "InUse",
"documentation": [
" The asset ID is already taken."
]
},
{
"name": "TooManyZombies",
"documentation": [
" Too many zombie accounts in use."
]
},
{
"name": "RefsLeft",
"documentation": [
" Attempt to destroy an asset class when non-zombie, reference-bearing accounts exist."
]
},
{
"name": "BadWitness",
"documentation": [
" Invalid witness data given."
]
},
{
"name": "MinBalanceZero",
"documentation": [
" Minimum balance should be non-zero."
]
},
{
"name": "Overflow",
"documentation": [
" A mint operation lead to an overflow."
]
}
],
"index": 31
}
],
"extrinsic": {
File diff suppressed because one or more lines are too long