Skip to content

Commit

Permalink
feat: sonic
Browse files Browse the repository at this point in the history
  • Loading branch information
arthcp committed Dec 16, 2024
1 parent 039d315 commit b11272a
Show file tree
Hide file tree
Showing 21 changed files with 509 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,5 @@ ZKSYNC_RPC=' '
ARENA_Z_RPC=' '

INK_RPC=' '

SONIC_RPC=' '
355 changes: 355 additions & 0 deletions deployments/prod_addresses.json

Large diffs are not rendered by default.

125 changes: 125 additions & 0 deletions deployments/prod_verification.json
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,131 @@
["0x5fD7D0d6b91CC4787Bcb86ca47e0Bd4ea0346d34", 10]
]
],
"146": [
[
"0xd9E3a8Ba9Be55919C5C0De6694e3103F5a35820E",
"SwitchboardSimulator",
"contracts/mocks/fee-updater/SwitchboardSimulator.sol",
[
"0xB0BBff6311B7F245761A7846d3Ce7B1b100C1836",
"0x525a6489a1df5fF1ae077fAf628E43b7F52298eF",
146,
1000,
"0xc8a4D2fd77c155fd52e65Ab07F337aBF84495Ead"
]
],
[
"0x3043Ad9C9e01664bc3A68477f0870Df35dC4bFf8",
"SimulatorUtils",
"contracts/mocks/fee-updater/SimulatorUtils.sol",
[
"0x525a6489a1df5fF1ae077fAf628E43b7F52298eF",
"0xc8a4D2fd77c155fd52e65Ab07F337aBF84495Ead",
"0xB0BBff6311B7F245761A7846d3Ce7B1b100C1836",
146
]
],
[
"0x525a6489a1df5fF1ae077fAf628E43b7F52298eF",
"SocketSimulator",
"contracts/mocks/fee-updater/SocketSimulator.sol",
[
146,
146,
"0x1F6bc87f3309B5D31Eb0BdaBE3ED7d3110d3B9c3",
"0xc8a4D2fd77c155fd52e65Ab07F337aBF84495Ead",
"IMLI"
]
],
[
"0x657e72B305Dc1c41e98d9efC2350EC10e3c83E21",
"Counter",
"contracts/examples/Counter.sol",
["0xbe7241e9D11EC2D1Ac86CE217c4A37b7aD1701cE"]
],
[
"0xb3314456567986e657d4C65Ec9e8cB736B92d11D",
"SocketBatcher",
"contracts/socket/SocketBatcher.sol",
["0xB0BBff6311B7F245761A7846d3Ce7B1b100C1836"]
],
[
"0x0CC93650bF4D98237628DACf87f94E443956D8dF",
"OptimisticSwitchboard",
"contracts/switchboard/default-switchboards/OptimisticSwitchboard.sol",
[
"0xB0BBff6311B7F245761A7846d3Ce7B1b100C1836",
"0xbe7241e9D11EC2D1Ac86CE217c4A37b7aD1701cE",
146,
7200,
"0xc8a4D2fd77c155fd52e65Ab07F337aBF84495Ead"
]
],
[
"0xb4Ef469c9d8317851270346070dA0ecE24616E6b",
"FastSwitchboard",
"contracts/switchboard/default-switchboards/FastSwitchboard.sol",
[
"0xB0BBff6311B7F245761A7846d3Ce7B1b100C1836",
"0xbe7241e9D11EC2D1Ac86CE217c4A37b7aD1701cE",
146,
7200,
"0xc8a4D2fd77c155fd52e65Ab07F337aBF84495Ead"
]
],
[
"0x9B8c323468AEC7A7Cb041CeD48F92559bFF33705",
"TransmitManager",
"contracts/TransmitManager.sol",
[
"0xB0BBff6311B7F245761A7846d3Ce7B1b100C1836",
146,
"0xbe7241e9D11EC2D1Ac86CE217c4A37b7aD1701cE",
"0xc8a4D2fd77c155fd52e65Ab07F337aBF84495Ead"
]
],
[
"0x1CAdCd88fC148D3966eDe75D029937C886f66009",
"ExecutionManagerDF",
"contracts/ExecutionManagerDF.sol",
[
"0xB0BBff6311B7F245761A7846d3Ce7B1b100C1836",
146,
"0xbe7241e9D11EC2D1Ac86CE217c4A37b7aD1701cE",
"0xc8a4D2fd77c155fd52e65Ab07F337aBF84495Ead"
]
],
[
"0xbe7241e9D11EC2D1Ac86CE217c4A37b7aD1701cE",
"Socket",
"contracts/socket/Socket.sol",
[
146,
"0x1F6bc87f3309B5D31Eb0BdaBE3ED7d3110d3B9c3",
"0x6C593aD4C0Fa4E293a0f1240F9ca3CF0e8a28619",
"0xB0BBff6311B7F245761A7846d3Ce7B1b100C1836",
"IMLI"
]
],
[
"0x6C593aD4C0Fa4E293a0f1240F9ca3CF0e8a28619",
"CapacitorFactory",
"contracts/CapacitorFactory.sol",
["0xB0BBff6311B7F245761A7846d3Ce7B1b100C1836", 10]
],
[
"0x1F6bc87f3309B5D31Eb0BdaBE3ED7d3110d3B9c3",
"Hasher",
"contracts/utils/Hasher.sol",
["0xB0BBff6311B7F245761A7846d3Ce7B1b100C1836"]
],
[
"0xc8a4D2fd77c155fd52e65Ab07F337aBF84495Ead",
"SignatureVerifier",
"contracts/utils/SignatureVerifier.sol",
["0xB0BBff6311B7F245761A7846d3Ce7B1b100C1836"]
]
],
"169": [
[
"0x525a6489a1df5fF1ae077fAf628E43b7F52298eF",
Expand Down
10 changes: 10 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ if (isProduction) {
[HardhatChainName.MANTA_PACIFIC]: getChainConfig(ChainSlug.MANTA_PACIFIC),
[HardhatChainName.OPBNB]: getChainConfig(ChainSlug.OPBNB),
[HardhatChainName.GEIST]: getChainConfig(ChainSlug.GEIST),
[HardhatChainName.SONIC]: getChainConfig(ChainSlug.SONIC),
};
}

Expand Down Expand Up @@ -172,6 +173,7 @@ const config: HardhatUserConfig = {
manta_pacific: process.env.MANTA_PACIFIC_API_KEY || "none",
opbnb: process.env.OPBNB_API_KEY || "none",
geist: process.env.GEIST_API_KEY || "none",
sonic: process.env.SONIC_API_KEY || "none",
},
customChains: [
{
Expand Down Expand Up @@ -334,6 +336,14 @@ const config: HardhatUserConfig = {
browserURL: "https://geist-mainnet.explorer.alchemy.com/",
},
},
{
network: "sonic",
chainId: ChainId.SONIC,
urls: {
apiURL: "https://api.soniclabs.com/api",
browserURL: "https://rpc.soniclabs.com/",
},
},
],
},
networks: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@socket.tech/dl-core",
"license": "UNLICENSED",
"version": "2.36.0",
"version": "2.37.0",
"description": "Smart contracts for socket data layer.",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions scripts/rpcConfig/constants/batcherSupportedChainSlug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ export const batcherSupportedChainSlugs = [
ChainSlug.ZKSYNC,
ChainSlug.ARENA_Z,
ChainSlug.INK,
ChainSlug.SONIC,
];
1 change: 1 addition & 0 deletions scripts/rpcConfig/constants/explorers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ export const explorers = {
[ChainSlug.ZKSYNC]: "https://explorer.zksync.io/",
[ChainSlug.ARENA_Z]: "https://explorer.arena-z.gg/",
[ChainSlug.INK]: "https://explorer.inkonchain.com/",
[ChainSlug.SONIC]: "https://sonicscan.org/",
};
1 change: 1 addition & 0 deletions scripts/rpcConfig/constants/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ export const icons = {
[ChainSlug.ZKSYNC]: "",
[ChainSlug.ARENA_Z]: "",
[ChainSlug.INK]: "",
[ChainSlug.SONIC]: "",
};
1 change: 1 addition & 0 deletions scripts/rpcConfig/constants/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ export const rpcs = {
[ChainSlug.ZKSYNC]: checkEnvValue("ZKSYNC_RPC"),
[ChainSlug.ARENA_Z]: checkEnvValue("ARENA_Z_RPC"),
[ChainSlug.INK]: checkEnvValue("INK_RPC"),
[ChainSlug.SONIC]: checkEnvValue("SONIC_RPC"),
};
2 changes: 1 addition & 1 deletion scripts/rpcConfig/constants/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { DeploymentMode } from "../../../src";

export const version = {
[DeploymentMode.DEV]: "1.0.5",
[DeploymentMode.PROD]: "1.0.74",
[DeploymentMode.PROD]: "1.0.75",
};
1 change: 1 addition & 0 deletions src/enums/chainId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ export enum ChainId {
ZKSYNC = 324,
ARENA_Z = 7897,
INK = 57073,
SONIC = 146,
}
1 change: 1 addition & 0 deletions src/enums/chainSlug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ export enum ChainSlug {
ZKSYNC = ChainId.ZKSYNC,
ARENA_Z = ChainId.ARENA_Z,
INK = ChainId.INK,
SONIC = ChainId.SONIC,
}
1 change: 1 addition & 0 deletions src/enums/chainSlugToHardhatChainName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ export const chainSlugToHardhatChainName = {
[ChainSlug.ZKSYNC]: HardhatChainName.ZKSYNC,
[ChainSlug.ARENA_Z]: HardhatChainName.ARENA_Z,
[ChainSlug.INK]: HardhatChainName.INK,
[ChainSlug.SONIC]: HardhatChainName.SONIC,
};
1 change: 1 addition & 0 deletions src/enums/chainSlugToId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ export const ChainSlugToId = {
[ChainSlug.ZKSYNC]: ChainId.ZKSYNC,
[ChainSlug.ARENA_Z]: ChainId.ARENA_Z,
[ChainSlug.INK]: ChainId.INK,
[ChainSlug.SONIC]: ChainId.SONIC,
};
1 change: 1 addition & 0 deletions src/enums/chainSlugToKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ export const ChainSlugToKey = {
[ChainSlug.ZKSYNC]: HardhatChainName.ZKSYNC,
[ChainSlug.ARENA_Z]: HardhatChainName.ARENA_Z,
[ChainSlug.INK]: HardhatChainName.INK,
[ChainSlug.SONIC]: HardhatChainName.SONIC,
};
1 change: 1 addition & 0 deletions src/enums/currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ export const Currency = {
[ChainSlug.POLYGON_AMOY]: NativeTokens["matic-network"],
[ChainSlug.OPBNB]: NativeTokens["binancecoin"],
[ChainSlug.GEIST]: NativeTokens["aavegotchi"],
[ChainSlug.SONIC]: NativeTokens["fantom"],
};
1 change: 1 addition & 0 deletions src/enums/ethLikeChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ export const ethLikeChains = [
ChainSlug.ZKEVM,
ChainSlug.AVALANCHE,
ChainSlug.POLYGON_AMOY,
ChainSlug.SONIC,
];
1 change: 1 addition & 0 deletions src/enums/hardhatChainName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ export enum HardhatChainName {
ZKSYNC = "zksync",
ARENA_Z = "arena_z",
INK = "ink",
SONIC = "sonic",
}
1 change: 1 addition & 0 deletions src/enums/hardhatChainNameToSlug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ export const hardhatChainNameToSlug = {
[HardhatChainName.ZKSYNC]: ChainSlug.ZKSYNC,
[HardhatChainName.ARENA_Z]: ChainSlug.ARENA_Z,
[HardhatChainName.INK]: ChainSlug.INK,
[HardhatChainName.SONIC]: ChainSlug.SONIC,
};
1 change: 1 addition & 0 deletions src/enums/mainnetIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ export const MainnetIds: ChainSlug[] = [
ChainSlug.ZKSYNC,
ChainSlug.ARENA_Z,
ChainSlug.INK,
ChainSlug.SONIC,
];
1 change: 1 addition & 0 deletions src/enums/native-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export enum NativeTokens {
"avalanche-2" = "avalanche-2",
"okb" = "okb",
"aavegotchi" = "aavegotchi",
"fantom" = "fantom",
}

0 comments on commit b11272a

Please sign in to comment.