Skip to content

Commit

Permalink
on deployment, deploy a dummy BeaconProxy and verify it (#1942)
Browse files Browse the repository at this point in the history
  • Loading branch information
d10r authored May 27, 2024
1 parent 8b26dd5 commit e1b1b33
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/ethereum-contracts/ops-scripts/deploy-framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function (
"SuperfluidPool",
"SuperfluidPoolPlaceholder",
"SuperfluidPoolDeployerLibrary",
"BeaconProxy",
"ConstantOutflowNFT",
"ConstantInflowNFT",
"PoolAdminNFT",
Expand Down Expand Up @@ -261,6 +262,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function (
SuperfluidPool,
SuperfluidPoolPlaceholder,
SuperfluidPoolDeployerLibrary,
BeaconProxy,
ConstantOutflowNFT,
ConstantInflowNFT,
PoolAdminNFT,
Expand Down Expand Up @@ -586,6 +588,14 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function (
protocolReleaseVersion === "test" ? true : false
);

// deploy a dummy BeaconProxy for verification
const beaconProxy = await web3tx(
BeaconProxy.new,
"BeaconProxy.new"
)(superfluidPoolBeaconAddr, "0x");
console.log("Dummy BeaconProxy address", beaconProxy.address);
output += `DUMMY_BEACON_PROXY=${beaconProxy.address}\n`;

if (process.env.IS_HARDHAT) {
// this fails in test case deployment.test.js:ops-scripts/deploy-super-token.js
// where deploy-framework is invoked twice, the second time failing because
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ if [ -n "$SUPERFLUID_POOL_DEPLOYER_LIBRARY" ]; then
try_verify SuperfluidPoolDeployerLibrary@"${SUPERFLUID_POOL_DEPLOYER_LIBRARY}"
fi

if [ -n "$DUMMY_BEACON_PROXY" ]; then
try_verify BeaconProxy@"${DUMMY_BEACON_PROXY}"
fi

# this will fail with 'Library address is not prefixed with "0x"' if a library address is not set
link_library "GeneralDistributionAgreementV1" "SlotsBitmapLibrary" "${SLOTS_BITMAP_LIBRARY}"
link_library "GeneralDistributionAgreementV1" "SuperfluidPoolDeployerLibrary" "${SUPERFLUID_POOL_DEPLOYER_LIBRARY}"
Expand Down

0 comments on commit e1b1b33

Please sign in to comment.