diff --git a/spec/Transaction.md b/spec/Transaction.md index cf688beec4..f084846eca 100644 --- a/spec/Transaction.md +++ b/spec/Transaction.md @@ -22,6 +22,7 @@ enum Action { MintAsset { ..., }, TransferAsset { ..., }, ChangeAssetScheme { ..., }, + IncreaseAssetSupply { ..., }, Pay { ..., }, SetRegularKey { ..., }, WrapCCC { ..., }, @@ -43,6 +44,10 @@ This kind of asset needs permission to be transferred. A regulated asset is an asset that has an registrar. The registrar can change the asset scheme and transfer the asset arbitrarily. +If the `allowed_script_hashes` is specified, this asset can be only locked with +the lock script hashes in the list. If the list is empty, any lock script hashes +can be used. + ```rust MintAsset { network_id: NetworkId, @@ -50,6 +55,7 @@ MintAsset { metadata: String, approver: Option, registrar: Option, + allowed_script_hashes: Vec, output: AssetMintOutput, @@ -136,23 +142,42 @@ Only the registrar of the asset can use it. ```rust ChangeAssetScheme { network_id: NetworkId, - asset_type: H256, + shard_id: ShardId, + asset_type: H160, + seq: usize, metadata: String, approver: Option, registrar: Option, + allowed_script_hashes: Vec, approvals: Vec, } ``` +## IncreaseAssetSupply + +It increases the total supply of the asset. +Only the registrar of the asset can use it. + +```rust +IncreaseAssetSupply { + network_id: NetworkId, + shard_id: ShardId, + asset_type: H160, + seq: usize, + output: AssetMintOutput, + approvals: Vec, +} +``` + ## Pay -`Pay` sends `value` amount of CCC to the `receiver`. +`Pay` sends `quantity` amount of CCC to the `receiver`. ```rust Pay { receiver: Address, - amount: u64, + quantity: u64, } ``` @@ -176,7 +201,8 @@ WrapCCC { shard_id: ShardId, lock_script_hash: H160, parameters: Vec, - amount: u64, + quantity: u64, + payer: Address, } ``` @@ -193,13 +219,6 @@ UnwrapCCC { } ``` -```rust -Custom { - handler_id: u64, - bytes: Bytes, -} -``` - ## Store This is a special kind of transaction that allows a user to upload text onto the blockchain. @@ -227,3 +246,10 @@ Remove { `Custom` is a special transaction. The types of transactions that may exist depends on the consensus engine. + +```rust +Custom { + handler_id: u64, + bytes: Bytes, +} +```