Fix deployTestDeposit's substitution functionality
It was mutating the deployment[i] entry, which mutated all subsequent
deploys. Now, a copy of the entry is created to properly isolate
deployments that want to substitute different contracts.
@@ -88,7 +88,11 @@ export default async function deployTestDeposit(
for (let i = 0; i < deployment.length; ++i) {
const substitution = substitutions[deployment[i].name]
if (substitution) {
- deployment[i].contract = substitution
+ deployment[i] = {
+ name: deployment[i].name,
+ contract: substitution,
+ constructorParam: deployment[i].constructorParam,
+ }
}
}
