diff --git a/README.md b/README.md index 8707f0b18..1db414680 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,18 @@ const onboard = Onboard({ label: 'Arbitrum Nova', rpcUrl: 'https://nova.arbitrum.io/rpc' }, + { + id: '0x1e', + token: 'RBTC', + label: 'Rootstock Mainnet', + rpcUrl: 'https://public-node.rsk.co' + }, + { + id: '0x1f', + token: 'tRBTC', + label: 'Rootstock Testnet', + rpcUrl: 'https://public-node.testnet.rsk.co' + }, { id: '0x2105', token: 'ETH', diff --git a/docs/src/lib/services/onboard.js b/docs/src/lib/services/onboard.js index fdbef44a4..0ec25266f 100644 --- a/docs/src/lib/services/onboard.js +++ b/docs/src/lib/services/onboard.js @@ -247,6 +247,18 @@ const intiOnboard = async (theme) => { token: 'OETH', label: 'Optimism', rpcUrl: 'https://mainnet.optimism.io' + }, + { + id: '0x1e', + token: 'RBTC', + label: 'Rootstock Mainnet', + rpcUrl: 'https://public-node.rsk.co' + }, + { + id: '0x1f', + token: 'tRBTC', + label: 'Rootstock Testnet', + rpcUrl: 'https://public-node.testnet.rsk.co' } ], appMetadata: { diff --git a/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md b/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md index 91b7302c5..33d8bd0ee 100644 --- a/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md +++ b/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md @@ -52,6 +52,7 @@ web3-onboard supports all EVM networks. Supporting a new network is simply a mat - Goerli - Sepolia - Base Goerli +- Rootstock - All other EVM networks ### Optional - Use an API key to fetch real time transaction data, balances & gas @@ -126,7 +127,19 @@ const onboard = Onboard({ token: 'ETH', label: 'Base', rpcUrl: 'https://mainnet.base.org' - } + }, + { + id: '0x1e', + token: 'RBTC', + label: 'Rootstock Mainnet', + rpcUrl: 'https://public-node.rsk.co' + }, + { + id: '0x1f', + token: 'tRBTC', + label: 'Rootstock Testnet', + rpcUrl: 'https://public-node.testnet.rsk.co' + }, ] }) diff --git a/docs/src/routes/docs/[...2]getting-started/[...1]installation/+page.md b/docs/src/routes/docs/[...2]getting-started/[...1]installation/+page.md index b409ecd2f..7ecdd18da 100644 --- a/docs/src/routes/docs/[...2]getting-started/[...1]installation/+page.md +++ b/docs/src/routes/docs/[...2]getting-started/[...1]installation/+page.md @@ -84,6 +84,18 @@ const chains = [ token: 'ETH', label: 'Base', rpcUrl: 'https://mainnet.base.org' + }, + { + id: '0x1e', + token: 'RBTC', + label: 'Rootstock Mainnet', + rpcUrl: 'https://public-node.rsk.co' + }, + { + id: '0x1f', + token: 'tRBTC', + label: 'Rootstock Testnet', + rpcUrl: 'https://public-node.testnet.rsk.co' } ] ``` diff --git a/docs/src/routes/docs/[...3]modules/[...1]core/+page.md b/docs/src/routes/docs/[...3]modules/[...1]core/+page.md index 6bb769ac4..0f7fbb717 100644 --- a/docs/src/routes/docs/[...3]modules/[...1]core/+page.md +++ b/docs/src/routes/docs/[...3]modules/[...1]core/+page.md @@ -671,6 +671,18 @@ const onboard = Onboard({ token: 'OETH', label: 'Optimism', rpcUrl: 'https://mainnet.optimism.io' + }, + { + id: '0x1e', + token: 'RBTC', + label: 'Rootstock Mainnet', + rpcUrl: 'https://public-node.rsk.co' + }, + { + id: '0x1f', + token: 'tRBTC', + label: 'Rootstock Testnet', + rpcUrl: 'https://public-node.testnet.rsk.co' } ], appMetadata: { diff --git a/docs/src/routes/docs/[...3]modules/[...3]react/+page.md b/docs/src/routes/docs/[...3]modules/[...3]react/+page.md index 619a937b7..f4e7ffb90 100644 --- a/docs/src/routes/docs/[...3]modules/[...3]react/+page.md +++ b/docs/src/routes/docs/[...3]modules/[...3]react/+page.md @@ -72,6 +72,18 @@ init({ token: 'ETH', label: 'Base', rpcUrl: 'https://mainnet.base.org' + }, + { + id: '0x1e', + token: 'RBTC', + label: 'Rootstock Mainnet', + rpcUrl: 'https://public-node.rsk.co' + }, + { + id: '0x1f', + token: 'tRBTC', + label: 'Rootstock Testnet', + rpcUrl: 'https://public-node.testnet.rsk.co' } ] }) diff --git a/docs/src/routes/docs/[...3]modules/[...7]vue/+page.md b/docs/src/routes/docs/[...3]modules/[...7]vue/+page.md index bc02f8d86..88079ec2d 100644 --- a/docs/src/routes/docs/[...3]modules/[...7]vue/+page.md +++ b/docs/src/routes/docs/[...3]modules/[...7]vue/+page.md @@ -61,6 +61,18 @@ const web3Onboard = init({ token: 'ETH', label: 'Base', rpcUrl: 'https://mainnet.base.org' + }, + { + id: '0x1e', + token: 'RBTC', + label: 'Rootstock Mainnet', + rpcUrl: 'https://public-node.rsk.co' + }, + { + id: '0x1f', + token: 'tRBTC', + label: 'Rootstock Testnet', + rpcUrl: 'https://public-node.testnet.rsk.co' } ] }) diff --git a/docs/src/routes/docs/[...4]wallets/[...14]injected/+page.md b/docs/src/routes/docs/[...4]wallets/[...14]injected/+page.md index 4b24c91a2..fe00e168f 100644 --- a/docs/src/routes/docs/[...4]wallets/[...14]injected/+page.md +++ b/docs/src/routes/docs/[...4]wallets/[...14]injected/+page.md @@ -65,6 +65,18 @@ const onboard = Onboard({ token: 'ETH', label: 'Base', rpcUrl: 'https://mainnet.base.org' + }, + { + id: '0x1e', + token: 'RBTC', + label: 'Rootstock Mainnet', + rpcUrl: 'https://public-node.rsk.co' + }, + { + id: '0x1f', + token: 'tRBTC', + label: 'Rootstock Testnet', + rpcUrl: 'https://public-node.testnet.rsk.co' } ], appMetadata: { diff --git a/examples/with-ledger/pages/index.js b/examples/with-ledger/pages/index.js index a0c497351..cbe79f163 100644 --- a/examples/with-ledger/pages/index.js +++ b/examples/with-ledger/pages/index.js @@ -64,6 +64,18 @@ init({ token: 'FTM', label: 'Fantom', rpcUrl: 'https://rpc.ftm.tools/' + }, + { + id: '0x1e', + token: 'RBTC', + label: 'Rootstock Mainnet', + rpcUrl: 'https://public-node.rsk.co' + }, + { + id: '0x1f', + token: 'tRBTC', + label: 'Rootstock Testnet', + rpcUrl: 'https://public-node.testnet.rsk.co' } ], appMetadata: { diff --git a/examples/with-nextjs-13/web3-onboard.ts b/examples/with-nextjs-13/web3-onboard.ts index 9ade5bb75..e06db6cfc 100644 --- a/examples/with-nextjs-13/web3-onboard.ts +++ b/examples/with-nextjs-13/web3-onboard.ts @@ -123,6 +123,18 @@ export default init({ token: 'MATIC', label: 'Matic Mainnet', rpcUrl: 'https://matic-mainnet.chainstacklabs.com' + }, + { + id: '0x1e', + token: 'RBTC', + label: 'Rootstock Mainnet', + rpcUrl: 'https://public-node.rsk.co' + }, + { + id: '0x1f', + token: 'tRBTC', + label: 'Rootstock Testnet', + rpcUrl: 'https://public-node.testnet.rsk.co' } ], appMetadata: { diff --git a/examples/with-vite-react/src/web3-onboard.ts b/examples/with-vite-react/src/web3-onboard.ts index cacb6b1a2..da0d3e56f 100644 --- a/examples/with-vite-react/src/web3-onboard.ts +++ b/examples/with-vite-react/src/web3-onboard.ts @@ -137,6 +137,18 @@ export default init({ token: 'ETH', label: 'Base', rpcUrl: 'https://mainnet.base.org' + }, + { + id: '0x1e', + token: 'RBTC', + label: 'Rootstock Mainnet', + rpcUrl: 'https://public-node.rsk.co' + }, + { + id: '0x1f', + token: 'tRBTC', + label: 'Rootstock Testnet', + rpcUrl: 'https://public-node.testnet.rsk.co' } ], appMetadata: { diff --git a/examples/with-vuejs-v2/src/components/HelloWorld.vue b/examples/with-vuejs-v2/src/components/HelloWorld.vue index 2b876a0c1..52c3a3a57 100644 --- a/examples/with-vuejs-v2/src/components/HelloWorld.vue +++ b/examples/with-vuejs-v2/src/components/HelloWorld.vue @@ -60,6 +60,18 @@ const web3Onboard = init({ token: 'ETH', label: 'Base', rpcUrl: 'https://mainnet.base.org' + }, + { + id: '0x1e', + token: 'RBTC', + label: 'Rootstock Mainnet', + rpcUrl: 'https://public-node.rsk.co' + }, + { + id: '0x1f', + token: 'tRBTC', + label: 'Rootstock Testnet', + rpcUrl: 'https://public-node.testnet.rsk.co' } ], }); diff --git a/examples/with-vuejs/src/App.vue b/examples/with-vuejs/src/App.vue index bb458cda8..e7fcaa299 100644 --- a/examples/with-vuejs/src/App.vue +++ b/examples/with-vuejs/src/App.vue @@ -28,6 +28,18 @@ init({ token: 'ARB', label: 'Arbitrum Nova', rpcUrl: 'https://nova.arbitrum.io/rpc' + }, + { + id: '0x1e', + token: 'RBTC', + label: 'Rootstock Mainnet', + rpcUrl: 'https://public-node.rsk.co' + }, + { + id: '0x1f', + token: 'tRBTC', + label: 'Rootstock Testnet', + rpcUrl: 'https://public-node.testnet.rsk.co' } ] }) diff --git a/packages/core/README.md b/packages/core/README.md index efb355c55..d9743cef4 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -635,7 +635,19 @@ const onboard = Onboard({ token: 'FTM', label: 'Fantom Mainnet', rpcUrl: 'https://rpc.ftm.tools/' - } + }, + { + id: '0x1e', + token: 'RBTC', + label: 'Rootstock Mainnet', + rpcUrl: 'https://public-node.rsk.co' + }, + { + id: '0x1f', + token: 'tRBTC', + label: 'Rootstock Testnet', + rpcUrl: 'https://public-node.testnet.rsk.co' + }, ], appMetadata: { name: 'Token Swap', diff --git a/packages/core/package.json b/packages/core/package.json index dbc892188..81015cfc0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/core", - "version": "2.21.3-alpha.1", + "version": "2.21.3-alpha.2", "description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", diff --git a/packages/core/src/icons/index.ts b/packages/core/src/icons/index.ts index 3dda66abc..d3a6f6a5f 100644 --- a/packages/core/src/icons/index.ts +++ b/packages/core/src/icons/index.ts @@ -13,6 +13,7 @@ export { default as gnosisIcon } from './gnosis.js' export { default as harmonyOneIcon } from './harmony-one.js' export { default as arbitrumIcon } from './arbitrum.js' export { default as baseIcon } from './base.js' +export { default as rootstockIcon } from './rootstock.js' // other export { default as hourglass } from './hourglass.js' export { default as questionIcon } from './question.js' diff --git a/packages/core/src/icons/rootstock.ts b/packages/core/src/icons/rootstock.ts new file mode 100644 index 000000000..ce2c29faa --- /dev/null +++ b/packages/core/src/icons/rootstock.ts @@ -0,0 +1,2 @@ +export default ` +` \ No newline at end of file diff --git a/packages/core/src/utils.ts b/packages/core/src/utils.ts index ea7a4d2cf..af3263ee3 100644 --- a/packages/core/src/utils.ts +++ b/packages/core/src/utils.ts @@ -28,7 +28,8 @@ import { avalancheIcon, harmonyOneIcon, arbitrumIcon, - baseIcon + baseIcon, + rootstockIcon } from './icons/index.js' import type { @@ -137,7 +138,9 @@ export const chainIdToLabel: Record = { '0x64': 'Gnosis', '0x63564C40': 'Harmony One', '0xa4b1': 'Arbitrum One', - '0xa4ba': 'Arbitrum Nova' + '0xa4ba': 'Arbitrum Nova', + '0x1e': 'Rootstock Mainnet', + '0x1f': 'Rootstock Testnet' } export const networkToChainId: Record = { @@ -150,7 +153,9 @@ export const networkToChainId: Record = { 'bsc-main': '0x38', 'matic-main': '0x89', 'fantom-main': '0xfa', - 'matic-mumbai': '0x80001' + 'matic-mumbai': '0x80001', + 'rootstock-mainnet': '0x1e', + 'rootstock-testnet': '0x1f' } export const chainStyles: Record = { @@ -233,6 +238,14 @@ export const chainStyles: Record = { '0x80001': { icon: polygonIcon, color: '#8247E5' + }, + '0x1e': { + icon: rootstockIcon, + color: '#0259F9' + }, + '0x1f': { + icon: rootstockIcon, + color: '#8247E5' } } diff --git a/packages/demo/package.json b/packages/demo/package.json index 90ab86989..cc7845a05 100644 --- a/packages/demo/package.json +++ b/packages/demo/package.json @@ -33,7 +33,7 @@ "@web3-onboard/capsule": "2.0.1", "@web3-onboard/cede-store": "^2.2.0", "@web3-onboard/coinbase": "^2.2.6", - "@web3-onboard/core": "^2.21.3-alpha.1", + "@web3-onboard/core": "^2.21.3-alpha.2", "@web3-onboard/dcent": "^2.2.7", "@web3-onboard/enkrypt": "^2.0.3", "@web3-onboard/fortmatic": "^2.0.18", diff --git a/packages/demo/src/App.svelte b/packages/demo/src/App.svelte index 221d14817..c121a7b73 100644 --- a/packages/demo/src/App.svelte +++ b/packages/demo/src/App.svelte @@ -342,6 +342,18 @@ token: 'OETH', label: 'Optimism', rpcUrl: 'https://mainnet.optimism.io' + }, + { + id: '0x1e', + token: 'RBTC', + label: 'Rootstock Mainnet', + rpcUrl: 'https://public-node.rsk.co' + }, + { + id: '0x1f', + token: 'tRBTC', + label: 'Rootstock Testnet', + rpcUrl: 'https://public-node.testnet.rsk.co' } ], connect: { @@ -751,6 +763,9 @@ +