Skip to content

Commit

Permalink
Merge branch 'master' into fix-error
Browse files Browse the repository at this point in the history
  • Loading branch information
TucksonDev authored Jan 28, 2025
2 parents 9f4e358 + d0291ff commit 7de9f7e
Show file tree
Hide file tree
Showing 74 changed files with 2,501 additions and 2,718 deletions.
22 changes: 10 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ module.exports = {
es6: true,
node: true,
},
plugins: ['prettier'],
extends: [
'eslint:recommended',
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
extends: ['@offchainlabs/eslint-config-typescript/base'],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
rules: {
'prettier/prettier': 'error',
'no-unused-vars': 'off',
'prefer-const': [2, { destructuring: 'all' }],
'object-curly-spacing': ['error', 'always'],
},
}
overrides: [
{
files: ['*.js', '*.ts'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
],
};
21 changes: 21 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check format
run-name: Checking format

on:
pull_request:
branches:
- master

jobs:
check-formatting:
name: 'Check Formatting'
runs-on: ubuntu-latest
steps:
- name: Checkout files
uses: actions/checkout@v4

- name: Restore node_modules
uses: OffchainLabs/actions/node-modules/install@main

- name: Check formatting with Prettier
run: yarn prettier:format
39 changes: 39 additions & 0 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Test all tutorials
run-name: Test all tutorials

on:
pull_request:
branches:
- master

env:
PRIVATE_KEY: 'b6b15c8cb491557369f3c7d2c287b053eb229daa9c22138887752191c9520659'
CHAIN_RPC: 'http://127.0.0.1:3347'
PARENT_CHAIN_RPC: 'http://127.0.0.1:8547'
# Env variables for specific tutorials
L1_RPC: 'http://127.0.0.1:8545'
TransferTo: '0x3f1Eae7D46d88F08fc2F8ed27FCb2AB183EB2d0E'

jobs:
test-all:
name: Test all tutorials
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Restore node_modules
uses: OffchainLabs/actions/node-modules/install@main

- name: Set up the local node
# https://github.com/OffchainLabs/actions/blob/feat-simplify/run-nitro-test-node/action.yml
uses: OffchainLabs/actions/run-nitro-test-node@feat-simplify
with:
nitro-testnode-ref: release
args: --tokenbridge --l3node --l3-token-bridge

- name: Copy .env
run: cp ./.env-sample ./.env

- name: Test
run: yarn run testAll
60 changes: 0 additions & 60 deletions .pre-commit-config.yaml

This file was deleted.

14 changes: 2 additions & 12 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
module.exports = {
semi: false,
trailingComma: 'es5',
singleQuote: true,
printWidth: 80,
tabWidth: 2,
arrowParens: 'avoid',
bracketSpacing: true,
...require('@offchainlabs/prettier-config'),
overrides: [
{
files: '*.sol',
options: {
printWidth: 100,
tabWidth: 4,
useTabs: false,
singleQuote: false,
bracketSpacing: true,
explicitTypes: 'always',
},
},
],
}
};
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ From the root directory:
yarn install
```

## Testing

1. Start the nitro-testnode (you can find instructions [here](https://docs.arbitrum.io/run-arbitrum-node/run-local-full-chain-simulation)) with the following parameters:

```shell
./test-node.bash --init --tokenbridge --l3node --l3-token-bridge
```

2. Execute all tests with the following command

```shell
yarn run testAll
```

## What's included?

#### :white_check_mark: Basics
Expand Down
114 changes: 77 additions & 37 deletions customNetwork.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,78 @@
{
"chainID": 412346,
"confirmPeriodBlocks": 20,
"ethBridge": {
"bridge": "0x5eCF728ffC5C5E802091875f96281B5aeECf6C49",
"inbox": "0x9f8c1c641336A371031499e3c362e40d58d0f254",
"outbox": "0x50143333b44Ea46255BEb67255C9Afd35551072F",
"rollup": "0x7d98BA231d29D5C202981542C0291718A7358c63",
"sequencerInbox": "0x18d19C5d3E685f5be5b9C86E097f0E439285D216"
[
{
"chainID": 412346,
"confirmPeriodBlocks": 20,
"ethBridge": {
"bridge": "0x5eCF728ffC5C5E802091875f96281B5aeECf6C49",
"inbox": "0x9f8c1c641336A371031499e3c362e40d58d0f254",
"outbox": "0x50143333b44Ea46255BEb67255C9Afd35551072F",
"rollup": "0x7d98BA231d29D5C202981542C0291718A7358c63",
"sequencerInbox": "0x18d19C5d3E685f5be5b9C86E097f0E439285D216"
},
"explorerUrl": "",
"isArbitrum": true,
"isCustom": true,
"name": "ArbLocal",
"partnerChainID": 1337,
"retryableLifetimeSeconds": 604800,
"nitroGenesisBlock": 0,
"nitroGenesisL1Block": 0,
"depositTimeout": 900000,
"tokenBridge": {
"parentGatewayRouter": "0x093AAa96CD4387A68FC0e24C60140938Dc812549",
"childGatewayRouter": "0x32656396981868E925280FB772b3f806892cf4bF",
"parentErc20Gateway": "0x00D9fE1a2B67B8151aEdE8855c95E58D73FB4245",
"childErc20Gateway": "0x7424e3DAAAAcd867c85ceB75c1E00119F2ee5eb7",
"parentCustomGateway": "0x8407E6180dC009D20D26D4BABB4790C1d4E6D2aA",
"childCustomGateway": "0x0B35cfE62314C3852A0942b5830c728353BD654F",
"parentWethGateway": "0xB8F48Ba39fCfB44d70F6008fe1bf4F3E744044AF",
"childWethGateway": "0x67aE8014BD1A0c1Ed747715d22b3b3a188aC324B",
"parentWeth": "0x7E32b54800705876d3b5cFbc7d9c226a211F7C1a",
"childWeth": "0xA1abD387192e3bb4e84D3109181F9f005aBaF5CA",
"parentProxyAdmin": "0x2A1f38c9097e7883570e0b02BFBE6869Cc25d8a3",
"childProxyAdmin": "0x9F95547ABB0FfC92b4E37b3124d1e8613d5aB74A",
"parentMultiCall": "0x49117fC32930E324F2E9A7BeA588FFb26008b8eC",
"childMultiCall": "0x6B1E93aE298B64e8f5b9f43B65Dd8F1eaA6DD4c3"
},
"chainId": 412346,
"parentChainId": 1337
},
"explorerUrl": "",
"isArbitrum": true,
"isCustom": true,
"name": "ArbLocal",
"partnerChainID": 1337,
"retryableLifetimeSeconds": 604800,
"nitroGenesisBlock": 0,
"nitroGenesisL1Block": 0,
"depositTimeout": 900000,
"tokenBridge": {
"parentGatewayRouter": "0x093AAa96CD4387A68FC0e24C60140938Dc812549",
"childGatewayRouter": "0x32656396981868E925280FB772b3f806892cf4bF",
"parentErc20Gateway": "0x00D9fE1a2B67B8151aEdE8855c95E58D73FB4245",
"childErc20Gateway": "0x7424e3DAAAAcd867c85ceB75c1E00119F2ee5eb7",
"parentCustomGateway": "0x8407E6180dC009D20D26D4BABB4790C1d4E6D2aA",
"childCustomGateway": "0x0B35cfE62314C3852A0942b5830c728353BD654F",
"parentWethGateway": "0xB8F48Ba39fCfB44d70F6008fe1bf4F3E744044AF",
"childWethGateway": "0x67aE8014BD1A0c1Ed747715d22b3b3a188aC324B",
"parentWeth": "0x7E32b54800705876d3b5cFbc7d9c226a211F7C1a",
"childWeth": "0xA1abD387192e3bb4e84D3109181F9f005aBaF5CA",
"parentProxyAdmin": "0x2A1f38c9097e7883570e0b02BFBE6869Cc25d8a3",
"childProxyAdmin": "0x9F95547ABB0FfC92b4E37b3124d1e8613d5aB74A",
"parentMultiCall": "0x49117fC32930E324F2E9A7BeA588FFb26008b8eC",
"childMultiCall": "0x6B1E93aE298B64e8f5b9f43B65Dd8F1eaA6DD4c3"
},
"chainId": 412346,
"parentChainId": 1337
}
{
"chainID": 333333,
"confirmPeriodBlocks": 20,
"ethBridge": {
"bridge": "0xA584795e24628D9c067A6480b033C9E96281fcA3",
"inbox": "0xDcA690902d3154886Ec259308258D10EA5450996",
"outbox": "0xda243bD61B011024FC923164db75Dde198AC6175",
"rollup": "0xfe808cD61B3fe45c67c47B17DB49B96Fb2BFDfae",
"sequencerInbox": "0x16c54EE2015CD824415c2077F4103f444E00A8cb"
},
"explorerUrl": "",
"isArbitrum": true,
"isCustom": true,
"name": "ArbLocalL3",
"partnerChainID": 412346,
"retryableLifetimeSeconds": 604800,
"nitroGenesisBlock": 0,
"nitroGenesisL1Block": 0,
"depositTimeout": 900000,
"tokenBridge": {
"parentGatewayRouter": "0xfE03DBdf7A126994dBd749631D7fbaB58C618c58",
"childGatewayRouter": "0x8B6BC759226f8Fe687c8aD8Cc0DbF85E095e9297",
"parentErc20Gateway": "0x6B0805Fc6e275ef66a0901D0CE68805631E271e5",
"childErc20Gateway": "0xaa7d51aFFEeB32d99b1CB2fd6d81D7adA4a896e8",
"parentCustomGateway": "0xA191D519260A06b32f8D04c84b9F457B8Caa0514",
"childCustomGateway": "0xD4816AeF8f85A3C1E01Cd071a81daD4fa941625f",
"parentWethGateway": "0x77603b0ea6a797C74Fa9ef11b5BdE04A4E03D550",
"childWethGateway": "0xA6AB233B3c7bfd0399834897b5073974A3D467e2",
"parentWeth": "0xA1abD387192e3bb4e84D3109181F9f005aBaF5CA",
"childWeth": "0x582a8dBc77f665dF2c49Ce0a138978e9267dd968",
"parentProxyAdmin": "0x1A61102c26ad3f64bA715B444C93388491fd8E68",
"childProxyAdmin": "0x36C56eC2CF3a3f53db9F01d0A5Ae84b36fb0A1e2",
"parentMultiCall": "0x20a3627Dcc53756E38aE3F92717DE9B23617b422",
"childMultiCall": "0x052B15c8Ff0544287AE689C4F2FC53A3905d7Db3"
},
"chainId": 333333,
"parentChainId": 412346
}
]
25 changes: 16 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,29 @@
},
"scripts": {
"lint": "eslint .",
"format": "prettier './**/*.{js,json,md,yml,sol}' --write && yarn run lint --fix"
"prettier:format": "prettier './**/*.{js,json,md,sol,ts,yml}' --write && yarn run lint --fix",
"prettier:check": "prettier './**/*.{js,json,md,sol,ts,yml}' --check && yarn run lint",
"testAll": "tests/runAll.sh"
},
"devDependencies": {
"@offchainlabs/eslint-config-typescript": "^0.2.1",
"@offchainlabs/prettier-config": "0.2.1",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.3.4",
"eslint": "^8.15.0",
"eslint-config-prettier": "^8.3.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.3.2",
"prettier-plugin-solidity": "^1.0.0-beta.17"
"eslint-plugin-prettier": "^4.2.0",
"prettier": "^2.8.8",
"prettier-plugin-solidity": "^1.4.2"
},
"dependencies": {
"@arbitrum/sdk": "^4.0.1",
"@nomiclabs/hardhat-ethers": "^2.0.2",
"ethers": "^5.4.1",
"hardhat": "^2.2.0",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"ethers": "^5.7.2",
"hardhat": "^2.13.1",
"dotenv": "^16.4.5"
},
"workspaces": {
Expand Down
6 changes: 3 additions & 3 deletions packages/address-table/hardhat.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require('@nomiclabs/hardhat-ethers')
const { hardhatConfig } = require('arb-shared-dependencies')
require('@nomiclabs/hardhat-ethers');
const { hardhatConfig } = require('arb-shared-dependencies');

module.exports = hardhatConfig
module.exports = hardhatConfig;
Loading

0 comments on commit 7de9f7e

Please sign in to comment.