-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request #99 from VenusProtocol/feat/VEN-2686
[VEN-2686]: PSR deployment on zksync sepolia
Showing
20 changed files
with
6,778 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
300 |
Large diffs are not rendered by default.
Oops, something went wrong.
1,125 changes: 1,125 additions & 0 deletions
1,125
deployments/zksyncsepolia/ProtocolShareReserve.json
Large diffs are not rendered by default.
Oops, something went wrong.
1,359 changes: 1,359 additions & 0 deletions
1,359
deployments/zksyncsepolia/ProtocolShareReserve_Implementation.json
Large diffs are not rendered by default.
Oops, something went wrong.
346 changes: 346 additions & 0 deletions
346
deployments/zksyncsepolia/ProtocolShareReserve_Proxy.json
Large diffs are not rendered by default.
Oops, something went wrong.
271 changes: 271 additions & 0 deletions
271
deployments/zksyncsepolia/solcInputs/7f8b905cd18f295f8d1e22a3432f9a06.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "zksyncsepolia", | ||
"chainId": "300", | ||
"addresses": { | ||
"DefaultProxyAdmin": "0x18E44f588a4DcF2F7145d35A5C226e129040b6D3", | ||
"ProtocolShareReserve": "0x5722B43BD91fAaDC4E7f384F4d6Fb32456Ec5ffB", | ||
"ProtocolShareReserve_Implementation": "0x817F19DC65bBe7f87b6941aa11637A1744E4fdD6", | ||
"ProtocolShareReserve_Proxy": "0x5722B43BD91fAaDC4E7f384F4d6Fb32456Ec5ffB" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
import "module-alias/register"; | ||
|
||
import "@matterlabs/hardhat-zksync"; | ||
import "@matterlabs/hardhat-zksync-solc"; | ||
import "@matterlabs/hardhat-zksync-verify"; | ||
import "@nomicfoundation/hardhat-chai-matchers"; | ||
import "@nomiclabs/hardhat-ethers"; | ||
import "@typechain/hardhat"; | ||
import "hardhat-dependency-compiler"; | ||
import "hardhat-deploy"; | ||
import { HardhatUserConfig, extendConfig, task } from "hardhat/config"; | ||
import { HardhatConfig } from "hardhat/types"; | ||
|
||
require("dotenv").config(); | ||
|
||
const DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY; | ||
const externalDeployments = { | ||
zksyncsepolia: ["node_modules/@venusprotocol/governance-contracts/deployments/zksyncsepolia"], | ||
}; | ||
extendConfig((config: HardhatConfig) => { | ||
if (process.env.EXPORT !== "true") { | ||
config.external = { ...config.external, deployments: externalDeployments }; | ||
} | ||
}); | ||
|
||
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => { | ||
const accounts = await hre.ethers.getSigners(); | ||
|
||
for (const account of accounts) { | ||
console.log(account.address); | ||
} | ||
}); | ||
|
||
function isFork() { | ||
return process.env.FORK === "true" | ||
? { | ||
allowUnlimitedContractSize: false, | ||
loggingEnabled: false, | ||
forking: { | ||
url: | ||
process.env[`ARCHIVE_NODE_${process.env.FORKED_NETWORK}`] || | ||
"https://data-seed-prebsc-1-s1.binance.org:8545", | ||
blockNumber: 21068448, | ||
}, | ||
accounts: { | ||
accountsBalance: "1000000000000000000", | ||
}, | ||
live: false, | ||
zksync: true, | ||
} | ||
: { | ||
allowUnlimitedContractSize: true, | ||
loggingEnabled: false, | ||
live: false, | ||
zksync: true, | ||
}; | ||
} | ||
|
||
const config: HardhatUserConfig = { | ||
defaultNetwork: "hardhat", | ||
zksolc: { | ||
version: "1.5.0", | ||
}, | ||
solidity: { | ||
compilers: [ | ||
{ | ||
version: "0.8.25", | ||
settings: { | ||
optimizer: { | ||
enabled: true, | ||
runs: 10000, | ||
}, | ||
evmVersion: "paris", | ||
outputSelection: { | ||
"*": { | ||
"*": ["storageLayout"], | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
networks: { | ||
hardhat: isFork(), | ||
zksyncsepolia: { | ||
url: process.env.ARCHIVE_NODE_zksyncsepolia || "https://sepolia.era.zksync.dev", | ||
ethNetwork: "sepolia", | ||
verifyURL: "https://explorer.sepolia.era.zksync.dev/contract_verification", | ||
accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], | ||
zksync: true, | ||
live: true, | ||
}, | ||
}, | ||
paths: { | ||
sources: "./contracts", | ||
tests: "./tests", | ||
cache: "./cache-zk", | ||
artifacts: "./artifacts-zk", | ||
}, | ||
mocha: { | ||
timeout: 200000000, | ||
}, | ||
|
||
typechain: { | ||
outDir: "typechain", | ||
target: "ethers-v5", | ||
}, | ||
// Hardhat deploy | ||
namedAccounts: { | ||
deployer: { | ||
default: 0, // here this will by default take the first account as deployer | ||
}, | ||
}, | ||
dependencyCompiler: { | ||
paths: [ | ||
"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol", | ||
"hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol", | ||
"hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol:ProxyAdmin", | ||
], | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters