-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from onflow/add-flix
Add flix
- Loading branch information
Showing
27 changed files
with
1,218 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"f_type": "InteractionTemplate", | ||
"f_version": "1.1.0", | ||
"id": "b5d035292a57c659f4b7736626fc6499fb1e8395fee480da950f07f6e8c19c63", | ||
"data": { | ||
"type": "transaction", | ||
"interface": "", | ||
"messages": null, | ||
"cadence": { | ||
"body": "import \"MigrationContractStaging\"\n\n/// Commits the results of offchain emulated migration\n///\ntransaction(snapshotTimestamp: UFix64, failedContracts: [String]) {\n \n let admin: \u0026MigrationContractStaging.Admin\n\n prepare(signer: AuthAccount) {\n self.admin = signer.borrow\u003c\u0026MigrationContractStaging.Admin\u003e(from: MigrationContractStaging.AdminStoragePath)\n ?? panic(\"Could not borrow Admin reference\")\n }\n\n execute {\n self.admin.commitMigrationResults(snapshot: snapshotTimestamp, failed: failedContracts)\n }\n\n post {\n MigrationContractStaging.lastEmulatedMigrationResult!.failedContracts == failedContracts \u0026\u0026\n MigrationContractStaging.lastEmulatedMigrationResult!.snapshot == snapshotTimestamp:\n \"Problem committing migration results\"\n }\n}\n", | ||
"network_pins": [ | ||
{ | ||
"network": "testnet", | ||
"pin_self": "8d65a5baf3b2110f7aad12849a3339f469c7f422962f15b1958b654d41864f5f" | ||
} | ||
] | ||
}, | ||
"dependencies": [ | ||
{ | ||
"contracts": [ | ||
{ | ||
"contract": "MigrationContractStaging", | ||
"networks": [ | ||
{ | ||
"network": "testnet", | ||
"address": "0x2ceae959ed1a7e7a", | ||
"dependency_pin_block_height": 156164536, | ||
"dependency_pin": { | ||
"pin": "3db75e59355d07498d1dbd1719a383a487562c7cf558450898103212109954cb", | ||
"pin_self": "ebb923e929faf7299d117ff5159becccb54378c47b08bf30c6d0774f3ee21d61", | ||
"pin_contract_name": "MigrationContractStaging", | ||
"pin_contract_address": "0x2ceae959ed1a7e7a", | ||
"imports": [] | ||
} | ||
}, | ||
{ | ||
"network": "crescendo", | ||
"address": "0x27b2302520211b67", | ||
"dependency_pin_block_height": 0 | ||
}, | ||
{ | ||
"network": "emulator", | ||
"address": "0xf8d6e0586b0a20c7", | ||
"dependency_pin_block_height": 0 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"parameters": [ | ||
{ | ||
"label": "snapshotTimestamp", | ||
"index": 0, | ||
"type": "UFix64", | ||
"messages": [] | ||
}, | ||
{ | ||
"label": "failedContracts", | ||
"index": 1, | ||
"type": "[String]", | ||
"messages": [] | ||
} | ||
] | ||
} | ||
} |
85 changes: 85 additions & 0 deletions
85
flix/get_all_staged_contract_code_for_address.cdc.flix.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{ | ||
"f_type": "InteractionTemplate", | ||
"f_version": "1.1.0", | ||
"id": "3339b93ff5eeb990bf856cedfffcc475d4857271ca20e09e1536f819b308e46c", | ||
"data": { | ||
"type": "script", | ||
"interface": "", | ||
"messages": [ | ||
{ | ||
"key": "title", | ||
"i18n": [ | ||
{ | ||
"tag": "en-US", | ||
"translation": "Get All Staged Contract Code for Address" | ||
} | ||
] | ||
}, | ||
{ | ||
"key": "description", | ||
"i18n": [ | ||
{ | ||
"tag": "en-US", | ||
"translation": "Returns a mapping of all contract code staged for a given address indexed on the contract name." | ||
} | ||
] | ||
} | ||
], | ||
"cadence": { | ||
"body": "import \"MigrationContractStaging\"\n\n#interaction (\n version: \"1.1.0\",\n title: \"Get All Staged Contract Code for Address\",\n description: \"Returns a mapping of all contract code staged for a given address indexed on the contract name.\",\n language: \"en-US\",\n)\n\n/// Returns the code for all staged contracts hosted by the given contract address.\n///\naccess(all) fun main(contractAddress: Address): {String: String} {\n return MigrationContractStaging.getAllStagedContractCode(forAddress: contractAddress)\n}\n", | ||
"network_pins": [ | ||
{ | ||
"network": "testnet", | ||
"pin_self": "a311a6849e9ee49e8204e9ebd6b623ae2edb1643b160bbcf4bf47c45e4ef7f74" | ||
} | ||
] | ||
}, | ||
"dependencies": [ | ||
{ | ||
"contracts": [ | ||
{ | ||
"contract": "MigrationContractStaging", | ||
"networks": [ | ||
{ | ||
"network": "crescendo", | ||
"address": "0x27b2302520211b67", | ||
"dependency_pin_block_height": 0 | ||
}, | ||
{ | ||
"network": "emulator", | ||
"address": "0xf8d6e0586b0a20c7", | ||
"dependency_pin_block_height": 0 | ||
}, | ||
{ | ||
"network": "testnet", | ||
"address": "0x2ceae959ed1a7e7a", | ||
"dependency_pin_block_height": 156164546, | ||
"dependency_pin": { | ||
"pin": "3db75e59355d07498d1dbd1719a383a487562c7cf558450898103212109954cb", | ||
"pin_self": "ebb923e929faf7299d117ff5159becccb54378c47b08bf30c6d0774f3ee21d61", | ||
"pin_contract_name": "MigrationContractStaging", | ||
"pin_contract_address": "0x2ceae959ed1a7e7a", | ||
"imports": [] | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"parameters": [ | ||
{ | ||
"label": "contractAddress", | ||
"index": 0, | ||
"type": "Address", | ||
"messages": [] | ||
} | ||
], | ||
"output": { | ||
"label": "result", | ||
"index": 0, | ||
"type": "{String: String}", | ||
"messages": [] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"f_type": "InteractionTemplate", | ||
"f_version": "1.1.0", | ||
"id": "177036477cd12a2b30c54e841c690ed14fcee5f52174d30294debd3f3e264df0", | ||
"data": { | ||
"type": "script", | ||
"interface": "", | ||
"messages": [ | ||
{ | ||
"key": "title", | ||
"i18n": [ | ||
{ | ||
"tag": "en-US", | ||
"translation": "Get All Staged Contract Hosts" | ||
} | ||
] | ||
}, | ||
{ | ||
"key": "description", | ||
"i18n": [ | ||
{ | ||
"tag": "en-US", | ||
"translation": "Returns an array containing the addresses of all contract hosting accounts that have staged contracts." | ||
} | ||
] | ||
} | ||
], | ||
"cadence": { | ||
"body": "import \"MigrationContractStaging\"\n\n#interaction (\n version: \"1.1.0\",\n title: \"Get All Staged Contract Hosts\",\n description: \"Returns an array containing the addresses of all contract hosting accounts that have staged contracts.\",\n language: \"en-US\",\n)\n\n/// Returns the code for all staged contracts hosted by the given contract address.\n///\naccess(all) fun main(): [Address] {\n return MigrationContractStaging.getAllStagedContractHosts()\n}\n", | ||
"network_pins": [ | ||
{ | ||
"network": "testnet", | ||
"pin_self": "93a15c87c9ac5bebb293094d1a7c96ea389a36331925065a0f15201c8804a3e0" | ||
} | ||
] | ||
}, | ||
"dependencies": [ | ||
{ | ||
"contracts": [ | ||
{ | ||
"contract": "MigrationContractStaging", | ||
"networks": [ | ||
{ | ||
"network": "testnet", | ||
"address": "0x2ceae959ed1a7e7a", | ||
"dependency_pin_block_height": 156164557, | ||
"dependency_pin": { | ||
"pin": "3db75e59355d07498d1dbd1719a383a487562c7cf558450898103212109954cb", | ||
"pin_self": "ebb923e929faf7299d117ff5159becccb54378c47b08bf30c6d0774f3ee21d61", | ||
"pin_contract_name": "MigrationContractStaging", | ||
"pin_contract_address": "0x2ceae959ed1a7e7a", | ||
"imports": [] | ||
} | ||
}, | ||
{ | ||
"network": "crescendo", | ||
"address": "0x27b2302520211b67", | ||
"dependency_pin_block_height": 0 | ||
}, | ||
{ | ||
"network": "emulator", | ||
"address": "0xf8d6e0586b0a20c7", | ||
"dependency_pin_block_height": 0 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"parameters": null, | ||
"output": { | ||
"label": "result", | ||
"index": 0, | ||
"type": "[Address]", | ||
"messages": [] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"f_type": "InteractionTemplate", | ||
"f_version": "1.1.0", | ||
"id": "18a15b80ffd7c8cf3203abcc5a92be4fce38b3d96e0873d63bb961ff1d88c759", | ||
"data": { | ||
"type": "script", | ||
"interface": "", | ||
"messages": [ | ||
{ | ||
"key": "title", | ||
"i18n": [ | ||
{ | ||
"tag": "en-US", | ||
"translation": "Get All Staged Contracts" | ||
} | ||
] | ||
}, | ||
{ | ||
"key": "description", | ||
"i18n": [ | ||
{ | ||
"tag": "en-US", | ||
"translation": "Returns a mapping of all staged contract updates." | ||
} | ||
] | ||
} | ||
], | ||
"cadence": { | ||
"body": "import \"MigrationContractStaging\"\n\n#interaction (\n version: \"1.1.0\",\n title: \"Get All Staged Contracts\",\n description: \"Returns a mapping of all staged contract updates.\",\n language: \"en-US\",\n)\n\n/// Returns all staged contracts as a mapping of address to an array of contract names\n///\naccess(all) fun main(): {Address: [String]} {\n return MigrationContractStaging.getAllStagedContracts()\n}\n", | ||
"network_pins": [ | ||
{ | ||
"network": "testnet", | ||
"pin_self": "daa55e7567d1561aaab9ab9b68092dea8e13837b70b0c3eaa9fa257f09dd4595" | ||
} | ||
] | ||
}, | ||
"dependencies": [ | ||
{ | ||
"contracts": [ | ||
{ | ||
"contract": "MigrationContractStaging", | ||
"networks": [ | ||
{ | ||
"network": "testnet", | ||
"address": "0x2ceae959ed1a7e7a", | ||
"dependency_pin_block_height": 156164553, | ||
"dependency_pin": { | ||
"pin": "3db75e59355d07498d1dbd1719a383a487562c7cf558450898103212109954cb", | ||
"pin_self": "ebb923e929faf7299d117ff5159becccb54378c47b08bf30c6d0774f3ee21d61", | ||
"pin_contract_name": "MigrationContractStaging", | ||
"pin_contract_address": "0x2ceae959ed1a7e7a", | ||
"imports": [] | ||
} | ||
}, | ||
{ | ||
"network": "crescendo", | ||
"address": "0x27b2302520211b67", | ||
"dependency_pin_block_height": 0 | ||
}, | ||
{ | ||
"network": "emulator", | ||
"address": "0xf8d6e0586b0a20c7", | ||
"dependency_pin_block_height": 0 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"parameters": null, | ||
"output": { | ||
"label": "result", | ||
"index": 0, | ||
"type": "{Address: [String]}", | ||
"messages": [] | ||
} | ||
} | ||
} |
Oops, something went wrong.