Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scripts for zkevm testnet deployment #100

Draft
wants to merge 1 commit into
base: master-legacy-hyphen
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ OPTIMISM_ETHERSCAN_API_KEY=
OPTIMISM_KOVAN_ETHERSCAN_API_KEY=
ARBITRUM_ETHERSCAN_API_KEY=
ARBITRUM_RINKEBY_ETHERSCAN_API_KEY=
POLYGON_ZKEVM_BLOCKNATIVE_API_KEY=RANDOMSTRING

BSC_URL=https://bsc-dataseed.binance.org/
BSC_TESTNET_URL=https://data-seed-prebsc-1-s1.binance.org:8545/
ROPSTEN_URL=https://eth-ropsten.alchemyapi.io/v2/<YOUR ALCHEMY KEY>
Expand All @@ -16,6 +18,7 @@ ARBITRUM_URL=
ARBITRUM_RINKEBY_URL=
OPTIMISM_KOVAN_URL=
OPTIMISM_ETHEREUM_URL=
ZKEVM_MANGO_TESTNET_URL=https://rpc.public.zkevm-test.net

STAGING_API_URL=https://hyphen-v2-staging-api.biconomy.io
STAGING_API_USERNAME=
Expand Down
16 changes: 15 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ const config: HardhatUserConfig = {
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
gas: 250000000,
},
zkevmMangoTestnet: {
url: process.env.ZKEVM_MANGO_TESTNET_URL || "",
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
}
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
Expand All @@ -131,10 +135,20 @@ const config: HardhatUserConfig = {
bsc: process.env.BSCSCAN_API_KEY || "",
bscTestnet: process.env.BSCSCAN_API_KEY || "",
optimisticEthereum: process.env.OPTIMISM_ETHERSCAN_API_KEY || "",
optimisticKovan: process.env.OPTIMISM_KOVAN_ETHERSCAN_API_KEY || "",
arbitrumOne: process.env.ARBITRUM_ETHERSCAN_API_KEY || "",
arbitrumTestnet: process.env.ARBITRUM_RINKEBY_ETHERSCAN_API_KEY || "",
zkevmMangoTestnet: process.env.POLYGON_ZKEVM_BLOCKNATIVE_API_KEY || "",
},
customChains: [
{
network: "zkevmMangoTestnet",
chainId: 1422,
urls: {
apiURL: "https://explorer.public.zkevm-test.net/api",
browserURL: "https://explorer.public.zkevm-test.net/"
}
}
]
},
contractSizer: {
alphaSort: true,
Expand Down
2 changes: 1 addition & 1 deletion scripts/backend-api-script/set-all-token-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { setTokenConfig } from "./add-supported-token";
import { getBackendConfig } from "./utils";

(async () => {
const backendConfig = getBackendConfig("staging");
const backendConfig = getBackendConfig("integration");
const tokenData = (await axios.get(`${backendConfig.baseUrl}/api/v1/configuration/tokens`)).data.message as any;
const promises = [];
for (const token of tokenData) {
Expand Down
164 changes: 164 additions & 0 deletions scripts/backend-api-script/testnet/deposit-config-polygon-zkevm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
import { setConfig } from "../set-deposit-config";
import { getBackendConfig } from "../utils";

(async () => {
let deposit_config = [
{
chainId: 5,
depositConfig: {
toChainIds: [1422, 1422, 1422],
tokenAddresses: [
"0xb5B640E6414b6DeF4FC9B3C1EeF373925effeCcF", // USDC
"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", // ETH
"0xDdc47b0cA071682e8dc373391aCA18dA0Fe28699", // BICO
],
tokenConfigs: [
{
min: "100000000",
max: "52000000000",
},
{
min: "20000000000000000",
max: "135000000000000000000",
},
{
min: "10000000000000000000",
max: "500000000000000000000000",
},
],
},
},
{
chainId: 80001,
depositConfig: {
toChainIds: [1422, 1422, 1422],
tokenAddresses: [
"0xdA5289fCAAF71d52a80A254da614a192b693e977", // USDC
"0xa6fa4fb5f76172d178d61b04b0ecd319c5d1c0aa", // ETH
"0xac42d8319ce458b22a72b45f58c0dcfeee824691", // BICO
],
tokenConfigs: [
{
min: "100000000",
max: "52000000000",
},
{
min: "3900000000000000",
max: "135000000000000000000",
},
{
min: "10000000000000000000",
max: "500000000000000000000000",
},
],
},
},
{
chainId: 43113,
depositConfig: {
toChainIds: [1422],
tokenAddresses: [
"0x7fcdc2c1ef3e4a0bcc8155a558bb20a7218f2b05", // ETH
],
tokenConfigs: [
{
min: "3900000000000000",
max: "135000000000000000000",
},
],
},
},
{
chainId: 420,
depositConfig: {
toChainIds: [1422, 1422, 1422],
tokenAddresses: [
"0x359a5ECa3Af6db9b04dF09Bb417f97890219Fe5D", // USDC
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", // ETH
"0x2D138B861a6c3DE6Ec1d4Dbc69cd4AeF36F0Cf43", // Bico
],
tokenConfigs: [
{
min: "100000000",
max: "52000000000",
},
{
min: "3900000000000000",
max: "135000000000000000000",
},
{
min: "10000000000000000000",
max: "500000000000000000000000",
},
],
},
},
{
chainId: 97,
depositConfig: {
toChainIds: [1422],
tokenAddresses: [
"0x756289346D2b3C867966899c6D0467EdEb4Da3C4", // Bico
],
tokenConfigs: [
{
min: "10000000000000000000",
max: "500000000000000000000000",
},
],
},
},
{
chainId: 421613,
depositConfig: {
toChainIds: [1422, 1422, 1422],
tokenAddresses: [
"0xc84c9BD3898f9c167915FE945f8C722709018d24", // USDC
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", // ETH
"0x2B30269b3c73Cb69C44453fC41BE82c5EC046836", // Bico
],
tokenConfigs: [
{
min: "100000000",
max: "52000000000",
},
{
min: "3900000000000000",
max: "135000000000000000000",
},
{
min: "10000000000000000000",
max: "500000000000000000000000",
},
],
},
},
{
chainId: 4002,
depositConfig: {
toChainIds: [1422, 1422, 1422],
tokenAddresses: [
"0x7f61a8ee767585c6075e3c084e57e020d734f3aa", // USDC
"0x7af97a21978c4ba05e4ab03a86190fdd3f739866", // ETH
"0x85f09b027310c8efeba4ef3786e7c10e64e9942c", // Bico
],
tokenConfigs: [
{
min: "100000000",
max: "52000000000",
},
{
min: "3900000000000000",
max: "135000000000000000000",
},
{
min: "10000000000000000000",
max: "500000000000000000000000",
},
],
},
},
];

setConfig(deposit_config, getBackendConfig("integration"));
})();
Loading