Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

feat: Curve BTC Bridge #294

Merged
merged 2 commits into from
Jul 24, 2020
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
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,14 @@
"tslint": "^5.19.0",
"typescript": "^3.9.6"
},
"resolutions": {
"@0x/contract-addresses": "0xProject/gitpkg-registry#0x-contract-addresses-v4.11.0-9a16f5736",
"@0x/contract-artifacts": "0xProject/gitpkg-registry#0x-contract-artifacts-v3.7.1-9a16f5736",
"@0x/contract-wrappers": "0xProject/gitpkg-registry#0x-contract-wrappers-v13.8.0-9a16f5736"
},
"dependencies": {
"@0x/assert": "^3.0.4",
"@0x/asset-swapper": "0xProject/gitpkg-registry#0x-asset-swapper-v4.6.0-0f2d9d210",
"@0x/asset-swapper": "0xProject/gitpkg-registry#0x-asset-swapper-v4.6.0-9a16f5736",
"@0x/connect": "^6.0.4",
"@0x/contract-addresses": "^4.11.0",
"@0x/contract-wrappers": "^13.7.0",
Expand Down
5 changes: 3 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,16 @@ export const GAS_SCHEDULE_V0: FeeSchedule = {
[ERC20BridgeSource.Eth2Dai]: () => 5.5e5,
[ERC20BridgeSource.Kyber]: () => 8e5,
[ERC20BridgeSource.Curve]: fillData => {
switch ((fillData as CurveFillData).poolAddress.toLowerCase()) {
switch ((fillData as CurveFillData).curve.poolAddress.toLowerCase()) {
case '0xa2b47e3d5c44877cca798226b7b8118f9bfb7a56':
case '0x52ea46506b9cc5ef470c5bf89f17dc28bb35d85c':
return 9e5;
case '0x45f783cce6b7ff23b2ab2d70e416cdb7d6055f51':
case '0x79a8c46dea5ada233abaffd40f3a0a2b1e5a4f27':
return 10e5;
case '0xa5407eae9ba41422680e2e00537571bcc53efbfd':
case '0x93054188d876f558f4a66b2ef1d97d16edf0895b':
case '0x7fc77b5c7614e1533320ea6ddc2eb61fa00a9714':
return 6e5;
default:
throw new Error('Unrecognized Curve address');
Expand Down Expand Up @@ -369,7 +371,6 @@ export const SWAP_QUOTER_OPTS: Partial<SwapQuoterOpts> = {
rfqt: {
takerApiKeyWhitelist: RFQT_API_KEY_WHITELIST,
makerAssetOfferings: RFQT_MAKER_ASSET_OFFERINGS,
skipBuyRequests: RFQT_SKIP_BUY_REQUESTS,
},
ethGasStationUrl: ETH_GAS_STATION_API_URL,
permittedOrderFeeTypes: new Set([OrderPrunerPermittedFeeTypes.NoFees]),
Expand Down
1 change: 1 addition & 0 deletions test/test_env
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ META_TXN_RELAY_ADDRESS=0x9eFCa436873b55a0d6AEa260f92DE50150360dca
META_TXN_RELAY_PRIVATE_KEY=82b9c3b8d45f608badd8fda250a0d95088381540e850734519b659e1e1ac3e71
META_TXN_RATE_LIMITER_CONFIG='{"api_key":{"daily":{"allowedDailyLimit": 1}}}'
NODE_ENV=test
ETH_GAS_STATION_API_URL=https://ethgasstation.api.0x.org/api/ethgasAPI.json
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
lodash "^4.17.11"
valid-url "^1.0.9"

"@0x/asset-swapper@0xProject/gitpkg-registry#0x-asset-swapper-v4.6.0-0f2d9d210":
"@0x/asset-swapper@0xProject/gitpkg-registry#0x-asset-swapper-v4.6.0-9a16f5736":
version "4.6.0"
resolved "https://codeload.github.com/0xProject/gitpkg-registry/tar.gz/bfb580a5f31ff85a98eae3203eb5e38bd9a0f175"
resolved "https://codeload.github.com/0xProject/gitpkg-registry/tar.gz/3a630c5dc216a3d5eaa6b2789658a5f3eb5fd4dd"
dependencies:
"@0x/assert" "^3.0.9"
"@0x/contract-addresses" "^4.11.0"
Expand Down Expand Up @@ -85,17 +85,17 @@
uuid "^3.3.2"
websocket "^1.0.26"

"@0x/contract-addresses@^4.11.0":
"@0x/contract-addresses@0xProject/gitpkg-registry#0x-contract-addresses-v4.11.0-9a16f5736", "@0x/contract-addresses@^4.11.0":
version "4.11.0"
resolved "https://registry.yarnpkg.com/@0x/contract-addresses/-/contract-addresses-4.11.0.tgz#945aa81035bfc5605306c39c5f76656b204e01e2"
resolved "https://codeload.github.com/0xProject/gitpkg-registry/tar.gz/ac7f02c026aec51e0395c862b40cea0fc6937f88"

"@0x/contract-artifacts@^3.7.1":
"@0x/contract-artifacts@0xProject/gitpkg-registry#0x-contract-artifacts-v3.7.1-9a16f5736", "@0x/contract-artifacts@^3.7.1":
version "3.7.1"
resolved "https://registry.yarnpkg.com/@0x/contract-artifacts/-/contract-artifacts-3.7.1.tgz#368b6e229585c10e43478f6ea21e962a93db986b"
resolved "https://codeload.github.com/0xProject/gitpkg-registry/tar.gz/28e6aeaed435e2e1407b2ab5ee15152181bfdb9b"

"@0x/contract-wrappers@^13.7.0", "@0x/contract-wrappers@^13.8.0":
"@0x/contract-wrappers@0xProject/gitpkg-registry#0x-contract-wrappers-v13.8.0-9a16f5736", "@0x/contract-wrappers@^13.7.0", "@0x/contract-wrappers@^13.8.0":
version "13.8.0"
resolved "https://registry.yarnpkg.com/@0x/contract-wrappers/-/contract-wrappers-13.8.0.tgz#565c57354dd7b50c843babc56b18b7c997e701e0"
resolved "https://codeload.github.com/0xProject/gitpkg-registry/tar.gz/c1683a6ab3fa8ff4a2d924195c82647f026a3aba"
dependencies:
"@0x/assert" "^3.0.9"
"@0x/base-contract" "^6.2.3"
Expand Down