Evolution of Cardano crosschain contracts.
-
Responsible to mint a NFT Token such as GroupNFTToken and AdminNFTToken.
-
GroupNFTToken stores important parameters for crosschain ,such as GPK, in inline datum
-
AdminNFTToken stores Administator parameters ,such as all Administators's PK of and the Authorization thresholds, in inline datum
-
The contract holds the GroupNFT.
-
The contract locks the crosschain assets (only cardano native token and ada). User send assets to Treasury when cross assets from Cardano to orther chains, and transfer assets from Treasury when crossing back.
-
The contract holds the TreasuryCheckToken minted via CheckToken, is responsible for verifying the spend operation of Treasury is authorized.
-
Responsible to mint Mapping Token of the crosschain assets which is from orther chain.
-
The contract holds the MintCheckToken minted via CheckToken, is responsible for verifying the Mint operation of MappingToken is authorized.
-
The contract locks the NFT assets (only cardano native token and ada). User send assets to NFTTreasury when cross assets from Cardano to orther chains, and transfer assets from NFTTreasury when crossing back.
-
The contract holds the NFTTreasuryCheckToken minted via CheckToken, is responsible for verifying the spend operation of NFTTreasury is authorized.
-
Responsible to mint NFT Mapping Token of the crosschain NFT assets which is from orther chain.
-
The contract holds the NFTMintCheckToken minted via CheckToken, is responsible for verifying the Mint operation of NFT MappingToken is authorized.
-
The contract address is usually used as the stake address for orther payment address such as Treasury.
-
Responsible for verifying the operations of StoremanStake is is authorized by Admin.
-
The contract holds the AdminNFTToken minted via GroupNFT. Any managerment operations must be authorized by the AdminNFTHolder.
Scenario | Input | Referece Input | Output | Validator Rules | |
---|---|---|---|---|---|
Management Tx | Mint GroupNFT Token | 1. utxo which is specified by the contract parameters | 1. utxo with GroupNFT Token (whose owner is usually the GroupNFTHolder) | 1. must spend the utxo which is specified by GroupNFT ‘s parameter | |
Update GroupNFT Token | 1. utxo with GroupNFT Token | 1. utxo with GroupInfoNFT Token | 1. must spend utxo with AdminNFT when update any one of the parameters or signed by oracle-worker when update GPK. 2. update only one of the parameter at a time except when setting a new version(upgrading the GroupNFTHolder contract) 3. check the owner of GroupNFT is not changed except when setting a new version. |
||
Mint AdminNFT Token | 1.utxo which is specified by the contract parameters | 1.utxo with AdminNFT Token (whose owner is usually the AdminNFTHolder) | 1. must spend the utxo which is specified by GroupNFT‘s parameter( an another utxo is different with in Mint GrouNFT ) | ||
Spend AdminNFT Token | 1. utxo with AdminNFT Token | 1. utxo with AdminNFT Token | 1. satisfies m/n multi-signatures 2. check AdminNFT in outputs: i) if action is Update ,check the new datum of the AdminNFT is valid. And the owner is AdminNFTHolder ii) if action is Use , check the datum of the AdminNFT is not changed.And the owner is AdminNFTHolder iii) if action is Upgrade ,the owner of AdminNFT must be a contract |
||
Mint XXXCheckToken | 1.utxo with AdminNFT Token | 1.utxo with AdminNFT |
1. must spend AdminNFT 2. check the owner of XXXCheckToken in outputs: i) TreasuryCheckToken is owner By TreasuryCheck ii) MintCheckToken is owner By MintCheck iii) NFTTreasuryCheckToken is owner By NFTTreasuryCheck iiii) NFTMintCheckToken is owner By NFTMintCheck 3. check the amount of XXXCheckToken in each utxo is no bigger than 1 |
||
Burn XXXCheckToken | 1.utxo with AdminNFT Token | 1.utxo with AdminNFT | 1. must spend AdminNFT 2. check all XXXCheckToken has been burned |
||
Operations about Stake | 1.utxo with AdminNFT Token | 1.utxo with AdminNFT 2. utxo owner by StackCheck if needed |
1. must spend AdminNFT 2. check one of the outputs owner by StackCheck if redeemer is SpendU. |
||
Storeman Tx | Storeman Token Release: wanADA/wanTokenOut@EVM => ADA/TokenOut@ADA | 1. utxos owned by Treasury 2. utxo with TreasuryCheckToken owner by TreasuryCheck |
1. utxo with GroupInfoNFT | 1. utxos with assets transferd from Treasury 2. utxo with TreasuryCheckToken 3. utxos as changes if needed |
1. check the redeemer is signed by MPC 2. check the tx must spend the utxo specified by the redeemer 3. check the transfer assets is no bigger than the amount specified by the redeemer. 4. check the assets received by user is no less than the amount specified by the redeemer. 5. check the tx is not expired. 6. check the owner of TresuryCheckToken is still the TreasuryCheck. 7. check the datum of the use's output is the userData specified by redeemer if the user is a contract |
Storeman Token Mint: TokenIn@EVM ==> wanTokenIn@ADA | 1. utxo with MintCheckToken owner By MintCheck | 1. utxo with GroupInfoNFT | 1. utxos with MappingToken 2. utxo with MintCheckToken 3. utxos as changes if needed |
1. check the redeemer is signed by MPC 2. check the tx must spend the utxo specified by the redeemer 3. check the minted assets is equal the amount specified by the redeemer. 4. check the assets received by user is no less then the amount specified by the redeemer. 5. check the tx is not expired. 6. check the owner of MintCheckToken is still the MintCheck. 7. check the datum of the use's output is the userData specified by redeemer if the user is a contract |
|
Storeman NFT Release: wanNFTOut@EVM ==> NFTOut@ADA | 1. utxos owned by NFTTreasury 2. utxo with NFTTreasuryCheckToken owner by NFTTreasuryCheck |
1. utxo with GroupInfoNFT | 1. utxos with NFT assets 2. utxo with TreasuryCheckToken 3. utxos as changes if needed |
1. check the redeemer is signed by MPC 2. check the tx must spend the utxo specified by the redeemer 3. check the transfer assets is no bigger than the amount specified by the redeemer. 4. check the assets received by user is no less than the amount specified by the redeemer. 5. check the tx is not expired. 6. check the owner of NFTTresuryCheckToken is still the NFTTreasuryCheck. 7. check the datum of the use's output is the userData specified by redeemer if the user is a contract 8. only the assets has the same policy can be tranfered together except that if txType == 2 |
|
Storeman NFT Mint: NFTIn@EVM ==> wanNFTIn@ADA | 1. utxo with MintNFTCheckToken owner By NFTMintCheck | 1. utxo with GroupInfoNFT | 1. utxos with NFTMappingToken and NFT Reference Token 2. utxo with NFTMintCheckToken 3. utxos as changes if needed |
1. check the redeemer is signed by MPC 2. check the tx must spend the utxo specified by the redeemer 3. check the amount , datum and owner fo the minted NFT Mapping Token match the redeemer 4. check the types and datums of the minted NFT Reference Token match the redeemer, and the owner is NFTRefHolder (specified by GrouNFT's datum) 5. check the tx is not expired. 6. check the owner of NFTMintCheckToken is still the NFTMintCheck 7. only the NFT assets has the same policy can be minted together |
|
User Tx | User Token Lock: ADA/TokenOut@ADA ==> wanADA/wanTokenOut@EVM | 1. user's utxo | 1. utxo with user's locked Token owned by Treasury 2. utxos as changes if needed |
||
User Token Burn: wanTokenIn@ADA ==> TokenIn@EVM | 1. user's utxo | 1. utxos as changes if needed | |||
User NFT Lock: NFTOut@ADA ==> wanNFTOut@EVM | 1. user's utxo | 1. utxo with user's locked Token owned by Treasury 2. utxos as changes if needed |
|||
User NFT Burn: wanNFTIn@ADA ==> NFTIn@EVM | 1. user's utxo | 1. utxos as changes if needed | |||