-
Notifications
You must be signed in to change notification settings - Fork 41
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
intercept and mock e2e swaps calls #1754
Open
greg-schrammel
wants to merge
28
commits into
master
Choose a base branch
from
greg-mock-swap-e2e
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 19 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
db0810f
prevent useSwapSlippage from making unnecessary requests
greg-schrammel 9164172
test
greg-schrammel 1cd7b09
response
greg-schrammel 2119c2d
popular in rainbow
greg-schrammel a5e1c8f
dad can you come pick me up im scared
greg-schrammel 8624638
Merge branch 'master' into greg-mock-swap-e2e
BrodyHughes 1752d7f
yarn setup ran lol
BrodyHughes 5efb232
hmm
BrodyHughes becb035
fix test 1, test test 2
BrodyHughes 06942ad
logging
BrodyHughes 52efb0b
skip test
BrodyHughes 37d9f68
okay
BrodyHughes 5675d1a
audit fix
BrodyHughes 74e8084
yarn install
BrodyHughes e9d33be
fix send
BrodyHughes 1c3e162
reenable retries
BrodyHughes 37d7bfc
add all mocks, fix unit tests by making them use hardhat now
BrodyHughes 64d38ff
rm retry:0
BrodyHughes 4030edf
clean up
BrodyHughes 235db69
check vlock number add new hashed responses
BrodyHughes 0de1dfa
Merge branch 'master' into greg-mock-swap-e2e
BrodyHughes 25d7ebd
tweak script and get new responses + yarn install
BrodyHughes 924befc
okay point the script at the anvil instance instead of our prod key
BrodyHughes aff68a2
undo the removal of chainIds from testIds (#1779)
BrodyHughes c3a70cc
Merge branch 'master' into greg-mock-swap-e2e
BrodyHughes 6995691
bad merge oops
BrodyHughes d988f48
Merge branch 'master' into greg-mock-swap-e2e
BrodyHughes 60196a9
failOnError: false
BrodyHughes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { writeFile } from 'fs/promises'; | ||
|
||
import { Hex, createClient, http, sha256 } from 'viem'; | ||
import { getBlockNumber } from 'viem/actions'; | ||
|
||
import urls from './mocks/mock_swap_quotes_urls.json'; | ||
|
||
const client = createClient({ transport: http(process.env.ETH_MAINNET_RPC) }); | ||
const blockNumber = await getBlockNumber(client); | ||
console.log(blockNumber); | ||
|
||
await Promise.all( | ||
urls.map(async (url) => { | ||
const res = await fetch(url).then((r) => r.text()); | ||
const hash = sha256(url as Hex); | ||
writeFile(`./mocks/swap_quotes/${hash}.json`, res); | ||
}), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Hex, sha256 } from 'viem'; | ||
|
||
export function mockFetch() { | ||
const nativeFetch = window.fetch; | ||
window.fetch = async function mockedFetch( | ||
input: RequestInfo | URL, | ||
init?: RequestInit, | ||
) { | ||
if (input instanceof Request || !URL.canParse(input)) | ||
return nativeFetch(input, init); | ||
|
||
const url = new URL(input); | ||
|
||
if (url.hostname === 'swap.p.rainbow.me') { | ||
console.log('Intercepting swap request:', { | ||
url: url.href, | ||
params: Object.fromEntries(url.searchParams), | ||
}); | ||
|
||
const hash = sha256(url.href as Hex); | ||
console.log('Looking for mock file with hash:', hash); | ||
|
||
const response = await import(`./mocks/swap_quotes/${hash}.json`); | ||
console.log('Mock response:', response); | ||
|
||
if (!response) | ||
throw new Error('no response for request', { | ||
cause: { url: url.href, hash }, | ||
}); | ||
|
||
return new Response(JSON.stringify(response), { | ||
headers: { 'Content-Type': 'application/json' }, | ||
}); | ||
} | ||
|
||
return nativeFetch(input, init); | ||
}; | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...mocks/swap_quotes/0x038dce7884e70b272cd1e2451c7ac6c7acead26c6fbd4593ac6840211a966072.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"error":true,"error_code":504,"message":"no routes found"} |
1 change: 1 addition & 0 deletions
1
...mocks/swap_quotes/0x05b313c513342f25909168d9f4116a1473a0e7b4d661ef5f420cf46fd919813b.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"data":{"slippagePercent":2}} |
1 change: 1 addition & 0 deletions
1
...mocks/swap_quotes/0x075d7d1eefb1fad7a225af737745bc9a5a099d33eacbce33d15ff5419eccd0fc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"sellTokenAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","sellTokenAsset":{"assetCode":"eth","decimals":18,"iconUrl":"https://rainbowme-res.cloudinary.com/image/upload/v1668565116/assets/ethereum/eth.png","name":"Ethereum","network":"mainnet","symbol":"ETH","networks":{"1":{"address":"eth","decimals":18},"10":{"address":"0x0000000000000000000000000000000000000000","decimals":18},"42161":{"address":"0x0000000000000000000000000000000000000000","decimals":18},"56":{"address":"0x2170ed0880ac9a755fd29b2688956bd959f933f8","decimals":18},"7777777":{"address":"0x0000000000000000000000000000000000000000","decimals":18},"81457":{"address":"0x0000000000000000000000000000000000000000","decimals":18},"8453":{"address":"0x0000000000000000000000000000000000000000","decimals":18}},"chainId":1,"price":{"value":3357.03,"available":true},"totalPrice":{"value":335703002.05425966,"available":true}},"buyTokenAddress":"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599","buyTokenAsset":{"assetCode":"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599","decimals":8,"iconUrl":"https://rainbowme-res.cloudinary.com/image/upload/v1693266228/assets/ethereum/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599.png","name":"Wrapped Bitcoin","network":"mainnet","symbol":"WBTC","networks":{"1":{"address":"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599","decimals":8},"10":{"address":"0x68f180fcce6836688e9084f035309e29bf0a2095","decimals":8},"137":{"address":"0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6","decimals":8},"42161":{"address":"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f","decimals":8},"43114":{"address":"0x50b7545627a5162f82a992c33b87adc75187b218","decimals":8},"81457":{"address":"0xf7bc58b8d8f97adc129cfc4c9f45ce3c0e1d2692","decimals":8}},"chainId":1,"price":{"value":97610.82041142,"available":true},"totalPrice":{"value":74614655.9073813,"available":true}},"allowanceTarget":"0x00000000009726632680fb29d3f7a9734e3010e2","allowanceNeeded":false,"to":"0x111111125421ca6dc452d289314280a0f8842a65","data":"0x07ed23790000000000000000000000003451b6b219478037a1ac572706627fc2bda1e812000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000003451b6b219478037a1ac572706627fc2bda1e81200000000000000000000000000000000009726632680fb29d3f7a9734e3010e20000000000000000000000000000000000000000000014feeeab6899a69b0be7000000000000000000000000000000000000000000000000000000119eaca3960000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000015140000000000000000000000000000000000000014f60014c800147e00146400a0c9e75c4800000000000000080101000000000000000000000000000000000000000000001436000ce0000a2d00a007e5c0d2000000000000000000000000000000000000000a0900065d0006430002e600a0c9e75c48000000000000140f0e010000000000000000000000000000000000000002b80001ff0001460000b900a007e5c0d200000000000000000000000000000000000000000000000000009500001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db00c20c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260a26d69263ef43e9a68964ba141263f19d71d516ae4071118002dc6c060a26d69263ef43e9a68964ba141263f19d71d51000000000000000000000000000000000000000000001154991657e59a8df94ac02aaa39b223fe8d0a0e5c4f27ead9083c756cc200a007e5c0d200000000000000000000000000000000000000000000000000006900001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db002a0000000000000000000000000000000000000000000061724d70dc10d8bc8fea3ee63c1e500c2e9f25be6257c210d7adf0d4cd6e3e881ba25f8c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200a007e5c0d200000000000000000000000000000000000000000000000000009500001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db00c20c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2c3d03e4f041fd4cd388c549ee2a29a9e5075882f6ae4071118002dc6c0c3d03e4f041fd4cd388c549ee2a29a9e5075882f00000000000000000000000000000000000000000002c7d006b2483535a625acc02aaa39b223fe8d0a0e5c4f27ead9083c756cc200a007e5c0d200000000000000000000000000000000000000000000000000009500001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db00c20c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb116ae4071118002dc6c0a478c2975ab1ea89e8196811f51a7b7ade33eb1100000000000000000000000000000000000000000003d389655ab32657a45dacc02aaa39b223fe8d0a0e5c4f27ead9083c756cc200a0c9e75c480000000000280303020200000000000000000000000000000000032f00027f0002300001600000b05100a5407eae9ba41422680e2e00537571bcc53efbfd6b175474e89094c44da98b954eedeac495271d0f00443df021240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008f8930dab95100debf20617708857ebe4f679508e7b7863a8a8eee6b175474e89094c44da98b954eedeac495271d0f0044a6417ed60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008f829a8b4c51001116898dda4015ed8ddefb84b6e8bc24528af2d86b175474e89094c44da98b954eedeac495271d0f004491695586000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d745838d1b0000000000000000000000000000000000000000000000000000000067460fcb02a0000000000000000000000000000000000000000000000000000000d75c0de349ee63c1e50148da0965ab2d2cbf1c17c09cfb5cbe67ad5b14066b175474e89094c44da98b954eedeac495271d0f5120bebc44782c7db0a1a60cb6fe97d0b483032ff1c76b175474e89094c44da98b954eedeac495271d0f00443df0212400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b3638ee229f0020d6bdbf78dac17f958d2ee523a2206206994597c13d831ec700a0c9e75c480000000000002b04020100000000000000000000000000000000000000037e00032f0002e00000d0510080466c64868e1ab14a1ddf27a676c3fcbe638fe5dac17f958d2ee523a2206206994597c13d831ec70044394747c5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000534ccfe00000000000000000000000000000000000000000000000000000000000000005100111111125421ca6dc452d289314280a0f8842a65dac17f958d2ee523a2206206994597c13d831ec70124cc713a0467a3d8d6a23deb25c18a0bea32c2bcb1691fc7d2088e48bf35eb45168a2f450c000000000000000000000000807cf9a772d5a3f9cefbc1192e939d62f0d9bd3800000000000000000000000000000000000000000000000000000000000000000000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000025d7ebdc00000000000000000000000000000000000000000000000000000090f734291700000000000000000000000000000189c200673f78780000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412325686ff7f61caae26617f994768a3c204f2fcbc5d7317fba79d41d151c1db74b399f93a48f48dba89a85804e3d46e5e94dc0386c88b9d30eb240c224ebbb901c0000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000423f470fee63c1e50056534741cd8b152df6d48adf7ac51f75169a83b2dac17f958d2ee523a2206206994597c13d831ec702a000000000000000000000000000000000000000000000000000000002a7ec1f5eee63c1e5009db9e0e53058c89e5b94e29621a205198648425bdac17f958d2ee523a2206206994597c13d831ec700a007e5c0d200000000000000000000000000000000000000000000000000028f00019f00a0c9e75c48000000000000000100310000000000000000000000000000000000000000000001710000f60000dc4160eef417e1d5cc832e619ae18d2f140de2999dd4fb0044d3a4acd3000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000001f573d6fb3f13d689ff844b4ce37794d79a7ff1c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000991d867a1c3dc40eda065000000000000000000000000000000000000000000000000000000006740c9cb0000000000000000000000003451b6b219478037a1ac572706627fc2bda1e8124041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db00c20c02aaa39b223fe8d0a0e5c4f27ead9083c756cc23fd4cf9303c4bc9e13772618828712c8eac7dd2f6ae4071118002dc6c03fd4cf9303c4bc9e13772618828712c8eac7dd2f0000000000000000000000000000000000000000000010fb75fbdfc0a112d24fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc25120eef417e1d5cc832e619ae18d2f140de2999dd4fb1f573d6fb3f13d689ff844b4ce37794d79a7ff1c0044d3a4acd30000000000000000000000001f573d6fb3f13d689ff844b4ce37794d79a7ff1c0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a2021b40000000000000000000000000000000000000000000000000000000006740c9cb0000000000000000000000003451b6b219478037a1ac572706627fc2bda1e81200a0c9e75c480014090505050202010100000000072800066f0005b600052900041b00030d0002800001720000b900a007e5c0d200000000000000000000000000000000000000000000000000009500001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db00c20c02aaa39b223fe8d0a0e5c4f27ead9083c756cc24ab6702b3ed3877e9b1f203f90cbef13d663b0e86ae4071118002625a04ab6702b3ed3877e9b1f203f90cbef13d663b0e80000000000000000000000000000000000000000000000000000000012d21df8c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200a007e5c0d200000000000000000000000000000000000000000000000000009500001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db00c20c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2eacadc656c9394fb09af25aebc0897fdffe484a16ae4071118002dc6c0eacadc656c9394fb09af25aebc0897fdffe484a1000000000000000000000000000000000000000000000000000000002bcec6ffc02aaa39b223fe8d0a0e5c4f27ead9083c756cc200a007e5c0d20000000000000000000000000000000000000000000000000000ea00001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db051007f86bf177dd4f3494b841a37e810a34dd56c829bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc20044394747c500000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000aa89b1c0000000000000000000000000000000000000000000000000000000000000000000a007e5c0d200000000000000000000000000000000000000000000000000006900001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db002a0000000000000000000000000000000000000000000000000000000026599223dee63c1e5004585fe77225b41b697c938b018e2ac67ac5a20c0c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200a007e5c0d20000000000000000000000000000000000000000000000000000ea00001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db05100d51a44d3fae010294c616388b506acda1bfaae46c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20044394747c50000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000143b18ddd000000000000000000000000000000000000000000000000000000000000000000a007e5c0d20000000000000000000000000000000000000000000000000000ea00001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db05100f5f5b97624542d72a9e06f04804bf81baa15e2b4c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20044394747c5000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015886b798000000000000000000000000000000000000000000000000000000000000000000a007e5c0d200000000000000000000000000000000000000000000000000006900001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db002a00000000000000000000000000000000000000000000000000000000328cbaa84ee63c1e500cbcdf9626bc03e24f779434178a73a0b4bad62edc02aaa39b223fe8d0a0e5c4f27ead9083c756cc200a007e5c0d200000000000000000000000000000000000000000000000000009500001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db00c20c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2bb2b8038a1640196fbe3e38816f3e67cba72d9406ae4071118002dc6c0bb2b8038a1640196fbe3e38816f3e67cba72d940000000000000000000000000000000000000000000000000000000018c4283a9c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200a007e5c0d200000000000000000000000000000000000000000000000000009500001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db00c20c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2ceff51756c56ceffca006cd410b03ffc46dd3a586ae4071118002dc6c0ceff51756c56ceffca006cd410b03ffc46dd3a580000000000000000000000000000000000000000000000000000000347c9464bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc20020d6bdbf782260fac5e5542a773aa44fbcfedf7c193bc2c59900a0f2fa6b662260fac5e5542a773aa44fbcfedf7c193bc2c59900000000000000000000000000000000000000000000000000000011cc3c9ae6000000000000000000000000000013f280a06c4eca272260fac5e5542a773aa44fbcfedf7c193bc2c599111111125421ca6dc452d289314280a0f8842a65000000000000000000000000d6f29312","sellAmount":"100000000611927694623603","sellAmountMinusFees":"99150000606726309219303","sellAmountDisplay":"100000000611927694623603","sellAmountInEth":"100031586114971118100480","buyAmount":"76440967910","buyAmountMinusFees":"76440967910","buyAmountDisplay":"76440967910","buyAmountDisplayMinimum":"75676558231","buyAmountInEth":"22233409687029768005632","tradeAmountUSD":335703002.05425966,"tradeFeeAmountUSD":2853475.517461207,"value":"100000000611927694623603","gasPrice":"28397551754","source":"1inch","protocols":[{"name":"ETHEREUM_PANCAKESWAP_V2","part":0.6666666667},{"name":"SUSHI","part":16.66666667},{"name":"UNISWAP_V2","part":10.77777778},{"name":"CURVE_V2","part":3.555555556},{"name":"CURVE_V2_TRICRYPTO_NG","part":4.666666667},{"name":"DEFISWAP","part":0.2222222222},{"name":"SYNAPSE","part":0.6666666667},{"name":"PMM15","part":0.4444444444},{"name":"ETH_BANCOR_V3","part":33},{"name":"UNISWAP_V3","part":18.88888889},{"name":"CURVE","part":9.777777778},{"name":"VERSE","part":0.6666666667}],"feeTokenAsset":{"assetCode":"eth","decimals":18,"iconUrl":"https://rainbowme-res.cloudinary.com/image/upload/v1668565116/assets/ethereum/eth.png","name":"Ethereum","network":"mainnet","symbol":"ETH","networks":{"1":{"address":"eth","decimals":18},"10":{"address":"0x0000000000000000000000000000000000000000","decimals":18},"42161":{"address":"0x0000000000000000000000000000000000000000","decimals":18},"56":{"address":"0x2170ed0880ac9a755fd29b2688956bd959f933f8","decimals":18},"7777777":{"address":"0x0000000000000000000000000000000000000000","decimals":18},"81457":{"address":"0x0000000000000000000000000000000000000000","decimals":18},"8453":{"address":"0x0000000000000000000000000000000000000000","decimals":18}},"chainId":1,"price":{"value":3357.03,"available":true},"totalPrice":{"value":2853475.517461207,"available":true}},"fee":"850000005201385404300","feeInEth":"850268481977254503872","feePercentageBasisPoints":"8500000000000000","tradeType":"exact_input","from":"0xa0Ee7A142d267C1f36714E4a8F75612F20a79720","defaultGasLimit":"350000","swapType":"normal","txTarget":"0x00000000009726632680fb29d3f7a9734e3010e2","chainId":1} |
1 change: 1 addition & 0 deletions
1
...mocks/swap_quotes/0x07feb3d58cf9bbbcc846d008e73c739e2a1a737497781513fe28049fc588da14.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"data":{"slippagePercent":2}} |
1 change: 1 addition & 0 deletions
1
...mocks/swap_quotes/0x08c6cc57e3fba32a3b2caea0dd4303370f9b4a58c389da6e30cfb5b32b70770b.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"data":{"slippagePercent":2}} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
intercepts requests to
swap.p.rainbow.me
and responds with our mocked responses