Skip to content
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/BUG.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ body:
- '@web3-onboard/decent'
- '@web3-onboard/formatic'
- '@web3-onboard/gnosis'
- '@web3-onboard/injected'
- '@web3-onboard/injected-wallets'
- '@web3-onboard/keepkey'
- '@web3-onboard/keystone'
- '@web3-onboard/ledger'
Expand Down
6 changes: 6 additions & 0 deletions docs/src/lib/services/onboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ const intiOnboard = async (theme) => {
token: 'OETH',
label: 'Optimism',
rpcUrl: 'https://mainnet.optimism.io'
},
{
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}
],
appMetadata: {
Expand Down
12 changes: 6 additions & 6 deletions docs/src/routes/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
<TabPanel value="npm">

```sh copy
npm i @web3-onboard/core @web3-onboard/injected @web3-onboard/transaction-preview
npm i @web3-onboard/core @web3-onboard/injected-wallets @web3-onboard/transaction-preview
```

</TabPanel>
<TabPanel value="yarn">

```sh copy
yarn add @web3-onboard/core @web3-onboard/injected @web3-onboard/transaction-preview
yarn add @web3-onboard/core @web3-onboard/injected-wallets @web3-onboard/transaction-preview
```

</TabPanel>
Expand All @@ -32,14 +32,14 @@ yarn add @web3-onboard/core @web3-onboard/injected @web3-onboard/transaction-pre
<TabPanel value="npm">

```sh copy
npm i @web3-onboard/core @web3-onboard/injected @web3-onboard/transaction-preview
npm i @web3-onboard/core @web3-onboard/injected-wallets @web3-onboard/transaction-preview
```

</TabPanel>
<TabPanel value="yarn">

```sh copy
yarn add @web3-onboard/core @web3-onboard/injected @web3-onboard/transaction-preview
yarn add @web3-onboard/core @web3-onboard/injected-wallets @web3-onboard/transaction-preview
```

</TabPanel>
Expand All @@ -48,14 +48,14 @@ yarn add @web3-onboard/core @web3-onboard/injected @web3-onboard/transaction-pre
<TabPanel value="npm">

```sh copy
npm i @web3-onboard/core @web3-onboard/injected @web3-onboard/transaction-preview
npm i @web3-onboard/core @web3-onboard/injected-wallets @web3-onboard/transaction-preview
```

</TabPanel>
<TabPanel value="yarn">

```sh copy
yarn add @web3-onboard/core @web3-onboard/injected @web3-onboard/transaction-preview
yarn add @web3-onboard/core @web3-onboard/injected-wallets @web3-onboard/transaction-preview
```

</TabPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ web3-onboard supports ALL EVM networks. Supporting a new network is simply a mat
- Avalanche
- BNB Chain
- Celo
- Degen
- Fantom
- Gnosis Chain
- Harmony One
Expand Down Expand Up @@ -132,6 +133,12 @@ const onboard = Onboard({
token: 'ETH',
label: 'Celo',
rpcUrl: 'https://1rpc.io/celo'
},
{
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}
]
})
Expand Down
6 changes: 6 additions & 0 deletions docs/src/routes/docs/[...3]modules/[...1]core/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,12 @@ const onboard = Onboard({
token: 'ETH',
label: 'Celo',
rpcUrl: 'https://1rpc.io/celo'
},
{
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}
],
appMetadata: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ Full Simulation Platform API documentation can be found [here](https://docs.bloc
<TabPanel value="yarn">

```sh copy
yarn add @web3-onboard/core @web3-onboard/injected @web3-onboard/transaction-preview
yarn add @web3-onboard/core @web3-onboard/injected-wallets @web3-onboard/transaction-preview
```

</TabPanel>
<TabPanel value="npm">

```sh copy
npm i @web3-onboard/core @web3-onboard/injected @web3-onboard/transaction-preview
npm i @web3-onboard/core @web3-onboard/injected-wallets @web3-onboard/transaction-preview
```

</TabPanel>
Expand All @@ -48,7 +48,7 @@ To use the Transaction Preview package with web3-onboard all a developer needs t

```typescript copy
import Onboard from '@web3-onboard/core'
import injectedModule from '@web3-onboard/injected'
import injectedModule from '@web3-onboard/injected-wallets'
import transactionPreviewModule from '@web3-onboard/transaction-preview'

const injected = injectedModule()
Expand Down
14 changes: 13 additions & 1 deletion docs/src/routes/examples/[...1]connect-wallet/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ const chains = [
token: 'ETH',
label: 'Celo',
rpcUrl: 'https://1rpc.io/celo'
},
{
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}
]

Expand Down Expand Up @@ -423,6 +429,12 @@ const chains = [
token: 'ETH',
label: 'Celo',
rpcUrl: 'https://1rpc.io/celo'
},
{
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}
]

Expand Down Expand Up @@ -511,4 +523,4 @@ Now that we have our wallet connected, let's display some basic information, suc

## Interacting with the providers - Transfer, Send, Sign using ethers.js

For examples of interacting with the wallet providers please see our demo project [here](https://github.com/blocknative/web3-onboard/blob/9b871a1b3117e92a7c87285677fa5b35c544a8e0/packages/demo/src/App.svelte#L447)
For examples of interacting with the wallet providers please see our demo project [here](https://github.com/blocknative/web3-onboard/blob/9b871a1b3117e92a7c87285677fa5b35c544a8e0/packages/demo/src/App.svelte#L447)
7 changes: 7 additions & 0 deletions docs/src/routes/examples/[...2]uniswap-widget/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ const polygonMainnet = {
rpcUrl: 'https://matic-mainnet.chainstacklabs.com'
}

const degenChain = {
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}

const chains = [ethereumRopsten, polygonMainnet]

const wallets = [injectedModule()]
Expand Down
6 changes: 6 additions & 0 deletions examples/with-ledger/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ init({
token: 'FTM',
label: 'Fantom',
rpcUrl: 'https://rpc.ftm.tools/'
},
{
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}
],
appMetadata: {
Expand Down
6 changes: 6 additions & 0 deletions examples/with-nextjs-13/web3-onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ export default init({
token: 'ETH',
label: 'Celo',
rpcUrl: 'https://1rpc.io/celo'
},
{
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}
],
appMetadata: {
Expand Down
6 changes: 6 additions & 0 deletions examples/with-nextjs/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ const celoMainnet = {
token: 'ETH',
label: 'Celo',
rpcUrl: 'https://1rpc.io/celo'
},
{
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}

const chains = [ethereumRopsten, polygonMainnet, baseMainnet,celoMainnet]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ export const chains = [
token: 'ETH',
label: 'Celo',
rpcUrl: 'https://1rpc.io/celo'
},
{
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}
];

Expand Down
6 changes: 6 additions & 0 deletions examples/with-sveltekit/src/lib/web3-onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ const chains = [
token: 'ETH',
label: 'Celo',
rpcUrl: 'https://1rpc.io/celo'
},
{
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}
]

Expand Down
6 changes: 6 additions & 0 deletions examples/with-vanilla-js/src/onboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ const chains = [
token: 'ETH',
label: 'Celo',
rpcUrl: 'https://1rpc.io/celo'
},
{
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}
]

Expand Down
6 changes: 6 additions & 0 deletions examples/with-vite-react/src/web3-onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ export default init({
token: 'ETH',
label: 'Celo',
rpcUrl: 'https://1rpc.io/celo'
},
{
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}
],
appMetadata: {
Expand Down
6 changes: 6 additions & 0 deletions examples/with-vuejs-v2/src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ const web3Onboard = init({
token: 'ETH',
label: 'Celo',
rpcUrl: 'https://1rpc.io/celo'
},
{
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}
]
})
Expand Down
6 changes: 6 additions & 0 deletions examples/with-vuejs/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ init({
token: 'ETH',
label: 'Celo',
rpcUrl: 'https://1rpc.io/celo'
},
{
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}
]
})
Expand Down
6 changes: 6 additions & 0 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,12 @@ const onboard = Onboard({
token: 'FTM',
label: 'Fantom Mainnet',
rpcUrl: 'https://rpc.ftm.tools/'
},
{
id: 666666666,
token: 'DEGEN',
label: 'Degen',
rpcUrl: 'https://rpc.degen.tips'
}
],
appMetadata: {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/core",
"version": "2.21.4",
"version": "2.21.5-alpha.1",
"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",
Expand Down
12 changes: 12 additions & 0 deletions packages/core/src/icons/degen.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default `
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 477 477">
<defs>
<style>.cls-1{fill:#a36dfe;}.cls-2{fill:#4b2895;}</style>
</defs>
<circle class="cls-1" cx="238.5" cy="238.5" r="238.5"/>
<g>
<path class="cls-2" d="M237.85,113.99c29.25,1.32,54.97,2.45,80.69,3.69,3.95,.19,7.92,.72,11.82,1.43,9.23,1.69,15.34,8.72,14.78,18.2-1.33,22.33-3.22,44.63-4.79,66.95-.81,11.47-1.49,22.96-2.12,34.44-.29,5.24-2.03,8.14-7.74,10.18-37.84,13.52-76.98,15.46-116.47,13.42-23.24-1.2-45.99-5.86-68.06-13.68-4.71-1.67-6.72-3.91-7.03-8.72-1.31-20.46-2.83-40.9-4.25-61.35-.94-13.55-2.1-27.1-2.7-40.66-.49-11.15,6.17-18.37,17.2-19.01,30.7-1.78,61.4-3.39,88.69-4.88Z"/><path class="cls-2" d="M238.34,363.01c-31.19-1.24-61.52-5.51-90.12-18.31-20.8-9.31-38.13-23.01-48.65-43.63-3.63-7.1-5.68-15.3-6.91-23.24-1.17-7.59,1.95-14.47,8.76-18.93,6.74-4.42,13.4-3.5,20.12,.38,14.24,8.24,14.6,8.18,14.39,24.44-.09,7.1,3.71,11.23,8.41,15.24,12.51,10.67,26.94,17.78,42.7,21.94,38.88,10.26,77.66,10.06,115.42-4.42,11.31-4.33,21.33-12.17,31.67-18.82,5.27-3.39,7.7-8.7,6.88-15.19-1.34-10.7,2.19-17.99,12.86-22.48,7.8-3.29,14.95-6.25,22.38-.72,7.42,5.53,9.4,13.33,7.88,22.37-4.05,24.14-19.06,40.5-38.25,53.68-18.5,12.7-39.59,19.06-61.42,22.61-15.24,2.48-30.72,3.44-46.1,5.09Z"/>
</g>
</svg>
`
1 change: 1 addition & 0 deletions packages/core/src/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ export { default as caretIcon } from './caret.js'
export { default as warningIcon } from './warning.js'
export { default as successIcon } from './success.js'
export { default as pendingIcon } from './pending.js'
export { default as degenIcon } from './degen.js'
14 changes: 11 additions & 3 deletions packages/core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ import {
avalancheIcon,
harmonyOneIcon,
arbitrumIcon,
baseIcon
baseIcon,
degenIcon
} from './icons/index.js'

import type {
Expand Down Expand Up @@ -137,7 +138,8 @@ export const chainIdToLabel: Record<string, string> = {
'0x64': 'Gnosis',
'0x63564C40': 'Harmony One',
'0xa4b1': 'Arbitrum One',
'0xa4ba': 'Arbitrum Nova'
'0xa4ba': 'Arbitrum Nova',
'0x27bc86aa': 'Degen'
}

export const networkToChainId: Record<string, ChainId> = {
Expand All @@ -150,7 +152,9 @@ export const networkToChainId: Record<string, ChainId> = {
'bsc-main': '0x38',
'matic-main': '0x89',
'fantom-main': '0xfa',
'matic-mumbai': '0x80001'
'matic-mumbai': '0x80001',
'degen': '0x27bc86aa'

}

export const chainStyles: Record<string, ChainStyle> = {
Expand Down Expand Up @@ -233,6 +237,10 @@ export const chainStyles: Record<string, ChainStyle> = {
'0x80001': {
icon: polygonIcon,
color: '#8247E5'
},
'0x27bc86aa': {
icon: degenIcon,
color: '#a36dfe'
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@web3-onboard/blocto": "^2.0.1",
"@web3-onboard/capsule": "2.0.1",
"@web3-onboard/cede-store": "^2.2.0",
"@web3-onboard/core": "^2.21.4",
"@web3-onboard/core": "^2.21.5-alpha.1",
"@web3-onboard/coinbase": "^2.2.7",
"@web3-onboard/dcent": "^2.2.7",
"@web3-onboard/enkrypt": "^2.0.3",
Expand Down
Loading