Skip to content

Commit

Permalink
Merge branch 'feature/blast-chain-config' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromcunha committed Feb 29, 2024
2 parents 4ff5aa5 + f81717f commit d96ff18
Show file tree
Hide file tree
Showing 29 changed files with 438 additions and 33 deletions.
2 changes: 1 addition & 1 deletion demo/pages/modal/buy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const BuyPage: NextPage = () => {
feesOnTopBps={feesOnTopBps}
feesOnTopUsd={feesOnTopUsd}
normalizeRoyalties={normalizeRoyalties}
executionMethod={executionMethod}
executeBuyOptions={executionMethod ? { executionMethod } : undefined}
openState={hasDeeplink ? deeplinkOpenState : undefined}
onConnectWallet={() => {
openConnectModal?.()
Expand Down
11 changes: 10 additions & 1 deletion demo/utils/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,14 @@ export default [
},
{
...reservoirChains.frameTestnet
}
},
{
...reservoirChains.blastSepolia
},
{
...reservoirChains.apexPop
},
{
...reservoirChains.blast
},
]
9 changes: 9 additions & 0 deletions packages/defender-relayer-adapter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @reservoir0x/defender-relayer-adapter

## 1.0.2

### Patch Changes

- Updated dependencies [96bee20]
- Updated dependencies [c029a8e]
- @reservoir0x/reservoir-sdk@2.0.2
- @reservoir0x/ethers-wallet-adapter@1.0.2

## 1.0.1

### 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": "1.0.1",
"version": "1.0.2",
"description": "An adapter that intergrates OpenZeppelins defender relayer wallet to a Reservoir Wallet for use in the @reservoir0x/reservoir-sdk",
"exports": {
".": {
Expand Down
8 changes: 8 additions & 0 deletions packages/ethers-wallet-adapter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @reservoir0x/ethers-wallet-adapter

## 1.0.2

### Patch Changes

- Updated dependencies [96bee20]
- Updated dependencies [c029a8e]
- @reservoir0x/reservoir-sdk@2.0.2

## 1.0.1

### 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": "1.0.1",
"version": "1.0.2",
"description": "An adapter used to convert an ethersjs signer to a Reservoir Wallet for use in the @reservoir0x/reservoir-sdk",
"exports": {
".": {
Expand Down
8 changes: 8 additions & 0 deletions packages/gelato-adapter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @reservoir0x/gelato-adapter

## 1.0.2

### Patch Changes

- Updated dependencies [96bee20]
- Updated dependencies [c029a8e]
- @reservoir0x/reservoir-sdk@2.0.2

## 1.0.1

### 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": "1.0.1",
"version": "1.0.2",
"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
7 changes: 7 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## 1.12.15

## 2.0.2

### Patch Changes

- 96bee20: Add blast sepolia chain configuration
- c029a8e: Add apex proof of play chain configuration

## 2.0.1

### 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.0.1",
"version": "2.0.2",
"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 @@ -78,8 +78,83 @@ export const frameTestnet = {
},
} as const satisfies Chain

export const blastSepolia = {
id: 168587773,
name: 'Blast Sepolia',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: {
http: ['https://sepolia.blast.io'],
},
public: {
http: ['https://sepolia.blast.io'],
},
},
blockExplorers: {
etherscan: {
name: 'BlastScan Sepolia',
url: 'https://testnet.blastscan.io',
},
default: {
name: 'BlastScan Sepolia',
url: 'https://testnet.blastscan.io',
},
},
} as const satisfies Chain

export const apexPop = {
id: 70700,
name: 'Apex Proof of Play',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: {
http: ['http://rpc.apex.proofofplay.com'],
},
public: {
http: ['http://rpc.apex.proofofplay.com'],
},
},
blockExplorers: {
etherscan: {
name: 'Apex Pop Explorer',
url: 'https://explorer.apex.proofofplay.com',
},
default: {
name: 'Apex Pop Explorer',
url: 'https://explorer.apex.proofofplay.com',
},
},
}

export const blast = {
id: 81457,
name: 'Blast',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: {
http: ['https://rpc.blast.io'],
},
public: {
http: ['https://rpc.blast.io'],
},
},
blockExplorers: {
etherscan: {
name: 'Blastscan',
url: 'https://blastscan.io',
},
default: {
name: 'Blastscan',
url: 'https://blastscan.io',
},
},
}

export const customChains = {
ancient8,
ancient8Testnet,
frameTestnet,
blastSepolia,
apexPop,
blast,
} as const satisfies Record<string, Chain>
36 changes: 36 additions & 0 deletions packages/sdk/src/utils/paymentTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,4 +527,40 @@ export const chainPaymentTokensMap = {
decimals: 18,
},
],

//Apex PoP
70700: [
{
chainId: 70700,
address: zeroAddress,
symbol: 'ETH',
name: 'ETH',
decimals: 18,
},
{
chainId: 70700,
address: '0x77684A04145a5924eFCE0D92A7c4a2A2E8C359de',
symbol: 'WETH',
name: 'WETH',
decimals: 18,
},
],

//Blast
81457: [
{
chainId: 81457,
address: zeroAddress,
symbol: 'ETH',
name: 'ETH',
decimals: 18,
},
{
chainId: 81457,
address: '0x4200000000000000000000000000000000000023',
symbol: 'WETH',
name: 'WETH',
decimals: 18,
},
],
} as Record<number, PaymentToken[]>
26 changes: 26 additions & 0 deletions packages/sdk/src/utils/reservoirChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,29 @@ const frameTestnet = {
checkPollingInterval: 1000,
} satisfies ReservoirBaseChain

const blastSepolia = {
id: 168587773,
name: 'Blast Sepolia',
baseApiUrl: 'https://api-blast-sepolia.reservoir.tools',
paymentTokens: chainPaymentTokensMap[168587773],
checkPollingInterval: 1000,
}
const apexPop = {
id: 70700,
name: 'Apex Proof of Play',
baseApiUrl: 'https://api-apex.reservoir.tools',
paymentTokens: chainPaymentTokensMap[70700],
checkPollingInterval: 1000,
} satisfies ReservoirBaseChain

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

export const reservoirChains = {
mainnet,
goerli,
Expand All @@ -229,4 +252,7 @@ export const reservoirChains = {
ancient8,
ancient8Testnet,
frameTestnet,
blastSepolia,
apexPop,
blast,
}
14 changes: 14 additions & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
## 1.25.10

## 2.3.0

### Minor Changes

- b1a96d8: BuyModal: Remove usePermit and useExecutionMethod and replace with executeBuyOptions

### Patch Changes

- 96bee20: Add blast sepolia chain configuration
- c029a8e: Add apex proof of play chain configuration
- Updated dependencies [96bee20]
- Updated dependencies [c029a8e]
- @reservoir0x/reservoir-sdk@2.0.2

## 2.2.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@reservoir0x/reservoir-kit-ui",
"description": "ReservoirKit is the official frontend kit to get you started building dApps with the ReservoirProtocol.",
"version": "2.2.0",
"version": "2.3.0",
"author": "Reservoir Protocol",
"license": "MIT",
"exports": {
Expand Down
24 changes: 24 additions & 0 deletions packages/ui/src/constants/chainIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ import ZoraIconColor from '../img/chains/ZoraIconColor'
import FrameIconDark from '../img/chains/FrameIconDark'
import FrameIconLight from '../img/chains/FrameIconLight'
import FrameIconColor from '../img/chains/FrameIconColor'
import BlastSepoliaIconColor from '../img/chains/BlastSepoliaIconColor'
import BlastSepoliaIconLight from '../img/chains/BlastSepoliaIconLight'
import BlastSepoliaIconDark from '../img/chains/BlastSepoliaIconDark'
import ApexPopIconLight from '../img/chains/ApexPopIconLight'
import ApexPopIconDark from '../img/chains/ApexPopIconDark'
import ApexPopIconColor from '../img/chains/ApexPopIconColor'
import BlastIconColor from '../img/chains/BlastIconColor'
import BlastIconDark from '../img/chains/BlastIconDark'
import BlastIconLight from '../img/chains/BlastIconLight'

const chainIcons = {
[reservoirChains.ancient8.id]: {
Expand Down Expand Up @@ -163,6 +172,21 @@ const chainIcons = {
dark: <FrameIconLight />,
color: <FrameIconColor />,
},
[reservoirChains.blastSepolia.id]: {
light: <BlastSepoliaIconDark />,
dark: <BlastSepoliaIconLight />,
color: <BlastSepoliaIconColor />,
},
[reservoirChains.apexPop.id]: {
light: <ApexPopIconLight />,
dark: <ApexPopIconDark />,
color: <ApexPopIconColor />,
},
[reservoirChains.blast.id]: {
light: <BlastIconLight />,
dark: <BlastIconDark />,
color: <BlastIconColor />,
},
}

export default chainIcons
3 changes: 3 additions & 0 deletions packages/ui/src/constants/wrappedContractNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@ const wrappedContractNames: Record<number, string> = {
888888888: 'WETH', //ancient8
28122024: 'WETH', //ancient8 testnet
68840142: 'WETH', //frametestnet
168587773: 'WETH', //blast sepolia
70700: 'WETH', //apex pop
81457: 'WETH', //blast
}
export default wrappedContractNames
3 changes: 3 additions & 0 deletions packages/ui/src/constants/wrappedContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ const wrappedContracts: Record<number, string> = {
888888888: '0x4200000000000000000000000000000000000006', //ancient8
28122024: '0x4200000000000000000000000000000000000006', //ancient8testnet
68840142: '0x822b4c4713433c6b88547845850a39343bf0957e', //frametestnet
168587773: '0x4200000000000000000000000000000000000006', //blast sepolia
70700: '0x77684A04145a5924eFCE0D92A7c4a2A2E8C359de', //apex pop
81457: '0x4200000000000000000000000000000000000023', //blast
}

export default wrappedContracts
Loading

0 comments on commit d96ff18

Please sign in to comment.