* `@0x/asset-swapper`: Add ERC20Bridge aggregator library. * `@0x/asset-swapper`: Finish off `aggregate.ts`. * `@0x/types`: Add `OrderWithoutDomain` type. * `@0x/asset-swapper`: Add testing infra for sampler/aggregator. * `@0x/types`: Add `SignedOrderWithoutDomain` type. * `@0x/asset-swapper`: Update aggregator to take and return orders with signatures. * `@0x/asset-swapper`: Fix broken aggregator tests. * `@0x/asset-swapper`: Pass the sampler contract into aggregator entry points. * `@0x/contract-artifacts`: Add `IERC20BridgeSampler` artifact. * `@0x/contract-wrappers`: Add `IERC20BridgeSampler` wrapper. * `@0x/asset-swapper`: Address review comments. * fixed testing * refactored aggregate.ts and embeded into asset-swapper * added adjusted rates for taker and maker fees * remove PrunedSignedOrders * updated contract-addresses and addressed some other todos * streamlined logic * patched in lawrences changes * renamed aggregator utils and removed market_utils.ts * added ack heartbeats * fixed bug * patches * added dummy order things * Dummy with valid sig * Tweak gas price calculation to wei * added test coverage and fixed bugs * fixed migrations * Fix CHANGELOGs and types export * Deploy latest ERC20BridgeSampler on Mainnet * `@0x/types` Revert CHANGELOG. * `@0x/asset-swapper`: Address review comments. `@0x/contract-addresses`: Make kyber lowercase. * made protocol fee multiplier async * `@0x/asset-swapper: Fix build errors and do some code cleanup. * use assetDataUtils where possible
269 lines
17 KiB
JSON
Generated
269 lines
17 KiB
JSON
Generated
{
|
|
"schemaVersion": "2.0.0",
|
|
"contractName": "IERC20BridgeSampler",
|
|
"compilerOutput": {
|
|
"abi": [
|
|
{
|
|
"constant": true,
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{ "internalType": "address", "name": "makerAddress", "type": "address" },
|
|
{ "internalType": "address", "name": "takerAddress", "type": "address" },
|
|
{ "internalType": "address", "name": "feeRecipientAddress", "type": "address" },
|
|
{ "internalType": "address", "name": "senderAddress", "type": "address" },
|
|
{ "internalType": "uint256", "name": "makerAssetAmount", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "takerAssetAmount", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "makerFee", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "takerFee", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "expirationTimeSeconds", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "salt", "type": "uint256" },
|
|
{ "internalType": "bytes", "name": "makerAssetData", "type": "bytes" },
|
|
{ "internalType": "bytes", "name": "takerAssetData", "type": "bytes" },
|
|
{ "internalType": "bytes", "name": "makerFeeAssetData", "type": "bytes" },
|
|
{ "internalType": "bytes", "name": "takerFeeAssetData", "type": "bytes" }
|
|
],
|
|
"internalType": "struct LibOrder.Order[]",
|
|
"name": "orders",
|
|
"type": "tuple[]"
|
|
},
|
|
{ "internalType": "bytes[]", "name": "orderSignatures", "type": "bytes[]" }
|
|
],
|
|
"name": "getOrderFillableMakerAssetAmounts",
|
|
"outputs": [
|
|
{ "internalType": "uint256[]", "name": "orderFillableMakerAssetAmounts", "type": "uint256[]" }
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{ "internalType": "address", "name": "makerAddress", "type": "address" },
|
|
{ "internalType": "address", "name": "takerAddress", "type": "address" },
|
|
{ "internalType": "address", "name": "feeRecipientAddress", "type": "address" },
|
|
{ "internalType": "address", "name": "senderAddress", "type": "address" },
|
|
{ "internalType": "uint256", "name": "makerAssetAmount", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "takerAssetAmount", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "makerFee", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "takerFee", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "expirationTimeSeconds", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "salt", "type": "uint256" },
|
|
{ "internalType": "bytes", "name": "makerAssetData", "type": "bytes" },
|
|
{ "internalType": "bytes", "name": "takerAssetData", "type": "bytes" },
|
|
{ "internalType": "bytes", "name": "makerFeeAssetData", "type": "bytes" },
|
|
{ "internalType": "bytes", "name": "takerFeeAssetData", "type": "bytes" }
|
|
],
|
|
"internalType": "struct LibOrder.Order[]",
|
|
"name": "orders",
|
|
"type": "tuple[]"
|
|
},
|
|
{ "internalType": "bytes[]", "name": "orderSignatures", "type": "bytes[]" }
|
|
],
|
|
"name": "getOrderFillableTakerAssetAmounts",
|
|
"outputs": [
|
|
{ "internalType": "uint256[]", "name": "orderFillableTakerAssetAmounts", "type": "uint256[]" }
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{ "internalType": "address", "name": "makerAddress", "type": "address" },
|
|
{ "internalType": "address", "name": "takerAddress", "type": "address" },
|
|
{ "internalType": "address", "name": "feeRecipientAddress", "type": "address" },
|
|
{ "internalType": "address", "name": "senderAddress", "type": "address" },
|
|
{ "internalType": "uint256", "name": "makerAssetAmount", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "takerAssetAmount", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "makerFee", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "takerFee", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "expirationTimeSeconds", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "salt", "type": "uint256" },
|
|
{ "internalType": "bytes", "name": "makerAssetData", "type": "bytes" },
|
|
{ "internalType": "bytes", "name": "takerAssetData", "type": "bytes" },
|
|
{ "internalType": "bytes", "name": "makerFeeAssetData", "type": "bytes" },
|
|
{ "internalType": "bytes", "name": "takerFeeAssetData", "type": "bytes" }
|
|
],
|
|
"internalType": "struct LibOrder.Order[]",
|
|
"name": "orders",
|
|
"type": "tuple[]"
|
|
},
|
|
{ "internalType": "bytes[]", "name": "orderSignatures", "type": "bytes[]" },
|
|
{ "internalType": "address[]", "name": "sources", "type": "address[]" },
|
|
{ "internalType": "uint256[]", "name": "makerTokenAmounts", "type": "uint256[]" }
|
|
],
|
|
"name": "queryOrdersAndSampleBuys",
|
|
"outputs": [
|
|
{ "internalType": "uint256[]", "name": "orderFillableMakerAssetAmounts", "type": "uint256[]" },
|
|
{ "internalType": "uint256[][]", "name": "makerTokenAmountsBySource", "type": "uint256[][]" }
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{ "internalType": "address", "name": "makerAddress", "type": "address" },
|
|
{ "internalType": "address", "name": "takerAddress", "type": "address" },
|
|
{ "internalType": "address", "name": "feeRecipientAddress", "type": "address" },
|
|
{ "internalType": "address", "name": "senderAddress", "type": "address" },
|
|
{ "internalType": "uint256", "name": "makerAssetAmount", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "takerAssetAmount", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "makerFee", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "takerFee", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "expirationTimeSeconds", "type": "uint256" },
|
|
{ "internalType": "uint256", "name": "salt", "type": "uint256" },
|
|
{ "internalType": "bytes", "name": "makerAssetData", "type": "bytes" },
|
|
{ "internalType": "bytes", "name": "takerAssetData", "type": "bytes" },
|
|
{ "internalType": "bytes", "name": "makerFeeAssetData", "type": "bytes" },
|
|
{ "internalType": "bytes", "name": "takerFeeAssetData", "type": "bytes" }
|
|
],
|
|
"internalType": "struct LibOrder.Order[]",
|
|
"name": "orders",
|
|
"type": "tuple[]"
|
|
},
|
|
{ "internalType": "bytes[]", "name": "orderSignatures", "type": "bytes[]" },
|
|
{ "internalType": "address[]", "name": "sources", "type": "address[]" },
|
|
{ "internalType": "uint256[]", "name": "takerTokenAmounts", "type": "uint256[]" }
|
|
],
|
|
"name": "queryOrdersAndSampleSells",
|
|
"outputs": [
|
|
{ "internalType": "uint256[]", "name": "orderFillableTakerAssetAmounts", "type": "uint256[]" },
|
|
{ "internalType": "uint256[][]", "name": "makerTokenAmountsBySource", "type": "uint256[][]" }
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [
|
|
{ "internalType": "address[]", "name": "sources", "type": "address[]" },
|
|
{ "internalType": "address", "name": "takerToken", "type": "address" },
|
|
{ "internalType": "address", "name": "makerToken", "type": "address" },
|
|
{ "internalType": "uint256[]", "name": "makerTokenAmounts", "type": "uint256[]" }
|
|
],
|
|
"name": "sampleBuys",
|
|
"outputs": [
|
|
{ "internalType": "uint256[][]", "name": "takerTokenAmountsBySource", "type": "uint256[][]" }
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"inputs": [
|
|
{ "internalType": "address[]", "name": "sources", "type": "address[]" },
|
|
{ "internalType": "address", "name": "takerToken", "type": "address" },
|
|
{ "internalType": "address", "name": "makerToken", "type": "address" },
|
|
{ "internalType": "uint256[]", "name": "takerTokenAmounts", "type": "uint256[]" }
|
|
],
|
|
"name": "sampleSells",
|
|
"outputs": [
|
|
{ "internalType": "uint256[][]", "name": "makerTokenAmountsBySource", "type": "uint256[][]" }
|
|
],
|
|
"payable": false,
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"methods": {
|
|
"getOrderFillableMakerAssetAmounts((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],bytes[])": {
|
|
"details": "Queries the fillable maker asset amounts of native orders.",
|
|
"params": {
|
|
"orderSignatures": "Signatures for each respective order in `orders`.",
|
|
"orders": "Native orders to query."
|
|
},
|
|
"return": "orderFillableMakerAssetAmounts How much maker asset can be filled by each order in `orders`."
|
|
},
|
|
"getOrderFillableTakerAssetAmounts((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],bytes[])": {
|
|
"details": "Queries the fillable taker asset amounts of native orders.",
|
|
"params": {
|
|
"orderSignatures": "Signatures for each respective order in `orders`.",
|
|
"orders": "Native orders to query."
|
|
},
|
|
"return": "orderFillableTakerAssetAmounts How much taker asset can be filled by each order in `orders`."
|
|
},
|
|
"queryOrdersAndSampleBuys((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],bytes[],address[],uint256[])": {
|
|
"details": "Query native orders and sample buy quotes on multiple DEXes at once.",
|
|
"params": {
|
|
"makerTokenAmounts": "Maker token buy amount for each sample.",
|
|
"orderSignatures": "Signatures for each respective order in `orders`.",
|
|
"orders": "Native orders to query.",
|
|
"sources": "Address of each DEX. Passing in an unsupported DEX will throw."
|
|
},
|
|
"return": "orderFillableMakerAssetAmounts How much maker asset can be filled by each order in `orders`.takerTokenAmountsBySource Taker amounts sold for each source at each maker token amount. First indexed by source index, then sample index."
|
|
},
|
|
"queryOrdersAndSampleSells((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[],bytes[],address[],uint256[])": {
|
|
"details": "Query native orders and sample sell quotes on multiple DEXes at once.",
|
|
"params": {
|
|
"orderSignatures": "Signatures for each respective order in `orders`.",
|
|
"orders": "Native orders to query.",
|
|
"sources": "Address of each DEX. Passing in an unsupported DEX will throw.",
|
|
"takerTokenAmounts": "Taker token sell amount for each sample."
|
|
},
|
|
"return": "orderFillableTakerAssetAmounts How much taker asset can be filled by each order in `orders`.makerTokenAmountsBySource Maker amounts bought for each source at each taker token amount. First indexed by source index, then sample index."
|
|
},
|
|
"sampleBuys(address[],address,address,uint256[])": {
|
|
"details": "Query native orders and sample buy quotes on multiple DEXes at once.",
|
|
"params": {
|
|
"makerToken": "Address of the maker token (what to buy).",
|
|
"makerTokenAmounts": "Maker token buy amount for each sample.",
|
|
"sources": "Address of each DEX. Passing in an unsupported DEX will throw.",
|
|
"takerToken": "Address of the taker token (what to sell)."
|
|
},
|
|
"return": "takerTokenAmountsBySource Taker amounts sold for each source at each maker token amount. First indexed by source index, then sample index."
|
|
},
|
|
"sampleSells(address[],address,address,uint256[])": {
|
|
"details": "Sample sell quotes on multiple DEXes at once.",
|
|
"params": {
|
|
"makerToken": "Address of the maker token (what to buy).",
|
|
"sources": "Address of each DEX. Passing in an unsupported DEX will throw.",
|
|
"takerToken": "Address of the taker token (what to sell).",
|
|
"takerTokenAmounts": "Taker token sell amount for each sample."
|
|
},
|
|
"return": "makerTokenAmountsBySource Maker amounts bought for each source at each taker token amount. First indexed by source index, then sample index."
|
|
}
|
|
}
|
|
},
|
|
"evm": { "bytecode": { "object": "0x" }, "deployedBytecode": { "object": "0x" } }
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "soljson-v0.5.13+commit.5b0b510c.js",
|
|
"settings": {
|
|
"optimizer": {
|
|
"enabled": true,
|
|
"runs": 1000000,
|
|
"details": { "yul": true, "deduplicate": true, "cse": true, "constantOptimizer": true }
|
|
},
|
|
"outputSelection": {
|
|
"*": {
|
|
"*": [
|
|
"abi",
|
|
"devdoc",
|
|
"evm.bytecode.object",
|
|
"evm.bytecode.sourceMap",
|
|
"evm.deployedBytecode.object",
|
|
"evm.deployedBytecode.sourceMap"
|
|
]
|
|
}
|
|
},
|
|
"evmVersion": "constantinople"
|
|
}
|
|
},
|
|
"chains": {}
|
|
}
|