-
Notifications
You must be signed in to change notification settings - Fork 13
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 arbitrum #206
feat: add arbitrum #206
Changes from all commits
0de4df1
c6b1ba8
80adefa
99042dc
c106804
c17bf90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,11 +27,11 @@ | |
"prepare": "npm run build", | ||
"prepublishOnly": "npm test && npm run lint", | ||
"graphql:codegen": "graphql-codegen --config graphql-codegen.yml", | ||
"swagger:codegen": " openapi --input https://raw.githubusercontent.com/cowprotocol/services/v2.252.0/crates/orderbook/openapi.yml --output src/order-book/generated --exportServices false --exportCore false", | ||
"swagger:codegen": " openapi --input https://raw.githubusercontent.com/cowprotocol/services/varbitrum/crates/orderbook/openapi.yml --output src/order-book/generated --exportServices false --exportCore false", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we will need to remember to come back here, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not really, every backend release we need to update it, and this is the latest There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but i thought we do tagged versions. But anyways, fine, next version we change it |
||
"typechain:codegen": "typechain --target ethers-v5 --out-dir ./src/composable/generated './abi/*.json'" | ||
}, | ||
"dependencies": { | ||
"@cowprotocol/contracts": "^1.4.0", | ||
"@cowprotocol/contracts": "^1.6.0", | ||
"@ethersproject/abstract-signer": "^5.7.0", | ||
"@openzeppelin/merkle-tree": "^1.0.5", | ||
"cross-fetch": "^3.1.5", | ||
|
@@ -100,4 +100,4 @@ | |
"typescript", | ||
"subgraph" | ||
] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,6 @@ | |
export enum SupportedChainId { | ||
MAINNET = 1, | ||
GNOSIS_CHAIN = 100, | ||
ARBITRUM = 42161, | ||
SEPOLIA = 11155111, | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,16 @@ | ||
import 'cross-fetch/polyfill' | ||
import { RateLimiter } from 'limiter' | ||
import { SupportedChainId } from '../common/chains' | ||
import { | ||
ApiBaseUrls, | ||
ApiContext, | ||
CowEnv, | ||
DEFAULT_COW_API_CONTEXT, | ||
ENVS_LIST, | ||
PartialApiContext, | ||
RequestOptions, | ||
} from '../common/configs' | ||
import { CowError } from '../common/cow-error' | ||
import { | ||
Address, | ||
AppDataHash, | ||
|
@@ -15,21 +27,9 @@ import { | |
TransactionHash, | ||
UID, | ||
} from './generated' | ||
import { CowError } from '../common/cow-error' | ||
import { | ||
ApiBaseUrls, | ||
ApiContext, | ||
CowEnv, | ||
DEFAULT_COW_API_CONTEXT, | ||
ENVS_LIST, | ||
PartialApiContext, | ||
RequestOptions, | ||
} from '../common/configs' | ||
import { DEFAULT_BACKOFF_OPTIONS, DEFAULT_LIMITER_OPTIONS, FetchParams, OrderBookApiError, request } from './request' | ||
import { transformOrder } from './transformOrder' | ||
import { EnrichedOrder } from './types' | ||
import { SupportedChainId } from '../common/chains' | ||
import { RateLimiter } from 'limiter' | ||
import { DEFAULT_BACKOFF_OPTIONS, DEFAULT_LIMITER_OPTIONS, FetchParams, OrderBookApiError, request } from './request' | ||
|
||
/** | ||
* An object containing *production* environment base URLs for each supported `chainId`. | ||
|
@@ -38,6 +38,7 @@ import { DEFAULT_BACKOFF_OPTIONS, DEFAULT_LIMITER_OPTIONS, FetchParams, OrderBoo | |
export const ORDER_BOOK_PROD_CONFIG: ApiBaseUrls = { | ||
[SupportedChainId.MAINNET]: 'https://api.cow.fi/mainnet', | ||
[SupportedChainId.GNOSIS_CHAIN]: 'https://api.cow.fi/xdai', | ||
[SupportedChainId.ARBITRUM]: 'https://api.cow.fi/arbitrum_one', | ||
[SupportedChainId.SEPOLIA]: 'https://api.cow.fi/sepolia', | ||
} | ||
|
||
|
@@ -47,6 +48,7 @@ export const ORDER_BOOK_PROD_CONFIG: ApiBaseUrls = { | |
export const ORDER_BOOK_STAGING_CONFIG: ApiBaseUrls = { | ||
[SupportedChainId.MAINNET]: 'https://barn.api.cow.fi/mainnet', | ||
[SupportedChainId.GNOSIS_CHAIN]: 'https://barn.api.cow.fi/xdai', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. weren't these names changing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No changes yet afaict, just the proposal for a standardization. |
||
[SupportedChainId.ARBITRUM]: 'https://barn.api.cow.fi/arbitrum_one', | ||
[SupportedChainId.SEPOLIA]: 'https://barn.api.cow.fi/sepolia', | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As requested, your Highness.