From 913f41673cc43413952b2c9c707366ff0b81fdd4 Mon Sep 17 00:00:00 2001 From: fainashalts Date: Wed, 29 Sep 2021 16:03:22 -0700 Subject: [PATCH 1/2] Add deployed field with capture variable, multiple networks --- declarativeDeployment.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/declarativeDeployment.yaml b/declarativeDeployment.yaml index e69de29..9de266a 100644 --- a/declarativeDeployment.yaml +++ b/declarativeDeployment.yaml @@ -0,0 +1,38 @@ +version: 0.0.1 +description: declarative deployment file "declarative deployments for Truffle projects +# put npm packages needed for deployment here +require: ["dotenv"] +# organize by network, then by +deployed: + mainnet: + SafeMathLib: + arguments: + - SafeMathLib + - options: + gasPrice: 15000000 + capture: + - address: "$.address" + as: "SafeMathLibAddress" + # can also optionally transform the captured variable; + # wouldn't do toString() here, just an example + transform: "this.SafeMathLibAddress.toString()" + # can capture multiple variables + - transactionHash: "$.transactionHash" + as: "SafeMathLibTransactionHash" + # stop execution and error if we don't get the variable + # setting to false would mean we continue without it + strict: true + Escrow: + arguments: + - Escrow + links: ["SafeMathLib"] + arbitrum_mainnet: + HumanStandardToken: + # setting ifTrue tells the solver not to proceed with this deployment unless + # we have the designated capture variable. ifTrue could also be a list/array + ifTrue: SafeMathLibAddress + arguments: + - HumanStandardToken + # and here is how we would then use the captured variable + - "{{ SafeMathLibAddress }}" + - "{{ SafeMathLibTransactionHash }}" From 9e7023582c283b699e2968db20f52db2f6db1487 Mon Sep 17 00:00:00 2001 From: Faina Shalts Date: Thu, 30 Sep 2021 10:46:11 -0700 Subject: [PATCH 2/2] Update declarativeDeployment.yaml --- declarativeDeployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/declarativeDeployment.yaml b/declarativeDeployment.yaml index 9de266a..857f85b 100644 --- a/declarativeDeployment.yaml +++ b/declarativeDeployment.yaml @@ -2,7 +2,7 @@ version: 0.0.1 description: declarative deployment file "declarative deployments for Truffle projects # put npm packages needed for deployment here require: ["dotenv"] -# organize by network, then by +# organize by network, then by contract deployed: mainnet: SafeMathLib: