From 8ced522c0ed713c98ba10f398e85ddfbbd8f87cc Mon Sep 17 00:00:00 2001 From: Aimen Sahnoun Date: Fri, 8 Nov 2024 23:34:13 +0300 Subject: [PATCH 1/4] chore: deploy SRP to zksyncera --- .../deploy/deploy-zk-single-request-proxy.ts | 24 +++++++++++++++++++ .../SingleRequestProxyFactory/index.ts | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 packages/smart-contracts/deploy/deploy-zk-single-request-proxy.ts diff --git a/packages/smart-contracts/deploy/deploy-zk-single-request-proxy.ts b/packages/smart-contracts/deploy/deploy-zk-single-request-proxy.ts new file mode 100644 index 000000000..cca1611e2 --- /dev/null +++ b/packages/smart-contracts/deploy/deploy-zk-single-request-proxy.ts @@ -0,0 +1,24 @@ +import { deployContract } from './utils-zk'; +import { erc20FeeProxyArtifact, ethereumFeeProxyArtifact } from '../src/lib'; +/** + * Deploys SingleRequestProxyFactory to zkSync network. + * This script is supposed to be run with the deploy-zksync plugin + */ +export default async function () { + console.log('Deploying SingleRequestProxyFactory to zkSync ...'); + + const ownerAdddress = process.env.ADMIN_WALLET_ADDRESS; + + if (!ownerAdddress) { + throw new Error('ADMIN_WALLET_ADDRESS is not set'); + } + + const ethereumFeeProxy = erc20FeeProxyArtifact.getAddress('zksyncera'); + const erc20FeeProxy = ethereumFeeProxyArtifact.getAddress('zksyncera'); + + await deployContract('SingleRequestProxyFactory', [ + ethereumFeeProxy, + erc20FeeProxy, + ownerAdddress, + ]); +} diff --git a/packages/smart-contracts/src/lib/artifacts/SingleRequestProxyFactory/index.ts b/packages/smart-contracts/src/lib/artifacts/SingleRequestProxyFactory/index.ts index 6eed98ac9..dcb3797d2 100644 --- a/packages/smart-contracts/src/lib/artifacts/SingleRequestProxyFactory/index.ts +++ b/packages/smart-contracts/src/lib/artifacts/SingleRequestProxyFactory/index.ts @@ -17,6 +17,10 @@ export const singleRequestProxyFactoryArtifact = new ContractArtifact Date: Sat, 9 Nov 2024 01:42:29 +0300 Subject: [PATCH 2/4] chore: deploy SRPF to mainnets --- packages/smart-contracts/hardhat.config.ts | 9 +++++ .../SingleRequestProxyFactory/index.ts | 40 +++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/packages/smart-contracts/hardhat.config.ts b/packages/smart-contracts/hardhat.config.ts index 6d3c6028a..f0e532f60 100644 --- a/packages/smart-contracts/hardhat.config.ts +++ b/packages/smart-contracts/hardhat.config.ts @@ -242,6 +242,7 @@ export default { auroraTestnet: 'api-key', mantle: 'api-key', 'mantle-testnet': 'api-key', + celo: process.env.CELOSCAN_API_KEY, }, customChains: [ { @@ -276,6 +277,14 @@ export default { browserURL: 'https://scan.coredao.org/', }, }, + { + network: 'celo', + chainId: 42220, + urls: { + apiURL: 'https://api.celoscan.io/api', + browserURL: 'https://celoscan.io/', + }, + }, ], }, tenderly: { diff --git a/packages/smart-contracts/src/lib/artifacts/SingleRequestProxyFactory/index.ts b/packages/smart-contracts/src/lib/artifacts/SingleRequestProxyFactory/index.ts index dcb3797d2..77d0f21d5 100644 --- a/packages/smart-contracts/src/lib/artifacts/SingleRequestProxyFactory/index.ts +++ b/packages/smart-contracts/src/lib/artifacts/SingleRequestProxyFactory/index.ts @@ -21,6 +21,46 @@ export const singleRequestProxyFactoryArtifact = new ContractArtifact Date: Mon, 11 Nov 2024 19:01:50 +0300 Subject: [PATCH 3/4] chore: fix typo in zksync deployment file for SRP --- .../deploy/deploy-zk-single-request-proxy.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/smart-contracts/deploy/deploy-zk-single-request-proxy.ts b/packages/smart-contracts/deploy/deploy-zk-single-request-proxy.ts index cca1611e2..4b2000d57 100644 --- a/packages/smart-contracts/deploy/deploy-zk-single-request-proxy.ts +++ b/packages/smart-contracts/deploy/deploy-zk-single-request-proxy.ts @@ -7,9 +7,9 @@ import { erc20FeeProxyArtifact, ethereumFeeProxyArtifact } from '../src/lib'; export default async function () { console.log('Deploying SingleRequestProxyFactory to zkSync ...'); - const ownerAdddress = process.env.ADMIN_WALLET_ADDRESS; + const ownerAddress = process.env.ADMIN_WALLET_ADDRESS; - if (!ownerAdddress) { + if (!ownerAddress) { throw new Error('ADMIN_WALLET_ADDRESS is not set'); } @@ -19,6 +19,6 @@ export default async function () { await deployContract('SingleRequestProxyFactory', [ ethereumFeeProxy, erc20FeeProxy, - ownerAdddress, + ownerAddress, ]); } From f8d68032c42a7c2124bde6344d1f6d8afaa03ed1 Mon Sep 17 00:00:00 2001 From: Aimen Sahnoun Date: Mon, 11 Nov 2024 19:20:56 +0300 Subject: [PATCH 4/4] fix: flipped feeProxy artifacts --- .../smart-contracts/deploy/deploy-zk-single-request-proxy.ts | 4 ++-- .../src/lib/artifacts/SingleRequestProxyFactory/index.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/smart-contracts/deploy/deploy-zk-single-request-proxy.ts b/packages/smart-contracts/deploy/deploy-zk-single-request-proxy.ts index 4b2000d57..e9a9f5096 100644 --- a/packages/smart-contracts/deploy/deploy-zk-single-request-proxy.ts +++ b/packages/smart-contracts/deploy/deploy-zk-single-request-proxy.ts @@ -13,8 +13,8 @@ export default async function () { throw new Error('ADMIN_WALLET_ADDRESS is not set'); } - const ethereumFeeProxy = erc20FeeProxyArtifact.getAddress('zksyncera'); - const erc20FeeProxy = ethereumFeeProxyArtifact.getAddress('zksyncera'); + const ethereumFeeProxy = ethereumFeeProxyArtifact.getAddress('zksyncera'); + const erc20FeeProxy = erc20FeeProxyArtifact.getAddress('zksyncera'); await deployContract('SingleRequestProxyFactory', [ ethereumFeeProxy, diff --git a/packages/smart-contracts/src/lib/artifacts/SingleRequestProxyFactory/index.ts b/packages/smart-contracts/src/lib/artifacts/SingleRequestProxyFactory/index.ts index 77d0f21d5..148266364 100644 --- a/packages/smart-contracts/src/lib/artifacts/SingleRequestProxyFactory/index.ts +++ b/packages/smart-contracts/src/lib/artifacts/SingleRequestProxyFactory/index.ts @@ -18,8 +18,8 @@ export const singleRequestProxyFactoryArtifact = new ContractArtifact