-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
152 changed files
with
16,595 additions
and
3,662 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
# Arbitrum Nitro Rollup Contracts | ||
# Contracts | ||
|
||
This is the package with the smart contract code that powers Arbitrum Nitro. | ||
It includes the rollup and fraud proof smart contracts, as well as interfaces for interacting with precompiles. | ||
This folder contains the smart contracts needed for the rollup protocol, which are | ||
a solidity implementation of the specification meant to match the behavior of the Go | ||
implementation also contained in this repository. | ||
|
||
For more information see https://developer.arbitrum.io/intro | ||
This subfolder was initialized using [Foundry](https://github.com/foundry-rs/foundry) with `forge init` | ||
|
||
For the deployed addresses of these contracts for Arbitrum chains see https://developer.arbitrum.io/useful-addresses | ||
## Setup | ||
|
||
For the token bridge contracts see https://github.com/OffchainLabs/token-bridge-contracts | ||
Requirements: [nvm](https://github.com/nvm-sh/nvm) | ||
|
||
Compile these contracts locally by running | ||
```sh | ||
# Use nvm to install node 16.x | ||
nvm install 16 | ||
nvm use 16 | ||
|
||
```bash | ||
git clone https://github.com/offchainlabs/nitro-contracts | ||
cd nitro-contracts | ||
yarn install | ||
yarn build | ||
``` | ||
|
||
## License | ||
|
||
Nitro is currently licensed under a [Business Source License](./LICENSE), similar to our friends at Uniswap and Aave, with an "Additional Use Grant" to ensure that everyone can have full comfort using and running nodes on all public Arbitrum chains. | ||
|
||
The Additional Use Grant also permits the deployment of the Nitro software, in a permissionless fashion and without cost, as a new blockchain provided that the chain settles to either Arbitrum One or Arbitrum Nova. | ||
# Install yarn, if you don't have it already | ||
npm i -g yarn | ||
|
||
For those that prefer to deploy the Nitro software either directly on Ethereum (i.e. an L2) or have it settle to another Layer-2 on top of Ethereum, the [Arbitrum Expansion Program (the "AEP")](https://docs.arbitrum.foundation/assets/files/Arbitrum%20Expansion%20Program%20Jan182024-4f08b0c2cb476a55dc153380fa3e64b0.pdf) was recently established. The AEP allows for the permissionless deployment in the aforementioned fashion provided that 10% of net revenue is contributed back to the Arbitrum community in accordance with the requirements of the AEP. | ||
# Run yarn to install deps | ||
yarn | ||
|
||
## Contact | ||
# Install forge deps | ||
forge install | ||
``` | ||
|
||
Discord - [Arbitrum](https://discord.com/invite/5KE54JwyTs) | ||
## Run Tests | ||
|
||
Twitter: [Arbitrum](https://twitter.com/arbitrum) | ||
``` | ||
forge test | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
[profile.default] | ||
src = 'src/' | ||
src = 'src' | ||
out = 'out' | ||
libs = ['node_modules', 'lib'] | ||
test = 'test/foundry' | ||
cache_path = 'forge-cache/sol' | ||
optimizer = true | ||
optimizer_runs = 20000 | ||
optimizer_runs = 2000 | ||
via_ir = false | ||
solc_version = '0.8.9' | ||
solc_version = '0.8.17' | ||
|
||
[profile.yul] | ||
src = 'yul' | ||
out = 'out/yul' | ||
libs = ['node_modules', 'lib'] | ||
cache_path = 'forge-cache/yul' | ||
|
||
[fmt] | ||
number_underscore = 'thousands' | ||
line_length = 100 | ||
# See more config options https://github.com/foundry-rs/foundry/tree/master/config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
ds-test/=lib/forge-std/lib/ds-test/src/ | ||
forge-std/=lib/forge-std/src/ | ||
|
||
@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/ | ||
@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/ | ||
@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/ | ||
@offchainlabs/upgrade-executor/=node_modules/@offchainlabs/upgrade-executor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.13; | ||
|
||
import "forge-std/Script.sol"; | ||
|
||
contract CounterScript is Script { | ||
function setUp() public {} | ||
|
||
function run() public { | ||
vm.broadcast(); | ||
} | ||
} |
Binary file not shown.
Oops, something went wrong.