Skip to content

Commit

Permalink
Merge branch 'master' into nitro-migrator
Browse files Browse the repository at this point in the history
  • Loading branch information
hkalodner committed Aug 25, 2022
2 parents ae068e1 + 7b84e5e commit 0d71041
Show file tree
Hide file tree
Showing 98 changed files with 2,909 additions and 1,354 deletions.
12 changes: 9 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,12 @@ jobs:
command: |
yarn install --cache-folder ~/.cache/yarn
working_directory: /home/user/project
- run:
name: lint
command: |
yarn lint:js --format junit -o ${TEST_RESULTS}/arb-bridge-peripherals-lint.xml
yarn lint:solidity
working_directory: /home/user/project/packages/arb-bridge-peripherals
- run:
name: test interface compatibility
command: |
Expand All @@ -359,17 +365,17 @@ jobs:
- run:
name: test arb-bridge-peripherals l1
command: |
yarn test:l1
yarn hardhat compile && yarn test:l1
working_directory: /home/user/project/packages/arb-bridge-peripherals
- run:
name: test arb-bridge-peripherals l2
command: |
yarn test:l2
yarn hardhat compile && yarn test:l2
working_directory: /home/user/project/packages/arb-bridge-peripherals
- run:
name: test arb-bridge-peripherals e2e
command: |
yarn test:e2e
yarn hardhat compile && yarn test:e2e
working_directory: /home/user/project/packages/arb-bridge-peripherals
- store_test_results:
path: *test-path
2 changes: 1 addition & 1 deletion docs/AnyTrust.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: AnyTrust Chains
sidebar_label: AnyTrust Chains
---

AnyTrust chains are an Arbitrum chain type, distinct from Arbitrum Rollup chains. The Arbitrum One mainnet chain (chain ID 42161) is — and will always be — a rollup chain. The first AnyTrust chain — Arbitrum Nova, is currently open for [developer access](https://medium.com/offchainlabs/introducing-nova-arbitrum-anytrust-mainnet-is-open-for-developers-9a54692f345e). See [Public Chains](Public_Chains.md) for chain details.
AnyTrust chains are an Arbitrum chain type, distinct from Arbitrum Rollup chains. The Arbitrum One mainnet chain (chain ID 42161) is — and will always be — a rollup chain. The first AnyTrust chain — Arbitrum Nova, is currently [live on mainnet](https://medium.com/offchainlabs/its-time-for-a-new-dawn-nova-is-open-to-the-public-a081df1e4ad2); see [Public Chains](Public_Chains.md) for chain details.

The fundamental tradeoff between Rollup and AnyTrust is decentralization vs. transaction costs: Rollup chains inherit their security directly from layer 1 without introducing new trust assumptions, whereas AnyTrust chains introduce their own security assumption, and are thus able to charge users lower fees.

Expand Down
94 changes: 4 additions & 90 deletions docs/Developer_Quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,98 +11,12 @@ Arbitrum is a suite of Ethereum scaling solutions that enables high-throughput,

If you're looking to discover how Arbitrum works, the best place to begin is by the [Rollups basics](Rollup_basics.md) section, which gives a high level overview of Arbitrum's internals. From there, you can jump into more detailed explainers on various components of the system.

### How Can I Start Building
### How Can I Start Building?

If you want to get started using Arbitrum with no setup required, check out our [public testnets](Public_Chains.md).

### How Can I Develop Locally
You could use our [Tutorials](https://github.com/OffchainLabs/arbitrum-tutorials) to get started with building on Arbitrum. This mono-repo includes various demos showing and explaining how to interact with Arbitrum — deploying and using contracts directly on L2, moving Ether and tokens between L1 and L2, and more.

The very first step to start building with Arbitrum is [installing](Installation.md) Arbitrum and its dependencies. Next, you'll need to deploy an Arbitrum chain on an L1 blockchain. You can follow the [local testnet guide](Local_Blockchain.md) for a quickstart walkthrough deployment of an Arbitrum Rollup chain on the local testnet.
We also show how you can use broadly supported Ethereum ecosystem tooling (Hardhat, Ethers-js, etc.) as well as our special Arbitrum SDK for convenience.

Note that Arbitrum chains support dynamic launching of contracts, so you don't need to setup an Arbitrum chain for each application you build, and indeed you may deploy your contracts on a testnet chain which you did not launch. The benefits of having multiple applications on the same Arbitrum Rollup chain is that they'll be able to interact synchronously, just as they would if they were launched directly on Ethereum.

Once you have deployed Arbitrum, you can [build and run the demo app](#hello-arbitrum) or [deploy your own contracts](Contract_Deployment.md).

**Want to learn more? Check out the** [**open source code**](https://github.com/offchainlabs/arbitrum)**. Join the team on** [**Discord**](https://discord.gg/ZpZuw7p)**.**

## Setup Local Geth and Rollup Blockchain

See [Local Blockchain Setup](Local_Blockchain.md).

## Hello, Arbitrum

Now you'll deploy and run a demo dApp on Arbitrum. The dApp is based on
a simple Pet Shop dApp that is used in a Truffle tutorial.

First clone the pet-shop demo dApp and install dependencies:

```bash
git clone https://github.com/OffchainLabs/demo-dapp-pet-shop
cd demo-dapp-pet-shop
yarn
```

### Deployment

Deploy contracts to Arbitrum :

```bash
truffle migrate --network arbitrum
```

### Use the dApp

1. Install [Metamask](https://metamask.io/) (See all supported wallets [here](https://portal.arbitrum.one/#wallets))

> Once Metamask is installed, open it and select
> `Import Account` and enter one of the following pre-funded private keys
>
> ```
> 0x979f020f6f6f71577c09db93ba944c89945f10fade64cfc7eb26137d5816fb76
> 0xd26a199ae5b6bed1992439d1840f7cb400d0a55a0c9f796fa67d7c571fbb180e
> 0xaf5c2984cb1e2f668ae3fd5bbfe0471f68417efd012493538dcd42692299155b
> 0x9af1e691e3db692cc9cad4e87b6490e099eb291e3b434a0d3f014dfd2bb747cc
> 0x27e926925fb5903ee038c894d9880f74d3dd6518e23ab5e5651de93327c7dffa
> 0xe4b33c0bb790b88f2463facaf86ae7c17cbdab41187e69ddde8cc1c1fda7c9ab
> ```
2) Select local arbitrum network in Metamask
- Go back to Metamask or click the extension icon
- Select `Main Ethereum Network` top right hand side
- Choose `Custom RPC`
- Enter `Local Arbitrum` as the network name
- Enter `http://127.0.0.1:8547` as the RPC url
- Press the save button
- Metamask should now have an Local Arbitrum account holding ETH
3) Launch the front-end
```bash
yarn start
```
The browser will open to [localhost:8080](http://localhost:8080)

In the popup window that appears, select `Connect`

4) Adopt some pets

The pet shop dApp should now be running in your browser. Choose a pet or two
and click the adopt button to adopt your new animal friend(s).

### Election Dapp

If you want to try another dApp run, deploy the solidity contracts and launch the frontend

```bash
git clone https://github.com/OffchainLabs/demo-dapp-election
cd demo-dapp-election
yarn
truffle migrate --network arbitrum
yarn start
```

### More Demos

For more demos, see our [demos](https://github.com/OffchainLabs/arbitrum-tutorials) mono-repo.
**Want to learn more? Check out the** [**open source code**](https://github.com/offchainlabs/arbitrum)**. Join the team on** [**Discord**](https://discord.gg/ZpZuw7p)**.**
4 changes: 2 additions & 2 deletions docs/L1_L2_Messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ Beyond the superfluous ticket creation, this is suboptimal in that the base subm

### Address Aliasing

When a retryable ticket is executed on L2, the sender's address —i.e., that which is returned by `msg.sender` — will _not_ simply be the address of the contract on L1 that initiated the message; rather it will be the contract's "L2 Alias." A contract address's L2 alias is its value increased by the hex value `0x1111000000000000000000000000000000001111`:
All messages that are not initiated on L1 by the Sequencer (which includes all retryable tickets) are submitted via the [Delayed Inbox](Censorship_resistance). When unsigned messages in the Delayed Inbox are executed on L2, the sender's address —i.e., that which is returned by `msg.sender` — will _not_ simply be the L1 address that sent the message; rather it will be the address's "L2 Alias." An address's L2 alias is its value increased by the hex value `0x1111000000000000000000000000000000001111`:

```
L2_Alias = L1_Contract_ Address + 0x1111000000000000000000000000000000001111
```

The Arbitrum protocol's usage of L2 Aliases for L1-to-L2 messages prevents cross-chain exploits that would otherwise be possible if we simply reused L1 contact addresses.
The Arbitrum protocol's usage of L2 Aliases for L1-to-L2 messages prevents cross-chain exploits that would otherwise be possible if we simply reused the same L1 addresses as the L2 sender.

If for some reason you need to compute the L1 address from an L2 alias on chain, you can use our `AddressAliasHelper` library:

Expand Down
8 changes: 4 additions & 4 deletions docs/Mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ title: What is "Mainnet Beta"?
sidebar_label: What is "Mainnet Beta"?
---

Arbitrum One — the first permissionless Ethereum layer 2 with full Ethereum smart contract functionality — is [live](https://offchain.medium.com/mainnet-for-everyone-27ce0f67c85e)! We're sure you're (almost) as excited as we are; here's what you need to know before using the system:
Arbitrum One — the first permissionless Ethereum layer 2 rollup with full Ethereum smart contract functionality — is [live on mainnet](https://offchain.medium.com/mainnet-for-everyone-27ce0f67c85e) — as is [Nova](https://medium.com/offchainlabs/its-time-for-a-new-dawn-nova-is-open-to-the-public-a081df1e4ad2), our first [AnyTrust](AnyTrust.md) chain! We're sure you're (almost) as excited as we are; here's what you need to know before using the system:

### Some Words of Caution

- **Why Mainnet "Beta?"; Current De/Centralization State**: Arbitrum One has its full feature set that you'll see described in these docs fully implemented and live: fraud proofs, permissionless usage, you name it. That said, given that Arbitrum is still a new, cutting edge, and complex system, we currently maintain various levels of control over the system while still in this early Beta phase; this includes contract upgradeability, the ability to pause the system, validator whitelisting, and ~~[token bridge whitelisting](https://developer.offchainlabs.com/docs/bridging_assets#default-standard-bridging)~~. We believe temporarily maintaining these capabilities is the only responsible way to launch while we continue to harden our system; as we progressively decentralized, these controls will be phased and eventually eliminated entirely.
- **Why Mainnet "Beta?"; Current De/Centralization State**: Arbitrum One and Nova have their full feature sets that you'll see described in these docs fully implemented and live: fraud proofs, permissionless usage, you name it. That said, given that Arbitrum is still a new, cutting edge, and complex system, we currently maintain various levels of control over the chains while they're still in this early Beta phase; this includes contract upgradeability, the ability to pause the system, validator whitelisting, and ~~[token bridge whitelisting](https://developer.offchainlabs.com/docs/bridging_assets#default-standard-bridging)~~. We believe temporarily maintaining these capabilities is the only responsible way to launch while we continue to harden our system; as we progressively decentralized, these controls will be phased and eventually eliminated entirely.

To track the status of Aribtrum One's decentralization, you can follow updates from [us](https://offchain.medium.com/) (obviously) or check out [L2Beats](https://l2beat.com/projects/arbitrum/), who have thus far done a great job of thoroughly and responsibly providing information on Arbitrum and other L2 systems.
To track the status of the Arbitrum chains' decentralization, you can follow updates from [us](https://offchain.medium.com/) (obviously) or, for Arbitrum One, check out [L2Beat](https://l2beat.com/projects/arbitrum/), who have thus far done a great job of thoroughly and responsibly providing information on Arbitrum Rollup and other L2 systems.

- **Why Mainnet "Beta?": Undiscovered Bugs 😱**: Despite the fact that we at Offchain Labs have thoroughly thought through the many design choices in our protocol, have been as careful implementing them as we could be, have been audited by several independent firms, have a team of engineers that are all very smart and cool, etc.,... there remains a non-zero chance that our codebase contains some undiscovered vulnerabilities that put user funds at risk. Users should carefully factor in this risk in their decision to use Arbitrum one / in deciding how much of their value to entrust into the system. (And should you yourself happen to discover one such bug, might we kindly direct you to our [bug bounty program](https://immunefi.com/bounty/arbitrum/)?)

- **General Caution: Beware of Scams and Rugs**: Arbitrum, like Ethereum, is permissionless; on both platforms, anybody can deploy any smart contract code they want. Users should treat interacting with contracts on Arbitrum exactly as they do with Ethereum, i.e., they should only do so if they have good reason to trust that the application is secure.

## Getting Started

..okay, with that out of the way, let's talk about getting started using Arbitrum one! To get a sense of what's out there, you can check out our [portal page](https://portal.arbitrum.one/), where we showcase some of the dApps, wallets, and infrastructure currently live on Arbitrum.
..okay, with that out of the way, let's talk about getting started! To get a sense of what's out there, you can check out our [portal page](https://portal.arbitrum.one/), where we showcase some of the dApps, wallets, and infrastructure currently live.

See [Public Chains](Public_Chains.md) for more info on getting started.
14 changes: 9 additions & 5 deletions docs/Node_Providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,27 @@ To interact with Arbitrum One and the RinkArby testnet, you can rely on the same

## [Alchemy](https://alchemy.com/?a=arbitrum-docs)

Alchemy provides endpoints for both Arbitrum One (Mainnet) and Rinkeby testnet. To use these RPC endpoints, you need to create a free account and set up an ***Alchemy API key*** to authenticate your requests. For detailed steps of how to create one, see the [Alchemy's documentation](https://docs.alchemy.com/alchemy/introduction/getting-started#1.create-an-alchemy-key).
Alchemy provides endpoints for both Arbitrum One (Mainnet) and Rinkeby testnet. To use these RPC endpoints, you need to create a free account and set up an **_Alchemy API key_** to authenticate your requests. For detailed steps of how to create one, see the [Alchemy's documentation](https://docs.alchemy.com/alchemy/introduction/getting-started#1.create-an-alchemy-key).

Next, depending one which network you want to interact with, you can choose between the two RPC endpoints provided by Alchemy and interact with them directly in the command line or point your [wallet's](https://portal.arbitrum.one/#wallets) RPC endpoints to them. For more information on Arbitrum JSON-RPC API methods supported by Alchemy, check out the [official documentation](https://docs.alchemy.com/alchemy/apis/arbitrum).

Alchemy provides 300M compute units per month for free, or the equivalent of 30M getLatestBlock requests. Additional usage requires upgrading to a Growth Tier ($49 / month).

## [Infura](https://infura.io/)

Infura is a node service provider that provides access to Arbitrum One (Mainnet) and Rinkeby testnet. To start interacting with either of these networks, you need to set up an Infura account and create a project. Next, you will be given a ***Project ID*** (for detailed steps, check out the [Infura's documentation](https://blog.infura.io/getting-started-with-infura-28e41844cc89/)). You can now select which endpoint you want to connect to, this could be Arbitrum One, or it could be Rinkeby testnet.
Infura is a node service provider that provides access to Arbitrum One (Mainnet) and Rinkeby testnet. To start interacting with either of these networks, you need to set up an [Infura account](https://infura.io/register) and create a new key. For detailed steps, check out [Infura's documentation](https://docs.infura.io/infura/networks/arbitrum).

Infura provides access to Arbitrum up to 100k requests per day for free. Once Arbitrum leaves beta in Infura, it will be charged as an addon of $200 / month.
You can now select which endpoint you want to connect to, this could be Arbitrum One, or it could be Rinkeby testnet.

Infura provides access to Arbitrum across all their subscription plans (Core Free, Developer, Team & Growth). See [pricing & daily request rate limits](https://infura.io/pricing)

## [QuickNode](https://www.quicknode.com/)

QuickNode supports both Arbitrum One (Mainnet) and Rinkeby testnet and allows users to interact with these chains. For a full guide of how to set up an Arbitrum node on QuickNode, see the [QuickNode's Arbitrum RPC documentation](https://www.quicknode.com/docs/arbitrum).
QuickNode supports Arbitrum One Mainnet, Goerli and Rinkeby testnet, as well as Arbitrum Nova Mainnet, and allows users to interact with these chains.

For a full guide of how to use an Arbitrum node on QuickNode, see the [QuickNode's Arbitrum](https://www.quicknode.com/docs/arbitrum) and [Quicknode's Arbitrum Nova documentation](https://www.quicknode.com/docs/arbitrum-nova).

Quicknode provides 300k Arbitrum requests per month at a rate of $9 / month.
[Quicknode](https://www.quicknode.com/accounts/new-signup) provides 10 million API credits per month for Arbitrum for free.

## [Moralis](https://moralis.io/)

Expand Down
Loading

0 comments on commit 0d71041

Please sign in to comment.