Skip to content
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

feat: add base mainnet support #200

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions docs/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Mainnets
- `optimism` (Optimism)
- `arbitrum` (Arbitrum One)
- `arbitrum-nova` (Arbitrum Nova)
- `base` (Base)
- `filecoin` (Filecoin)

Local
Expand Down
16 changes: 12 additions & 4 deletions docs/cli/chains.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ tableland chains
"pollingTimeout": 10000,
"pollingInterval": 1500
},
"base-sepolia": {
"chainName": "base-sepolia",
"chainId": 84532,
"contractAddress": "0xA85aAE9f0Aec5F5638E5F13840797303Ab29c9f9",
"base": {
"chainName": "base",
"chainId": 8453,
"contractAddress": "0x8268F7Aba0E152B3A853e8CB4Ab9795Ec66c2b6B",
"baseUrl": "https://tableland.network/api/v1",
"pollingTimeout": 10000,
"pollingInterval": 1500
Expand Down Expand Up @@ -109,6 +109,14 @@ tableland chains
"pollingTimeout": 10000,
"pollingInterval": 1500
},
"base-sepolia": {
"chainName": "base-sepolia",
"chainId": 84532,
"contractAddress": "0xA85aAE9f0Aec5F5638E5F13840797303Ab29c9f9",
"baseUrl": "https://testnets.tableland.network/api/v1",
"pollingTimeout": 10000,
"pollingInterval": 1500
},
"polygon-amoy": {
"chainName": "polygon-amoy",
"chainId": 80002,
Expand Down
1 change: 1 addition & 0 deletions docs/cli/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ homestead
optimism
arbitrum
arbitrum-nova
base
polygon
filecoin
sepolia
Expand Down
2 changes: 1 addition & 1 deletion docs/fundamentals/about/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ We’re here to build a new web. Together.
#### Q2

- Ethers v6 upgrade.
- Base Sepolia & Polygon Amoy chain support.
- Base (Mainnet, Sepolia) & Polygon Amoy chain support.
- [Basin](https://basin.textile.io/) official launch.

#### Q1
Expand Down
1 change: 1 addition & 0 deletions docs/fundamentals/architecture/table-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ To view the TABLE token itself, check out the deployed contracts on various bloc
| Optimism | Mainnet | https://opensea.io/collection/tableland-tables-optimism |
| Arbitrum One | Mainnet | https://opensea.io/collection/tableland-tables-arbitrum |
| Arbitrum Nova | Mainnet | https://opensea.io/collection/tableland-tables-arbitrum-nova |
| Base | Mainnet | https://opensea.io/collection/tableland-tables |
| Polygon | Mainnet | https://opensea.io/collection/tableland-tables-polygon |
| Ethereum Sepolia | Testnet | https://testnets.opensea.io/collection/tableland-tables-2 |
| Optimism Sepolia | Testnet | No marketplace support |
Expand Down
5 changes: 0 additions & 5 deletions docs/fundamentals/supported-chains.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ Note that in addition to each chain's unique block time, there is also a chain-s

<ChainsList type={'mainnets'} format={'list'} />

:::note

[Base](https://www.base.org/) is also supported, but currently, it is _only_ the Base Sepolia testnet. If you're interested in mainnet support, please reach out and let us know!
:::

## Chain information

If would like to dive straight into chain-specific overviews, with decision considerations and other chain information (chain ID, contracts, block explorers, faucets, etc.), head to one of the pages below. The full list of chain-specific details can be found in the [chain info pages](/quickstarts/chains). The following shows the deployed contracts addresses across all mainnet and testnet chains:
Expand Down
2 changes: 1 addition & 1 deletion docs/local-tableland/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ This _only_ restarts the validator, but you'd have to handle the Hardhat node se
The `getAccounts` method returns a list of accounts that are available on the Tableland network. This returns all accounts at the Hardhat `http://127.0.0.1:8545` endpoint as an ethersjs `Wallet` instance. Optionally, you can pass an instance of `LocalTableland` as well.

```js
const [accounts] = await getAccounts();
const accounts = await getAccounts();
const signer = accounts[1];
console.log(signer.address);
// 0x70997970C51812dc3A010C7d01b50e0d17dc79C8
Expand Down
5 changes: 2 additions & 3 deletions docs/quickstarts/chains/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ keywords:

import { ChainSection } from '@site/src/components/SupportedChains'

Base is a Layer 2 chain—and currently, **_only_** Base Sepolia is supported (i.e., no mainnet support, yet). Check out the overview of what this network is and relevant information when using it.

## Overview

[Optimism](https://www.base.org/) is an [optimistic rollup](https://ethereum.org/en/developers/docs/scaling/optimistic-rollups/) built with Optimism's OP stack. Note that developers must bridge assets from Ethereum to Base to take advantage of the faster transaction confirmation speeds and low costs.
[Base](https://www.base.org/) is a Layer 2 chain built on the Optimism's OP stack. Note that developers must bridge assets from Ethereum to Base to take advantage of the faster transaction confirmation speeds and low costs.

## Setup & resources

<ChainSection chainName='base-sepolia' />
<ChainSection chainName='base' />

### Getting testnet funds

Expand Down
1 change: 1 addition & 0 deletions docs/studio/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Mainnets
- `optimism` (Optimism)
- `arbitrum` (Arbitrum One)
- `arbitrum-nova` (Arbitrum Nova)
- `base` (Base)
- `filecoin` (Filecoin)

Local (for development mode only)
Expand Down
1 change: 1 addition & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ async function createConfig(): Promise<Config> {
// out: "./docs/api/sdk",
// },
// ],
"custom-loader",
[
// Note: (only) during local dev, you may run into an infinite loop issue that
// occurs when certain files get modified
Expand Down
70 changes: 54 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,27 @@
"@docusaurus/theme-mermaid": "^3.4.0",
"@docusaurus/theme-search-algolia": "^3.4.0",
"@mdx-js/react": "^3.0.1",
"@tableland/sdk": "^7.1.0",
"@tableland/sdk": "^7.2.0",
"@vercel/analytics": "^1.0.0",
"buffer": "^6.0.3",
"clsx": "^2.0.0",
"custom-loader": "file:plugins/custom-loader",
"docusaurus-plugin-openapi": "^0.7.5",
"docusaurus-plugin-remote-content": "^4.0.0",
"docusaurus-preset-openapi": "^0.7.5",
"dotenv": "^16.3.1",
"hast-util-is-element": "^3.0.0",
"https-browserify": "^1.0.0",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-icons": "^4.12.0",
"react-modal": "^3.16.1",
"rehype-katex": "^7.0.0",
"remark-math": "^6.0.0",
"stream-http": "^3.2.0",
"url": "^0.11.3"
},
"keywords": [
Expand Down
20 changes: 20 additions & 0 deletions plugins/custom-loader/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = function (context, options) {
return {
name: "custom-loader",
configureWebpack(config, isServer, utils) {
return {
resolve: {
alias: {
path: require.resolve("path-browserify"),
},
fallback: {
fs: false,
http: require.resolve("stream-http"),
https: require.resolve("https-browserify"),
os: require.resolve("os-browserify/browser"),
},
},
};
},
};
};
5 changes: 5 additions & 0 deletions plugins/custom-loader/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "custom-loader",
"version": "0.0.0",
"private": true
}
9 changes: 9 additions & 0 deletions src/components/SupportedChains.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ function getChainExplorer(chain: string, contract: string): string {
return `https://optimistic.etherscan.io/address/${contract}`;
case "optimism-sepolia":
return `https://sepolia-optimism.etherscan.io/address/${contract}`;
case "base":
return `https://basescan.org/address/${contract}`;
case "base-sepolia":
return `https://sepolia.basescan.org/address/${contract}`;
case "polygon":
Expand Down Expand Up @@ -179,6 +181,13 @@ export const supportedChains = (): ChainFormatted[] => {
format.bridge = "https://app.optimism.io/bridge";
format.faucet = "https://www.alchemy.com/faucets/optimism-sepolia";
break;
case "base":
format.symbol = "ETH";
format.avgBlockTime = "2";
format.blockDepth = "0";
format.sqlMaterializationTime = "2";
format.bridge = "https://superbridge.app/base";
break;
case "base-sepolia":
format.symbol = "ETH";
format.avgBlockTime = "2";
Expand Down