Skip to content

Commit

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

Add SX Network test and main network deployments (closes #148):
- [SX Network Sepolia Testnet
(Toronto)](https://explorerl2.toronto.sx.technology/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed),
- [SX
Network](https://explorerl2.sx.technology/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://rpc.sx-rollup-testnet.t.raas.gelato.cloud)
0xbd8a7ea8cfca7b4e5f5041d7d4b17bc317c5ce42cfbc42066a00cf26b43eb53f
~$ cast keccak $(cast code 0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed --rpc-url https://rpc.sx-rollup.gelato.digital)
0xbd8a7ea8cfca7b4e5f5041d7d4b17bc317c5ce42cfbc42066a00cf26b43eb53f
```

---------

Signed-off-by: Pascal Marco Caversaccio <[email protected]>
  • Loading branch information
pcaversaccio authored Oct 26, 2024
1 parent ae9e76b commit 3902720
Show file tree
Hide file tree
Showing 8 changed files with 253 additions and 214 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2226,6 +2226,7 @@ To verify a deployed [`CreateX`](./src/CreateX.sol) contract on a block explorer
- [Oasis Sapphire](https://explorer.oasis.io/mainnet/sapphire/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [World Chain](https://worldchain-mainnet.explorer.alchemy.com/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [XDC Network](https://xdcscan.com/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [SX Network](https://explorerl2.sx.technology/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)

#### Ethereum Test Networks

Expand Down Expand Up @@ -2280,6 +2281,7 @@ To verify a deployed [`CreateX`](./src/CreateX.sol) contract on a block explorer
- [Plume Sepolia Testnet](https://test-explorer.plumenetwork.xyz/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [Unichain Sepolia Testnet](https://sepolia.uniscan.xyz/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [XDC Network Testnet (Apothem)](https://testnet.xdcscan.com/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed)
- [SX Network Sepolia Testnet (Toronto)](https://explorerl2.toronto.sx.technology/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 @@ -375,6 +375,13 @@
"https://xdcscan.com/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed"
]
},
{
"name": "SX Network",
"chainId": 4162,
"urls": [
"https://explorerl2.sx.technology/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed"
]
},
{
"name": "Sepolia",
"chainId": 11155111,
Expand Down Expand Up @@ -733,5 +740,12 @@
"https://testnet.xdcscan.com/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed",
"https://repo.sourcify.dev/contracts/partial_match/51/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed/"
]
},
{
"name": "SX Network Sepolia Testnet (Toronto)",
"chainId": 79479957,
"urls": [
"https://explorerl2.toronto.sx.technology/address/0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed"
]
}
]
32 changes: 32 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,19 @@ const config: HardhatUserConfig = {
url: vars.get("XDC_MAINNET_URL", "https://rpc.xinfin.network"),
accounts,
},
sxTestnet: {
chainId: 79479957,
url: vars.get(
"SX_TESTNET_URL",
"https://rpc.sx-rollup-testnet.t.raas.gelato.cloud",
),
accounts,
},
sxMain: {
chainId: 4162,
url: vars.get("SX_MAINNET_URL", "https://rpc.sx-rollup.gelato.digital"),
accounts,
},
},
contractSizer: {
alphaSort: true,
Expand Down Expand Up @@ -886,6 +899,9 @@ const config: HardhatUserConfig = {
// For XDC testnet & mainnet
xdc: vars.get("XDC_API_KEY", ""),
xdcTestnet: vars.get("XDC_API_KEY", ""),
// For SX testnet & mainnet
sx: vars.get("SX_API_KEY", ""),
sxTestnet: vars.get("SX_API_KEY", ""),
},
customChains: [
{
Expand Down Expand Up @@ -1574,6 +1590,22 @@ const config: HardhatUserConfig = {
browserURL: "https://testnet.xdcscan.com",
},
},
{
network: "sx",
chainId: 4162,
urls: {
apiURL: "https://explorerl2.sx.technology/api",
browserURL: "https://explorerl2.sx.technology",
},
},
{
network: "sxTestnet",
chainId: 79479957,
urls: {
apiURL: "https://explorerl2.toronto.sx.technology/api",
browserURL: "https://explorerl2.toronto.sx.technology",
},
},
],
},
};
Expand Down
14 changes: 7 additions & 7 deletions interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"lint:fix": "pnpm prettier:fix && npx eslint . --fix"
},
"dependencies": {
"@headlessui/react": "^2.1.10",
"@headlessui/react": "^2.2.0",
"@heroicons/react": "^2.1.5",
"next": "^15.0.0",
"next": "^15.0.1",
"next-themes": "^0.3.0",
"prismjs": "^1.29.0",
"react": "^18.3.1",
Expand All @@ -41,15 +41,15 @@
},
"devDependencies": {
"@eslint/js": "^9.13.0",
"@next/eslint-plugin-next": "^15.0.0",
"@next/eslint-plugin-next": "^15.0.1",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/node": "^22.7.8",
"@types/react": "^18.3.11",
"@types/node": "^22.8.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"autoprefixer": "^10.4.20",
"eslint": "^9.13.0",
"eslint-config-next": "^15.0.0",
"eslint-plugin-react": "^7.37.1",
"eslint-config-next": "^15.0.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"next-seo": "^6.6.0",
"postcss": "^8.4.47",
Expand Down
2 changes: 1 addition & 1 deletion lib/forge-std
Submodule forge-std updated 1 files
+1 −1 package.json
2 changes: 1 addition & 1 deletion lib/openzeppelin-contracts
Submodule openzeppelin-contracts updated 64 files
+5 −0 .changeset/hot-shrimps-wait.md
+5 −0 .changeset/lovely-dodos-lay.md
+5 −0 .changeset/seven-donkeys-tap.md
+5 −0 .changeset/small-seahorses-bathe.md
+5 −0 .changeset/weak-roses-bathe.md
+1 −0 .codecov.yml
+0 −20 .eslintrc
+5 −1 .github/workflows/checks.yml
+12 −0 contracts/account/README.adoc
+150 −0 contracts/account/utils/draft-ERC4337Utils.sol
+242 −0 contracts/account/utils/draft-ERC7579Utils.sol
+215 −0 contracts/interfaces/draft-IERC4337.sol
+196 −0 contracts/interfaces/draft-IERC7579.sol
+1 −1 contracts/mocks/DummyImplementation.sol
+1 −1 contracts/mocks/MerkleTreeMock.sol
+5 −1 contracts/mocks/Stateless.sol
+23 −0 contracts/mocks/account/utils/ERC7579UtilsMock.sol
+1 −1 contracts/mocks/governance/GovernorStorageMock.sol
+1 −1 contracts/mocks/proxy/UUPSUpgradeableMock.sol
+1 −1 contracts/proxy/ERC1967/ERC1967Proxy.sol
+1 −1 contracts/proxy/ERC1967/ERC1967Utils.sol
+1 −1 contracts/proxy/beacon/BeaconProxy.sol
+1 −1 contracts/proxy/transparent/ProxyAdmin.sol
+1 −1 contracts/proxy/transparent/TransparentUpgradeableProxy.sol
+1 −1 contracts/proxy/utils/UUPSUpgradeable.sol
+0 −1 contracts/token/ERC20/utils/SafeERC20.sol
+1 −1 contracts/utils/Bytes.sol
+1 −1 contracts/utils/CAIP10.sol
+1 −1 contracts/utils/CAIP2.sol
+60 −0 contracts/utils/NoncesKeyed.sol
+513 −0 contracts/utils/Packing.sol
+3 −0 contracts/utils/README.adoc
+26 −0 eslint.config.mjs
+254 −169 package-lock.json
+7 −4 package.json
+5 −4 scripts/checks/inheritance-ordering.js
+49 −0 scripts/checks/pragma-consistency.js
+1 −1 scripts/generate/run.js
+0 −1 scripts/generate/templates/Checkpoints.js
+0 −1 scripts/generate/templates/Checkpoints.t.js
+0 −2 scripts/generate/templates/EnumerableMap.js
+0 −2 scripts/generate/templates/EnumerableSet.js
+0 −2 scripts/generate/templates/MerkleProof.js
+1 −1 scripts/generate/templates/Packing.opts.js
+2 −2 scripts/generate/templates/Packing.t.js
+0 −2 scripts/generate/templates/SafeCast.js
+2 −2 scripts/release/workflow/state.js
+1 −1 scripts/update-docs-branch.js
+1 −1 slither.config.json
+211 −0 test/account/utils/draft-ERC4337Utils.test.js
+354 −0 test/account/utils/draft-ERC7579Utils.test.js
+95 −0 test/helpers/erc4337.js
+58 −0 test/helpers/erc7579.js
+1 −1 test/helpers/storage.js
+2 −2 test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js
+8 −8 test/token/ERC721/extensions/ERC721Consecutive.test.js
+3 −2 test/utils/Address.test.js
+2 −2 test/utils/Create2.test.js
+152 −0 test/utils/Nonces.behavior.js
+3 −62 test/utils/Nonces.test.js
+17 −0 test/utils/NoncesKeyed.test.js
+402 −90 test/utils/Packing.t.sol
+3 −5 test/utils/cryptography/ECDSA.test.js
+2 −2 test/utils/introspection/SupportsInterface.behavior.js
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@
"deploy:unichaintestnet": "npx hardhat run --no-compile --network unichainTestnet scripts/deploy.ts",
"deploy:xdctestnet": "npx hardhat run --no-compile --network xdcTestnet scripts/deploy.ts",
"deploy:xdcmain": "npx hardhat run --no-compile --network xdcMain scripts/deploy.ts",
"deploy:sxtestnet": "npx hardhat run --no-compile --network sxTestnet scripts/deploy.ts",
"deploy:sxmain": "npx hardhat run --no-compile --network sxMain 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 All @@ -172,7 +174,7 @@
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"ethers": "^6.13.4",
"hardhat": "^2.22.14",
"hardhat": "^2.22.15",
"hardhat-abi-exporter": "^2.10.1",
"hardhat-contract-sizer": "^2.10.0",
"hardhat-gas-reporter": "^2.2.1",
Expand Down
Loading

0 comments on commit 3902720

Please sign in to comment.