Skip to content

Commit 288b660

Browse files
committed
don't allow deployment of SimpleACL in upgrade path
1 parent bc35b72 commit 288b660

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

packages/ethereum-contracts/ops-scripts/deploy-framework.js

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -826,25 +826,6 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function (
826826
return newAddress !== ZERO_ADDRESS ? newAddress : prevAddr;
827827
}
828828

829-
async function getOrDeployHelper(
830-
Contract,
831-
getPrevAddrFn,
832-
outputKey
833-
) {
834-
let prevAddr = await getPrevAddrFn().catch(_err => {
835-
console.error(`### Error getting ${Contract.contractName} address, likely not yet deployed`);
836-
return ZERO_ADDRESS;
837-
});
838-
839-
if (prevAddr !== ZERO_ADDRESS) {
840-
return prevAddr;
841-
}
842-
843-
const instance = await web3tx(Contract.new, `${Contract.contractName}.new`)();
844-
output += `${outputKey}=${instance.address}\n`;
845-
return instance.address;
846-
}
847-
848829
const simpleForwarderAddress = await getOrDeployForwarder(
849830
superfluid,
850831
SimpleForwarder,
@@ -859,11 +840,9 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function (
859840
"ERC2771_FORWARDER"
860841
);
861842

862-
const simpleAclAddress = await getOrDeployHelper(
863-
SimpleACL,
864-
() => superfluid.getSimpleACL(),
865-
"SIMPLE_ACL"
866-
);
843+
// SimpleACL has now been deployed on all networks.
844+
// It shall never be deployed in the upgrade path in order to eliminate the risk of accidental state loss.
845+
const simpleAclAddress = (await superfluid.getSimpleACL()).address;
867846
console.log("SimpleACL address", simpleAclAddress);
868847

869848
// get previous callback gas limit, make sure we don't decrease it

0 commit comments

Comments
 (0)