You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.
At every run of chinstrap originate, the script would check if a contract already exists at the corresponding index of the contract_name array. For example, suppose you want to deploy two instances of nft_contract to the sandbox and have two files in the originations/folder:
1_nft_contract_a.py
2_nft_contract_b.py
The steps would be as follows:
On the first run of chinstrap originate, two instances will be originated and two corresponding objects will be appended to the array under chinstrap.networks.development.nft_contract
On the second run of chinstrap originate, the script detects that contracts already exist at index 0 and 1 of the chinstrap.networks.development.nft_contract, and simply returns the existing deployments.
You add 3_nft_contract_b.py to the originations/ folder and run chinstrap originate. The first two originations are skipped as per the logic above, but the third one is executed because the script detects nothing at index 3 of the nft_contract array.
The text was updated successfully, but these errors were encountered:
Optionally you could have an --overwrite flag for chinstrap originate. This would redeploy contracts and over-write an existing item at the given index.
This would function like hot reloading – but it might make sense to scope this out.
Describe the issue
Changing the structure of the originations object for better discoverability.
Examples
The current originations object is structured as follows:
For better discoverability I propose the following:
At every run of
chinstrap originate
, the script would check if a contract already exists at the corresponding index of thecontract_name
array. For example, suppose you want to deploy two instances ofnft_contract
to the sandbox and have two files in theoriginations/
folder:The steps would be as follows:
chinstrap originate
, two instances will be originated and two corresponding objects will be appended to the array underchinstrap.networks.development.nft_contract
chinstrap.networks.development.nft_contract
, and simply returns the existing deployments.3_nft_contract_b.py
to theoriginations/
folder and runchinstrap originate
. The first two originations are skipped as per the logic above, but the third one is executed because the script detects nothing at index 3 of thenft_contract
array.The text was updated successfully, but these errors were encountered: