Skip to content

Commit 0c8aaf2

Browse files
committed
lens network update:
1 parent 971066a commit 0c8aaf2

File tree

7 files changed

+641
-370
lines changed

7 files changed

+641
-370
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,5 @@ dist
110110
# hardhat
111111
artifacts-zk/
112112
cache-zk/
113+
114+
run.txt

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
This package includes a CLI script for deploying the latest Uniswap V3 smart contracts to zkSync Era.
44

5+
This fork has been updated to be compatible with the Lens Network. The scripts and dependencies have been updated but the contracts remain the same. `state.json` has the current deployment.
6+
57
## Licensing
68

79
Please note that Uniswap V3 is under [BUSL license](https://github.com/Uniswap/v3-core#licensing) until the Change Date, currently 2023-04-01. Exceptions to the license may be specified by Uniswap Governance via Additional Use Grants, which can, for example, allow V3 to be deployed on new chains. Please follow the [Uniswap Governance process](https://gov.uniswap.org/t/community-governance-process/7732) to request a DAO vote for exceptions to the license, or to move up the Change Date.

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@
2626
"url": "https://github.com/uniswap-zksync/era-uniswap-deploy-v3/issues"
2727
},
2828
"devDependencies": {
29-
"@ethersproject/abstract-signer": "^5.5.0",
30-
"@ethersproject/address": "^5.5.0",
31-
"@ethersproject/bignumber": "^5.5.0",
32-
"@ethersproject/constants": "^5.5.0",
33-
"@ethersproject/contracts": "^5.5.0",
34-
"@ethersproject/providers": "^5.5.1",
35-
"@ethersproject/wallet": "^5.5.0",
36-
"@matterlabs/hardhat-zksync-deploy": "^0.6.3",
37-
"@matterlabs/hardhat-zksync-solc": "^0.3.17",
29+
"@ethersproject/abstract-signer": "^5.7.0",
30+
"@ethersproject/address": "^5.7.0",
31+
"@ethersproject/bignumber": "^5.7.0",
32+
"@ethersproject/constants": "^5.7.0",
33+
"@ethersproject/contracts": "^5.7.0",
34+
"@ethersproject/providers": "^5.7.2",
35+
"@ethersproject/wallet": "^5.7.0",
36+
"@matterlabs/hardhat-zksync-deploy": "^1.5.0",
37+
"@matterlabs/hardhat-zksync-solc": "^1.2.2",
3838
"@types/chai": "^4.2.12",
3939
"@types/mocha": "^8.0.3",
4040
"@types/node": "^14.6.3",
41-
"@uniswap/sdk-core": "^1.0.8",
41+
"@uniswap/sdk-core": "^5.3.1",
4242
"@uniswap/swap-router-contracts": "https://github.com/uniswap-zksync/era-uniswap-swap-router-contracts.git#v1.1.0-zksync-era",
4343
"@uniswap/v3-core": "https://github.com/uniswap-zksync/era-uniswap-v3-core.git#v1.0.0-zksync-era",
4444
"@uniswap/v3-periphery": "https://github.com/uniswap-zksync/era-uniswap-v3-periphery.git#v1.1.1-zksync-era",
@@ -53,6 +53,6 @@
5353
"ts-node": "^9.0.0",
5454
"typescript": "^4.0.2",
5555
"v3-periphery-1_3_0": "https://github.com/uniswap-zksync/era-uniswap-v3-periphery.git#v1.3.0-zksync-era",
56-
"zksync-web3": "^0.14.3"
56+
"zksync-web3": "^0.17.1"
5757
}
5858
}

src/steps/meta/createDeployContractStep.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ export default function createDeployContractStep({
3939
let contract: zk.Contract
4040
try {
4141
contract = await factory.deploy(...constructorArgs, {
42-
maxFeePerGas: config.gasPrice,
43-
maxPriorityFeePerGas: 0,
42+
gasPrice: config.gasPrice, // Use gasPrice instead of maxFeePerGas
4443
customData: {
45-
factoryDeps,
44+
// Remove factoryDeps if not necessary
45+
// factoryDeps,
4646
},
4747
})
4848
} catch (error) {
49-
console.error(`Failed to deploy ${artifact.contractName}`)
49+
console.error(`Failed to deploy ${artifact.contractName}:`, error)
5050
throw error
5151
}
5252

src/steps/meta/createDeployLibraryStep.ts

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,28 @@ export default function createDeployLibraryStep({
1717

1818
const factory = new ContractFactory(artifact.abi, artifact.bytecode, signer)
1919

20-
const library = await factory.deploy({
21-
maxFeePerGas: gasPrice,
22-
maxPriorityFeePerGas: 0,
23-
})
24-
state[key] = library.address
20+
try {
21+
const library = await factory.deploy({
22+
gasPrice: gasPrice, // Use gasPrice instead of maxFeePerGas
23+
// Remove maxPriorityFeePerGas
24+
// Remove customData.factoryDeps if not necessary
25+
})
2526

26-
return [
27-
{
28-
message: `Library ${artifact.contractName} deployed`,
29-
address: library.address,
30-
hash: library.deployTransaction.hash,
31-
},
32-
]
27+
await library.deployed()
28+
29+
state[key] = library.address
30+
31+
return [
32+
{
33+
message: `Library ${artifact.contractName} deployed`,
34+
address: library.address,
35+
hash: library.deployTransaction.hash,
36+
},
37+
]
38+
} catch (error) {
39+
console.error(`Failed to deploy library ${artifact.contractName}:`, error)
40+
throw error
41+
}
3342
} else {
3443
return [{ message: `Library ${artifact.contractName} was already deployed`, address: state[key] }]
3544
}

state.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"v3CoreFactoryAddress": "0xca1D599EB44bE293FC02015D54CF0DBfd8F30cDe",
3+
"multicall2Address": "0xe9F17783489AF950AEDaAB216c448B99E7DF2E81",
4+
"proxyAdminAddress": "0xe26a753907b2B1E20bcf2DD7e926dED818E74337",
5+
"tickLensAddress": "0xD2B4Aa07FAc0bA902f425cf7450A6EaF493aa6d7",
6+
"nftDescriptorLibraryAddressV1_3_0": "0xE929663003292495B2c77761ee5FC5641a01e21D",
7+
"nonfungibleTokenPositionDescriptorAddressV1_3_0": "0xCd938692811415cc04b87effa45594a1592088E7",
8+
"descriptorProxyAddress": "0x22CE190ff3815A75986F40FAA1AB6c431B07898c",
9+
"nonfungibleTokenPositionManagerAddress": "0xdcA98b4c0c79c9dF590Fec518b24f861AbCd57fB",
10+
"v3MigratorAddress": "0x1dE31304314d5820C3B8F06D8c2ceAf957128cdf",
11+
"v3StakerAddress": "0xb89C324fFA35a008c6fD18cDF9115a53c2c28a33",
12+
"quoterV2Address": "0xD88FB69D5031C816fC6E4Abe8FF3833239928673",
13+
"swapRouter02": "0x6B0549018c71FBCaCCc1b8213A4880cd27B0bB78"
14+
}

0 commit comments

Comments
 (0)