Skip to content

Commit

Permalink
Merge branch 'changeset-release/main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromcunha committed May 17, 2024
2 parents fd47ffd + c70717d commit 7b990ad
Show file tree
Hide file tree
Showing 28 changed files with 354 additions and 91 deletions.
6 changes: 0 additions & 6 deletions .changeset/fair-needles-learn.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/many-games-dream.md

This file was deleted.

5 changes: 4 additions & 1 deletion demo/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ const WALLET_CONNECT_PROJECT_ID =
customChains.astarZkEVM,
customChains.apexPop,
customChains.apexPopTestnet,
customChains.degen
customChains.degen,
customChains.xai,
allChains.skaleNebula,
customChains.seiTestnet,
] as [
Chain,
...Chain[]
Expand Down
63 changes: 0 additions & 63 deletions demo/pages/hook/useSearchActivities.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions demo/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ const Index: NextPage = () => {
<Link href="/hook/tokenActivity">
useTokenActivity
</Link>
<Link href="/hook/useSearchActivities">
useSearchActivities
</Link>
<Link href="/hook/tokens">
useTokens
</Link>
Expand Down
9 changes: 9 additions & 0 deletions demo/utils/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,14 @@ export default [
},
{
...reservoirChains.degen
},
{
...reservoirChains.xai
},
{
...reservoirChains.nebula
},
{
...reservoirChains.seiTestnet
}
]
11 changes: 11 additions & 0 deletions packages/defender-relayer-adapter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @reservoir0x/defender-relayer-adapter

## 3.0.0

### Patch Changes

- Updated dependencies [bfb6f8f]
- Updated dependencies [d10c230]
- Updated dependencies [5534b08]
- Updated dependencies [25e8677]
- @reservoir0x/reservoir-sdk@2.2.0
- @reservoir0x/ethers-wallet-adapter@3.0.0

## 2.0.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/defender-relayer-adapter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reservoir0x/defender-relayer-adapter",
"version": "2.0.4",
"version": "3.0.0",
"description": "An adapter that intergrates OpenZeppelins defender relayer wallet to a Reservoir Wallet for use in the @reservoir0x/reservoir-sdk",
"exports": {
".": {
Expand Down
10 changes: 10 additions & 0 deletions packages/ethers-wallet-adapter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @reservoir0x/ethers-wallet-adapter

## 3.0.0

### Patch Changes

- Updated dependencies [bfb6f8f]
- Updated dependencies [d10c230]
- Updated dependencies [5534b08]
- Updated dependencies [25e8677]
- @reservoir0x/reservoir-sdk@2.2.0

## 2.0.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/ethers-wallet-adapter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reservoir0x/ethers-wallet-adapter",
"version": "2.0.4",
"version": "3.0.0",
"description": "An adapter used to convert an ethersjs signer to a Reservoir Wallet for use in the @reservoir0x/reservoir-sdk",
"exports": {
".": {
Expand Down
10 changes: 10 additions & 0 deletions packages/gelato-adapter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @reservoir0x/gelato-adapter

## 3.0.0

### Patch Changes

- Updated dependencies [bfb6f8f]
- Updated dependencies [d10c230]
- Updated dependencies [5534b08]
- Updated dependencies [25e8677]
- @reservoir0x/reservoir-sdk@2.2.0

## 2.0.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/gelato-adapter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reservoir0x/gelato-adapter",
"version": "2.0.4",
"version": "3.0.0",
"description": "An adapter used to enhance a ethers wallet adapter with the gelato SDK for use in the @reservoir0x/reservoir-sdk to enable gasless transactions",
"exports": {
".": {
Expand Down
12 changes: 12 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
## 1.12.15

## 2.2.0

### Minor Changes

- 25e8677: Replace bulk transfers api with transactions/synced/v2 api

### Patch Changes

- bfb6f8f: BidModal & ListModal: Include exchange fee in feesBps calculation
- d10c230: Adding Xai, Nebula, and Sei chains
- 5534b08: Removing degen currencies and adding nebula as a custom chain

## 2.1.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reservoir0x/reservoir-sdk",
"version": "2.1.4",
"version": "2.2.0",
"description": "An SDK that can be used in any javascript/typescript context to easily interact with Reservoir liquidity APIs",
"author": "Reservoir Protocol",
"license": "MIT",
Expand Down
75 changes: 75 additions & 0 deletions packages/sdk/src/utils/customChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,78 @@ export const degen = {
},
} as const satisfies Chain

export const xai = {
id: 660279,
name: 'Xai',
nativeCurrency: { name: 'Xai', symbol: 'XAI', decimals: 18 },
rpcUrls: {
default: {
http: ['https://xai-chain.net/rpc'],
},
public: {
http: ['https://xai-chain.net/rpc'],
},
},
blockExplorers: {
etherscan: {
name: 'Xai',
url: 'https://explorer.xai-chain.net',
},
default: {
name: 'Xai',
url: 'https://explorer.xai-chain.net',
},
},
} as const satisfies Chain

export const nebula = {
id: 1482601649,
name: 'Nebula',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: {
http: ['https://mainnet.skalenodes.com/v1/green-giddy-denebola'],
},
public: {
http: ['https://mainnet.skalenodes.com/v1/green-giddy-denebola'],
},
},
blockExplorers: {
etherscan: {
name: 'Nebula Gaming Hub Explorer',
url: 'https://green-giddy-denebola.explorer.mainnet.skalenodes.com',
},
default: {
name: 'Nebula Gaming Hub Explorer',
url: 'https://green-giddy-denebola.explorer.mainnet.skalenodes.com',
},
},
} as const satisfies Chain

export const seiTestnet = {
id: 713715,
name: 'Sei Testnet',
nativeCurrency: { name: 'Sei', symbol: 'SEI', decimals: 18 },
rpcUrls: {
default: {
http: ['https://evm-rpc-arctic-1.sei-apis.com'],
},
public: {
http: ['https://evm-rpc-arctic-1.sei-apis.com'],
},
},
blockExplorers: {
etherscan: {
name: 'Sei Testnet',
url: 'https://seistream.app',
},
default: {
name: 'Sei Testnet',
url: 'https://seistream.app',
},
},
} as const satisfies Chain

export const customChains = {
ancient8,
ancient8Testnet,
Expand All @@ -282,4 +354,7 @@ export const customChains = {
garnet,
redstone,
degen,
xai,
nebula,
seiTestnet,
} as const satisfies Record<string, Chain>
50 changes: 42 additions & 8 deletions packages/sdk/src/utils/paymentTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,17 +623,51 @@ export const chainPaymentTokensMap = {
name: 'DEGEN',
decimals: 18,
},
],

// Xai
660279: [
{
chainId: 8453,
address: '0x4ed4e862860bed51a9570b96d89af5e1b0efefed',
symbol: 'DEGEN',
name: 'Base DEGEN',
chainId: 660279,
address: zeroAddress,
symbol: 'XAI',
name: 'Xai',
decimals: 18,
},
{
chainId: 666666666,
address: '0xeb54dacb4c2ccb64f8074eceea33b5ebb38e5387',
symbol: 'WDEGEN',
name: 'WDEGEN',
chainId: 660279,
address: '0x3fb787101dc6be47cfe18aeee15404dcc842e6af',
symbol: 'WXAI',
name: 'WXAI',
decimals: 18,
},
],

// Nebula
1482601649: [
{
chainId: 1482601649,
address: '0xab01bad2c86e24d371a13ed6367bdca819589c5d',
symbol: 'ETH',
name: 'ETH',
decimals: 18,
},
],

// Sei Testnet
713715: [
{
chainId: 713715,
address: zeroAddress,
symbol: 'SEI',
name: 'SEI',
decimals: 18,
},
{
chainId: 713715,
address: '0x48a9b22b80f566e88f0f1dcc90ea15a8a3bae8a4',
symbol: 'WSEI',
name: 'WSEI',
decimals: 18,
},
],
Expand Down
27 changes: 27 additions & 0 deletions packages/sdk/src/utils/reservoirChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,30 @@ const degen = {
checkPollingInterval: 1000,
} satisfies ReservoirBaseChain

const xai = {
id: 660279,
name: 'Xai',
baseApiUrl: 'https://api-xai.reservoir.tools',
paymentTokens: chainPaymentTokensMap[660279],
checkPollingInterval: 1000,
} satisfies ReservoirBaseChain

const nebula = {
id: 1482601649,
name: 'Nebula',
baseApiUrl: 'https://api-nebula.reservoir.tools',
paymentTokens: chainPaymentTokensMap[1482601649],
checkPollingInterval: 1000,
} satisfies ReservoirBaseChain

const seiTestnet = {
id: 713715,
name: 'Sei Testnet',
baseApiUrl: 'https://api-sei-testnet.reservoir.tools',
paymentTokens: chainPaymentTokensMap[713715],
checkPollingInterval: 1000,
} satisfies ReservoirBaseChain

export const reservoirChains = {
mainnet,
polygon,
Expand Down Expand Up @@ -290,4 +314,7 @@ export const reservoirChains = {
redstone,
berachainTestnet,
degen,
xai,
nebula,
seiTestnet,
}
Loading

0 comments on commit 7b990ad

Please sign in to comment.