Skip to content

General refactoring #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# Optimistic Ethereum Tutorials
# Rollux Tutorials

[![Discord](https://img.shields.io/discord/1087373765014454322)](https://discord.gg/rollux)
[![Twitter Follow](https://img.shields.io/twitter/follow/RolluxL2?style=social)](https://twitter.com/RolluxL2)

[![Discord](https://img.shields.io/discord/667044843901681675.svg?color=768AD4&label=discord&logo=https%3A%2F%2Fdiscordapp.com%2Fassets%2F8c9701b98ad4372b58f13fd9f65f966e.svg)](https://discord-gateway.optimism.io)
[![Twitter Follow](https://img.shields.io/twitter/follow/optimismFND.svg?label=optimismFND&style=social)](https://twitter.com/optimismFND)

## Getting Started

* [Getting started developing for Optimism](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/getting-started)
* [Optimism + Alchemy](https://docs.alchemy.com/alchemy/introduction/getting-started)
* [Writing your first contract on Optimism](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/first-contract) - if you are just getting started with blockchain development
* [Getting started developing for Rollux](./getting-started)
* [Writing your first contract on Rollux](./first-contract) - if you are just getting started with blockchain development


## Cross Domain

* [Communication between contracts on Optimism and Ethereum](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/cross-dom-comm)
* [Bridging ETH with the Optimism SDK](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/cross-dom-bridge-eth)
* [Bridging ERC-20 tokens with the Optimism SDK](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/cross-dom-bridge-erc20)
* [View transactions between layers](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/sdk-view-tx)
* [Creating an ERC20 Token on L2 to represent one on L1](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/standard-bridge-standard-token)
* [Registering a Custom ERC20 Token on L2](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/standard-bridge-custom-token)
* [Communication between contracts on Rollux and Syscoin NEVM](./cross-dom-comm)
* [Bridging SYS with the Rollux SDK](./cross-dom-bridge-eth)
* [Bridging ERC-20 tokens with the Rollux SDK](./cross-dom-bridge-erc20)
* [View transactions between layers](./sdk-view-tx)
* [Creating an ERC20 Token on L2 to represent one on L1](./standard-bridge-standard-token)
* [Registering a Custom ERC20 Token on L2](./standard-bridge-custom-token)



## Misc.

* [Estimate the costs of an Optimistic (L2) transaction](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/sdk-estimate-gas)
* [Estimate the costs of a Rollux (L2) transaction](./sdk-estimate-gas)


## Ecosystem

- [Alchemy](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/ecosystem/alchemy)
- [AttestationStation (Reputation primitive on Optimism)](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/ecosystem/attestation-station)
- [Tenderly](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/ecosystem/tenderly)
- [Ankr](./ecosystem/ankr)
- [AttestationStation (Reputation primitive on Rollux)](./ecosystem/attestation-station)
- [Tenderly](./ecosystem/tenderly)
66 changes: 0 additions & 66 deletions ecosystem/alchemy/README.md

This file was deleted.

Binary file removed ecosystem/alchemy/assets/copykey.png
Binary file not shown.
Binary file removed ecosystem/alchemy/assets/create-app-l2-testnet.png
Binary file not shown.
Binary file removed ecosystem/alchemy/assets/lets-build.png
Binary file not shown.
Binary file removed ecosystem/alchemy/assets/payment-details.png
Binary file not shown.
Binary file removed ecosystem/alchemy/assets/select-op.png
Binary file not shown.
Binary file removed ecosystem/alchemy/assets/signup.png
Binary file not shown.
Binary file removed ecosystem/alchemy/assets/team-form.png
Binary file not shown.
Binary file removed ecosystem/alchemy/assets/viewkey.png
Binary file not shown.
50 changes: 50 additions & 0 deletions ecosystem/ankr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Getting your API key from Ankr

[![Discord](https://img.shields.io/discord/1087373765014454322)](https://discord.gg/rollux)
[![Twitter Follow](https://img.shields.io/twitter/follow/RolluxL2?style=social)](https://twitter.com/RolluxL2)

This tutorial assumes you are completely new to Ankr, but that you want to get applications and API keys to use with Rollux.


## Register

The first step is to register for a free Ankr account.

1. Browse [to Ankr](https://www.ankr.com/rpc/) then click **Sign up**.

<img src="assets/ankrSignup.png" width="300"/>

1. You can choose from two methods to sign up; Google or your ETH wallet. We recommend using your Ethereum wallet and this guide is based on that.

1. Select the wallet you are using. In this example we are using Metamask.

<img src="assets/ankrSelectWallet.png" width="300"/>


1. Now, within your wallet prompt, place a check beside the wallet account you wish to use wtih Ankr, then click **Next**.

<img src="assets/ankrWalletAcctSelection.png" width="300"/>

1. If you're sure you selected the right account, click **Connect**.

<img src="assets/ankrWalletAcctConnect.png" width="300"/>

1. Now sign to finish the process and connect to Ankr.com

<img src="assets/ankrWalletAcctSign.png" width="300"/>

1. If you see a reminder about enabling Ankr notifications, just skip it for now.

<img src="assets/ankrNotifications.png" width="300"/>

1. Once your Ankr account is ready and connected to your wallet, you will see the following account buttons at the top-right of the page.

<img src="assets/ankrAcctButtons.png" width="300"/>

1. Now scroll through the different networks available and select the one you want. In this example we use **Rollux testnet**.

<img src="assets/ankrSelectNetwork.png" width="300"/>

1. On the Rollux testnet page, scroll down to the Get Started area. Here you will see your API key as the portion highlighted in blue in the image below. Copy this and save it for future use.

<img src="assets/ankrAPIKey.png" width="400"/>
Binary file added ecosystem/ankr/assets/ankrAPIKey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ecosystem/ankr/assets/ankrAcctButtons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ecosystem/ankr/assets/ankrNotifications.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ecosystem/ankr/assets/ankrSelectNetwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ecosystem/ankr/assets/ankrSelectWallet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ecosystem/ankr/assets/ankrSignup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ecosystem/ankr/assets/ankrWalletAcctConnect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ecosystem/ankr/assets/ankrWalletAcctSign.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 19 additions & 17 deletions first-contract/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Writing your first contract on Optimism
# Writing your first contract on Rollux

[![Discord](https://img.shields.io/discord/1087373765014454322)](https://discord.gg/rollux)
[![Twitter Follow](https://img.shields.io/twitter/follow/RolluxL2?style=social)](https://twitter.com/RolluxL2)

[![Discord](https://img.shields.io/discord/667044843901681675.svg?color=768AD4&label=discord&logo=https%3A%2F%2Fdiscordapp.com%2Fassets%2F8c9701b98ad4372b58f13fd9f65f966e.svg)](https://discord-gateway.optimism.io)
[![Twitter Follow](https://img.shields.io/twitter/follow/optimismFND.svg?label=optimismFND&style=social)](https://twitter.com/optimismFND)

This tutorial assumes that you know how to program, but that you've never dealt with smart contracts, much less written one.
If you are already familiar with Solidity [go here](../getting-started) for a tutorial that teaches you only how to use Optimism with the tools you already know.
If you are already familiar with Solidity [go here](../getting-started) for a tutorial that teaches you only how to use Rollux with the tools you already know.

## Setup

@@ -33,22 +34,21 @@ You can also use MetaMask on a mobile device (iOS or Android), but for software

### Blockchain

In this tutorial we'll use [Optimism](https://www.optimism.io/), an Ethereum Layer 2 blockchain, to run our contracts.
In this tutorial we'll use [Rollux](https://www.rollux.com/), a Syscoin Layer 2 EVM-equivalent Rollup, to run our contracts.

[Deploying contracts and interacting with them costs gas, which has to be purchased with Ether (also known as ETH)](https://ethereum.org/en/developers/docs/gas/).
On the production network that Ether costs money, it is part of the security mechanism of Ethereum.
To avoid spending real money, we'll use Optimism Goerli, a test network built on top of Goerli.
The test network also requires ETH, but it is test ETH you can get for free.
[Deploying contracts and interacting with them costs gas, which has to be purchased with Syscoin (also known as SYS)](https://ethereum.org/en/developers/docs/gas/). There are a variety of sources from which to [acquire SYS](https://syscoin.org/get-sys).
On the production network real SYS costs money, which is part of the security mechanism of Syscoin.
To avoid spending real money, we'll use Rollux Tanenbaum, a test network built on top of Syscoin Tanenbaum.
The test network also requires SYS, but it is test SYS (aka TSYS) you can get for free.

1. Use [this faucet](https://optimismfaucet.xyz/) to obtain Optimism Goerli test ETH.
Follow five [github](https://github.com/) users or organizations to get past the anti-Sybil defense.
1. Use [this faucet](https://sysdomains.xyz/rollux-faucet) to obtain Rollux Tanenbaum test SYS.

1. [Go here](https://chainid.link/?network=optimism-goerli) to add Optimism Goerli to your wallet.
Click **Connect** on the web page and then **Approve** in MetaMask.
1. [Go here](https://chainlist.org/chain/57000) to add Rollux Tanenbaum to your wallet.
Click **Add to Metamask** on the web page and then **Approve** in MetaMask.

1. Permit the network switch.

1. See if you have anything on Optimism Goerli.
1. See if you have anything on Rollux Tanenbaum.



@@ -59,6 +59,8 @@ Here we will use using an integrated development environment (IDE) called [Remix
It has the significant advantage of requiring minimal set up because it runs in your browser.


1. Make sure your Metamask wallet is connected to the Rollux Tanenbaum network.

1. Go to [Remix](https://remix.ethereum.org).

1. Click the Files icon (<img src="assets/remix-files-icon.png" height="24" valign="top" />) and open **contracts > 1_Storage.sol**.
@@ -96,10 +98,10 @@ It has the significant advantage of requiring minimal set up because it runs in

1. Copy the transaction hash from the remix console.

1. Open [Optimism Goerli on Etherscan](https://goerli-optimism.etherscan.io/).
1. Open the [Rollux Tanenbaum Blockscout explorer](https://rollux.tanenbaum.io/).

1. Search for the transaction hash.
Note that it may take a few minutes for Etherscan to get updated.
Note that it may take a few minutes for Blockscout to get updated.

1. Back in Remix, click **retrieve** again to see that the value has changed.

@@ -195,5 +197,5 @@ This is another function definition, with a few differences:
}
```

To learn more Solidity we have [a list of resources](https://help.optimism.io/hc/en-us/articles/4412777835675-Developer-information#h_01FVSVQ5ZQFJDSRYY6WTY18F0N).
To learn more Solidity here is a convenient [list of resources](https://help.optimism.io/hc/en-us/articles/4412777835675-Developer-information#h_01FVSVQ5ZQFJDSRYY6WTY18F0N).
If you learn best by reading source code, [try here](https://ethereum.org/en/developers/tutorials/erc20-annotated-code/).
Loading