Skip to content

Commit c441b3d

Browse files
authored
chore: Deploy Adapter (#978)
Update deployment info for the Lens Adapter on mainnet. This was actually deployed months ago but the PR hung around before merge, such that the SpokePool deployment became outdated. The change was updated accordingly.
1 parent 13068b1 commit c441b3d

File tree

5 files changed

+113
-36
lines changed

5 files changed

+113
-36
lines changed

deploy/059_deploy_lens_spokepool.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
7373
newAddress = proxy.address;
7474
}
7575

76+
// Verify the proxy + implementation contract.
77+
// @dev Verify before saving artifacts; saving artifacts seems to prevent successful verification.
78+
// It's observed that saving artifacts seems to trigger a rebuild, hardhat-zksync-verify subsequently
79+
// complains about a bytecode mismatch in the deployed artifact.
80+
await hre.run("verify:verify", { address: newAddress, constructorArguments: constructorArgs });
81+
7682
// Save the deployment manually because OZ's hardhat-upgrades packages bypasses hardhat-deploy.
7783
// See also: https://stackoverflow.com/questions/74870472
7884
const extendedArtifact = await deployments.getExtendedArtifact(contractName);
@@ -81,9 +87,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
8187
...extendedArtifact,
8288
};
8389
await deployments.save(contractName, deployment);
84-
85-
// Verify the proxy + implementation contract.
86-
await hre.run("verify:verify", { address: newAddress, constructorArguments: constructorArgs });
8790
};
8891

8992
module.exports = func;

deploy/064_deploy_zkstack_adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
* This adapter supports ZkStack L2s.
1818
*
1919
* Usage:
20-
* $ SPOKE_CHAIN_ID=37111 yarn hardhat deploy --network sepolia --tags ZkStackCustomGasTokenAdapter
20+
* $ SPOKE_CHAIN_ID=37111 yarn hardhat deploy --network sepolia --tags ZkStackAdapter
2121
*/
2222

2323
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

deployments/deployments.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"AlephZero_Adapter": { "address": "0x6F4083304C2cA99B077ACE06a5DcF670615915Af", "blockNumber": 21131132 },
3434
"Ink_Adapter": { "address": "0x7e90a40c7519b041a7df6498fbf5662e8cfc61d2", "blockNumber": 21438590 },
3535
"Cher_Adapter": { "address": "0x0c9d064523177dBB55CFE52b9D0c485FBFc35FD2", "blockNumber": 21597341 },
36-
"Lens_Adapter": { "address": "0x63AC22131eD457aeCbD63e6c4C7eeC7BBC74fF1F", "blockNumber": 22167069 },
36+
"Lens_Adapter": { "address": "0x5e0B7e20a77BDf11812837D30F1326068Bcf24Cf", "blockNumber": 22382942 },
3737
"DoctorWho_Adapter": { "address": "0xFADcC43096756e1527306FD92982FEbBe3c629Fa", "blockNumber": 21773451 },
3838
"Solana_Adapter": { "address": "0x9F788694934fD2Ed34D5340B9a76EB34f2bFD7B3", "blockNumber": 22595936 },
3939
"SpokePoolPeriphery": { "address": "0x89415a82d909a7238d69094C3Dd1dCC1aCbDa85C", "blockNumber": 22789839 }

deployments/mainnet/ZkStack_CustomGasToken_Adapter.json

Lines changed: 102 additions & 30 deletions
Large diffs are not rendered by default.

tasks/enableL1TokenAcrossEcosystem.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ const getChainsFromList = (taskArgInput: string): number[] =>
2626
?.split(",")
2727
?.map((chainId: string) => Number(chainId)) || [];
2828

29+
const notSolana = (chainId: number | string) => ![CHAIN_IDs.SOLANA, CHAIN_IDs.SOLANA_DEVNET].includes(Number(chainId));
30+
2931
task("enableToken", "Enable a provided token across the entire ecosystem of supported chains")
3032
.addFlag("execute", "Provide this flag if you would like to actually execute the transaction from the EOA")
3133
.addFlag("disable", "Set to disable deposit routes for the specified chains")
@@ -86,7 +88,7 @@ task("enableToken", "Enable a provided token across the entire ecosystem of supp
8688
else if (inputChains.some((chain) => isNaN(chain) || !Number.isInteger(chain) || chain < 0)) {
8789
throw new Error(`Invalid chains list: ${inputChains}`);
8890
}
89-
const chainIds = _enabledChainIds.filter((chainId) => inputChains.includes(chainId));
91+
const chainIds = _enabledChainIds.filter((chainId) => inputChains.includes(chainId) && notSolana(chainId));
9092

9193
console.log("\nLoading L2 companion token address for provided L1 token.");
9294
const tokens = Object.fromEntries(

0 commit comments

Comments
 (0)