Skip to content

Commit

Permalink
evm: remove arbitrum and add base
Browse files Browse the repository at this point in the history
  • Loading branch information
gator-boi committed Mar 21, 2024
1 parent 3b4ac87 commit e9435fd
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 27 deletions.
12 changes: 6 additions & 6 deletions evm/env/localnet/arbitrum.env → evm/env/localnet/base.env
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
export RELEASE_CHAIN_TYPE=evm

### Wormhole Chain ID (uint16)
export RELEASE_CHAIN_ID=23
export RELEASE_CHAIN_ID=30

### Circle Domain (uint32)
export RELEASE_DOMAIN=3
export RELEASE_DOMAIN=6

### Token (evm address)
###
### Token Info: https://arbiscan.io/token/0xaf88d065e77c8cc2239327c5edb3a432268e5831
export RELEASE_TOKEN_ADDRESS=0xaf88d065e77c8cc2239327c5edb3a432268e5831
### Token Info: https://arbiscan.io/token/
export RELEASE_TOKEN_ADDRESS=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913


############################# Wormhole Contracts #############################


### Wormhole (evm address)
export RELEASE_WORMHOLE_ADDRESS=0xa5f208e072434bC67592E4C49C1B991BA79BCA46
export RELEASE_WORMHOLE_ADDRESS=0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6


############################# Circle Contracts #################################

### Circle Token Messenger (evm address)
export RELEASE_TOKEN_MESSENGER_ADDRESS=0x19330d10D9Cc8751218eaf51E8885D058642E08A
export RELEASE_TOKEN_MESSENGER_ADDRESS=0x1682Ae6375C4E4A97e4B583BC394c861A46D8962


################################# Ownership ##################################
Expand Down
4 changes: 2 additions & 2 deletions evm/ts/src/consts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export type ChainName = EvmChainName;

export type EvmChainName = "avalanche" | "ethereum" | "arbitrum";
export type EvmChainName = "avalanche" | "ethereum" | "base";

export const CHAIN_NAMES: ChainName[] = ["avalanche", "ethereum", "arbitrum"];
export const CHAIN_NAMES: ChainName[] = ["avalanche", "ethereum", "base"];
2 changes: 1 addition & 1 deletion evm/ts/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function circleDomainToChain(domain: CircleDomain): ChainName {
return "optimism";
}
case 3: {
return "arbitrum";
return "base";
}
case 6: {
return "base";
Expand Down
2 changes: 1 addition & 1 deletion evm/ts/tests/00__environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from "./helpers";

describe("Environment", () => {
const chainNames: ValidNetwork[] = ["avalanche", "ethereum", "arbitrum"];
const chainNames: ValidNetwork[] = ["avalanche", "ethereum", "base"];

for (const chainName of chainNames) {
if (!(chainName in LOCALHOSTS)) {
Expand Down
2 changes: 1 addition & 1 deletion evm/ts/tests/01__registration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { expect } from "chai";

import { parseLiquidityLayerEnvFile, ChainType, LiquidityLayerEnv } from "../src";

const CHAIN_PATHWAYS: ValidNetwork[] = ["ethereum", "avalanche", "arbitrum"];
const CHAIN_PATHWAYS: ValidNetwork[] = ["ethereum", "avalanche", "base"];

describe("Registration", () => {
const envPath = `${__dirname}/../../env/localnet`;
Expand Down
2 changes: 1 addition & 1 deletion evm/ts/tests/02__configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { expect } from "chai";

import { parseLiquidityLayerEnvFile } from "../src";

const CHAIN_PATHWAYS: ValidNetwork[] = ["ethereum", "avalanche", "arbitrum"];
const CHAIN_PATHWAYS: ValidNetwork[] = ["ethereum", "avalanche", "base"];

describe("Configuration", () => {
const envPath = `${__dirname}/../../env/localnet`;
Expand Down
8 changes: 4 additions & 4 deletions evm/ts/tests/03__marketOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import {
const CHAIN_PATHWAYS: ValidNetwork[][] = [
["ethereum", "avalanche"],
["avalanche", "ethereum"],
["ethereum", "arbitrum"],
["arbitrum", "ethereum"],
["avalanche", "arbitrum"],
["arbitrum", "avalanche"],
["ethereum", "base"],
["base", "ethereum"],
["avalanche", "base"],
["base", "avalanche"],
];

const TEST_AMOUNT = ethers.utils.parseUnits("1000", 6);
Expand Down
6 changes: 3 additions & 3 deletions evm/ts/tests/04__fastMarketOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ import {

// Cannot send a fast market order from the matching engine chain.
const CHAIN_PATHWAYS: ValidNetwork[][] = [
["arbitrum", "ethereum"],
["ethereum", "arbitrum"],
["arbitrum", "avalanche"],
["base", "ethereum"],
["ethereum", "base"],
["base", "avalanche"],
["ethereum", "avalanche"],
];

Expand Down
12 changes: 6 additions & 6 deletions evm/ts/tests/helpers/consts.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
import { FastTransferParameters } from "../../src";

export type ValidNetwork = "avalanche" | "ethereum" | "arbitrum";
export type ValidNetwork = "avalanche" | "ethereum" | "base";

export type NetworkVars<T> = {
avalanche: T;
ethereum: T;
arbitrum: T;
base: T;
};

// Avalanche Mainnet Fork
export const LOCALHOSTS: NetworkVars<string> = {
avalanche: "http://localhost:8547",
ethereum: "http://localhost:8548",
arbitrum: "http://localhost:8549",
base: "http://localhost:8549",
};

export const AVALANCHE_USDC_ADDRESS = "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E";
export const ETHEREUM_USDC_ADDRESS = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48";
export const ARBITRUM_USDC_ADRESS = "0xaf88d065e77c8cC2239327C5EDb3A432268e5831";
export const base_USDC_ADRESS = "0xaf88d065e77c8cC2239327C5EDb3A432268e5831";

export const USDC_ADDRESSES: NetworkVars<string> = {
avalanche: AVALANCHE_USDC_ADDRESS,
ethereum: ETHEREUM_USDC_ADDRESS,
arbitrum: ARBITRUM_USDC_ADRESS,
base: base_USDC_ADRESS,
};

export const USDC_DECIMALS: NetworkVars<number> = {
avalanche: 6,
ethereum: 6,
arbitrum: 6,
base: 6,
};

export const WORMHOLE_MESSAGE_FEE = 0;
Expand Down
4 changes: 2 additions & 2 deletions evm/ts/tests/run_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ anvil --port 8548 \
--no-mining \
--fork-url $ETHEREUM_RPC > $LOGS/ethereum.log &

# Arbitrum (CCTP).
# Base (CCTP).
anvil --port 8549 \
-m "myth like bonus scare over problem client lizard pioneer submit female collect" \
--no-mining \
--fork-url $ARBITRUM_RPC > $LOGS/arbitrum.log &
--fork-url $BASE_RPC > $LOGS/base.log &

# Chill.
sleep 2
Expand Down

0 comments on commit e9435fd

Please sign in to comment.