Skip to content

Commit

Permalink
Merge pull request #9 from mantlenetworkio/feat/updateDeployConfig
Browse files Browse the repository at this point in the history
update ERC20BridgedPermit deployment config
  • Loading branch information
shidaxi authored Nov 22, 2023
2 parents cdd513c + a76df23 commit 75e023a
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 23 deletions.
16 changes: 14 additions & 2 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ const config: HardhatUserConfig = {
},
mnt_goerli_fork: {
url: "http://localhost:9545",

},
},
gasReporter: {
Expand All @@ -110,8 +111,19 @@ const config: HardhatUserConfig = {
arbitrumGoerli: env.string("ETHERSCAN_API_KEY_ARB", ""),
arbitrumOne: env.string("ETHERSCAN_API_KEY_ARB", ""),
optimisticEthereum: env.string("ETHERSCAN_API_KEY_OPT", ""),
optimisticGoerli: env.string("ETHERSCAN_API_KEY_OPT", ""),
},
mnt_goerli: env.string("ETHERSCAN_API_KEY_MNT", ""),
mnt_mainnet: env.string("ETHERSCAN_API_KEY_MNT", ""),
},
customChains: [
{
network: "mnt_mainnet",
chainId: 5000,
urls: {
apiURL: "https://explorer.mantle.xyz/api",
browserURL: "https://explorer.mantle.xyz/api?module=contract&action=verify"
}
}
]
},
typechain: {
externalArtifacts: [
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"fork:arb:mainnet": "hardhat node:fork arb_mainnet 8546",
"fork:opt:goerli": "hardhat node:fork opt_goerli 9545",
"fork:opt:mainnet": "hardhat node:fork opt_mainnet 9545",
"fork:mnt:goerli": "hardhat node:fork mnt_goerli 9545",
"fork:mnt:mainnet": "hardhat node:fork mnt_mainnet 9545",
"arbitrum:deploy": "ts-node --files ./scripts/arbitrum/deploy-gateway.ts",
"arbitrum:finalize-message": "ts-node --files ./scripts/arbitrum/finalize-message.ts",
"arbitrum:test:e2e": "hardhat test ./test/arbitrum/*.e2e.test.ts",
Expand All @@ -33,6 +35,7 @@
"optimism:test:executor": "hardhat test ./test/bridge-executor/optimism.integration.test.ts",
"optimism:test:launch": "REVERT=false hardhat test ./test/optimism/{_launch.test.ts,bridging.integration.test.ts}",
"mantle:deploy": "ts-node --files ./scripts/mantle/deploy-bridge.ts",
"mantle:test:permit": "hardhat test ./test/token/ERC20BridgedPermit.unit.test.ts",
"mantle:finalize-message": "ts-node --files ./scripts/mantle/finalize-message.ts",
"mantle:test:e2e": "hardhat test ./test/mantle/*.e2e.test.ts",
"mantle:test:bridginge2e": "hardhat test ./test/mantle/bridging.e2e.test.ts",
Expand Down Expand Up @@ -82,7 +85,7 @@
"@eth-optimism/sdk": "3.0.0",
"@ethersproject/providers": "^5.6.8",
"@lidofinance/evm-script-decoder": "^0.2.2",
"@mantleio/sdk": "^0.2.1",
"@mantleio/sdk": "^0.2.2",
"@openzeppelin/contracts": "4.6.0",
"chalk": "4.1.2"
}
Expand Down
4 changes: 2 additions & 2 deletions test/bridge-executor/mantle.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
L2ERC20TokenBridge__factory,
OssifiableProxy__factory,
MantleBridgeExecutor__factory,
ERC20Bridged__factory,
ERC20BridgedPermit__factory,
} from "../../typechain";
import { wei } from "../../utils/wei";
import mantle from "../../utils/mantle";
Expand Down Expand Up @@ -248,7 +248,7 @@ async function ctxFactory() {

await l2DeployScript.run();

const l2Token = ERC20Bridged__factory.connect(
const l2Token = ERC20BridgedPermit__factory.connect(
l2DeployScript.getContractAddress(1),
l2Deployer
);
Expand Down
4 changes: 2 additions & 2 deletions test/mantle/bridging.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ async function ctxFactory() {
const testingSetup = await mantle.testing(networkName).getE2ETestSetup();

return {
depositAmount: wei`0.0025 ether`,
withdrawalAmount: wei`0.0025 ether`,
depositAmount: wei`0.000025 ether`,
withdrawalAmount: wei`0.0000025 ether`,
l1Tester: testingSetup.l1Tester,
l1Token: testingSetup.l1Token,
l2Token: testingSetup.l2Token,
Expand Down
4 changes: 2 additions & 2 deletions test/mantle/managing-proxy.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assert } from "chai";
import { TransactionResponse } from "@ethersproject/providers";

import {
ERC20Bridged__factory,
ERC20BridgedPermit__factory,
GovBridgeExecutor__factory,
OssifiableProxy__factory,
L2ERC20TokenBridge__factory,
Expand Down Expand Up @@ -200,7 +200,7 @@ async function ctxFactory() {
l1Tester,
l2Tester,
l1LDOHolder,
l2Token: ERC20Bridged__factory.connect(
l2Token: ERC20BridgedPermit__factory.connect(
E2E_TEST_CONTRACTS.l2.l2Token,
l2Tester
),
Expand Down
6 changes: 3 additions & 3 deletions utils/mantle/deployment.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assert } from "chai";
import { Overrides, Wallet } from "ethers";
import {
ERC20Bridged__factory,
ERC20BridgedPermit__factory,
IERC20Metadata__factory,
L1ERC20TokenBridge__factory,
L2ERC20TokenBridge__factory,
Expand Down Expand Up @@ -97,7 +97,7 @@ export default function deployment(
options?.logger
)
.addStep({
factory: ERC20Bridged__factory,
factory: ERC20BridgedPermit__factory,
args: [
l2TokenName,
l2TokenSymbol,
Expand All @@ -113,7 +113,7 @@ export default function deployment(
args: [
expectedL2TokenImplAddress,
l2Params.admins.proxy,
ERC20Bridged__factory.createInterface().encodeFunctionData(
ERC20BridgedPermit__factory.createInterface().encodeFunctionData(
"initialize",
[l2TokenName, l2TokenSymbol]
),
Expand Down
4 changes: 2 additions & 2 deletions utils/mantle/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
IERC20__factory,
L1ERC20TokenBridge,
L2ERC20TokenBridge,
ERC20Bridged__factory,
ERC20BridgedPermit__factory,
ERC20BridgedStub__factory,
L1ERC20TokenBridge__factory,
L2ERC20TokenBridge__factory,
Expand Down Expand Up @@ -254,7 +254,7 @@ function connectBridgeContracts(
addresses.l2ERC20TokenBridge,
mntSignerOrProvider
);
const l2Token = ERC20Bridged__factory.connect(
const l2Token = ERC20BridgedPermit__factory.connect(
addresses.l2Token,
mntSignerOrProvider
);
Expand Down
4 changes: 2 additions & 2 deletions utils/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ function getBlockExplorerBaseUrlByChainId(chainId: number) {
// forked node
31337: "https://etherscan.io",
// mantle
5000: "https://rpc.mantle.xyz",
5001: "https://blockscout.com/mantle/goerli"
5000: "https://explorer.mantle.xyz/",
5001: "https://explorer.testnet.mantle.xyz/"
};
return baseUrlByChainId[chainId];
}
Expand Down

0 comments on commit 75e023a

Please sign in to comment.