Skip to content

Commit

Permalink
➕ Add X Layer Test and Main Network Deployments (#111)
Browse files Browse the repository at this point in the history
### 🕓 Changelog

Add X Layer test and main network deployments:
- [X Layer Sepolia
Testnet](https://www.oklink.com/xlayer-test/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed),
- [X
Layer](https://www.oklink.com/xlayer/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed).

#### Verification

Compare the `keccak256` hash of the runtime bytecode with the canonical
`keccak256` hash of the runtime bytecode
[here](https://github.com/pcaversaccio/createx#security-considerations)
(`0xbd8a7ea8cfca7b4e5f5041d7d4b17bc317c5ce42cfbc42066a00cf26b43eb53f`):

```console
~$ cast keccak $(cast code 0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed --rpc-url https://testrpc.xlayer.tech)
0xbd8a7ea8cfca7b4e5f5041d7d4b17bc317c5ce42cfbc42066a00cf26b43eb53f

~$ cast keccak $(cast code 0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed --rpc-url https://rpc.xlayer.tech)
0xbd8a7ea8cfca7b4e5f5041d7d4b17bc317c5ce42cfbc42066a00cf26b43eb53f
```

---

Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
  • Loading branch information
pcaversaccio authored May 2, 2024
1 parent 8972fcf commit 2cc3f9f
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 57 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[submodule "lib/solady"]
path = lib/solady
url = https://github.com/vectorized/solady.git
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std.git
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/openzeppelin/openzeppelin-contracts.git
[submodule "lib/solady"]
path = lib/solady
url = https://github.com/vectorized/solady.git
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2208,6 +2208,7 @@ To verify a deployed [`CreateX`](./src/CreateX.sol) contract on a block explorer
- [Kava](https://kavascan.com/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [Metis Andromeda](https://andromeda-explorer.metis.io/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [Mode](https://explorer.mode.network/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [X Layer](https://www.oklink.com/xlayer/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)

#### Ethereum Test Networks

Expand Down Expand Up @@ -2248,6 +2249,7 @@ To verify a deployed [`CreateX`](./src/CreateX.sol) contract on a block explorer
- [Metis Sepolia Testnet](https://sepolia-explorer.metisdevops.link/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [Mode Sepolia Testnet](https://sepolia.explorer.mode.network/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [Sei Arctic Testnet](https://seistream.app/account/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [X Layer Sepolia Testnet](https://www.oklink.com/xlayer-test/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)

## Integration With External Tooling

Expand Down
14 changes: 14 additions & 0 deletions deployments/deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@
"https://repo.sourcify.dev/contracts/partial_match/34443/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed/"
]
},
{
"name": "X Layer",
"chainId": 196,
"urls": [
"https://www.oklink.com/xlayer/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed"
]
},
{
"name": "Sepolia",
"chainId": 11155111,
Expand Down Expand Up @@ -514,5 +521,12 @@
"urls": [
"https://seistream.app/account/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed"
]
},
{
"name": "X Layer Sepolia Testnet",
"chainId": 195,
"urls": [
"https://www.oklink.com/xlayer-test/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed"
]
}
]
31 changes: 31 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,16 @@ const config: HardhatUserConfig = {
url: vars.get("SEI_TESTNET_URL", "https://evm-rpc-arctic-1.sei-apis.com"),
accounts,
},
xlayerTestnet: {
chainId: 195,
url: vars.get("XLAYER_TESTNET_URL", "https://testrpc.xlayer.tech"),
accounts,
},
xlayerMain: {
chainId: 196,
url: vars.get("XLAYER_MAINNET_URL", "https://rpc.xlayer.tech"),
accounts,
},
},
contractSizer: {
alphaSort: true,
Expand Down Expand Up @@ -669,6 +679,9 @@ const config: HardhatUserConfig = {
// For Mode testnet & mainnet
mode: vars.get("MODE_API_KEY", ""),
modeTestnet: vars.get("MODE_API_KEY", ""),
// For X Layer testnet & mainnet
xlayer: vars.get("OKLINK_API_KEY", ""),
xlayerTestnet: vars.get("OKLINK_API_KEY", ""),
},
customChains: [
{
Expand Down Expand Up @@ -1105,6 +1118,24 @@ const config: HardhatUserConfig = {
browserURL: "https://sepolia.explorer.mode.network",
},
},
{
network: "xlayer",
chainId: 196,
urls: {
apiURL:
"https://www.oklink.com/api/v5/explorer/contract/verify-source-code-plugin/XLAYER",
browserURL: "https://www.oklink.com/xlayer",
},
},
{
network: "xlayerTestnet",
chainId: 195,
urls: {
apiURL:
"https://www.oklink.com/api/v5/explorer/contract/verify-source-code-plugin/XLAYER_TESTNET",
browserURL: "https://www.oklink.com/xlayer-test",
},
},
],
},
};
Expand Down
2 changes: 1 addition & 1 deletion interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@eslint/js": "^9.1.1",
"@next/eslint-plugin-next": "^14.2.3",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/node": "^20.12.7",
"@types/node": "^20.12.8",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.19",
Expand Down
2 changes: 1 addition & 1 deletion lib/solady
Submodule solady updated 2 files
+507 −507 .gas-snapshot
+1 −1 package.json
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
"deploy:modetestnet": "npx hardhat run --no-compile --network modeTestnet scripts/deploy.ts",
"deploy:modemain": "npx hardhat run --no-compile --network modeMain scripts/deploy.ts",
"deploy:seitestnet": "npx hardhat run --no-compile --network seiTestnet scripts/deploy.ts",
"deploy:xlayertestnet": "npx hardhat run --no-compile --network xlayerTestnet scripts/deploy.ts",
"deploy:xlayermain": "npx hardhat run --no-compile --network xlayerMain scripts/deploy.ts",
"prettier:check": "npx prettier -c \"**/*.{js,ts,md,sol,json,yml,yaml}\"",
"prettier:check:interface": "cd interface && pnpm prettier:check",
"prettier:fix": "npx prettier -w \"**/*.{js,ts,md,sol,json,yml,yaml}\"",
Expand Down
Loading

0 comments on commit 2cc3f9f

Please sign in to comment.