mzhu25 1849b1bb9a
Update ExchangeProxySwapQuoteConsumer for MultiplexV2 (#282)
* Update ExchangeProxySwapQuoteConsumer for MultiplexV2

* Move TransformERC20FeatureContract instance into private readonly
2021-09-29 16:02:13 -07:00

225 lines
12 KiB
JSON

{
"schemaVersion": "2.0.0",
"contractName": "ITransformERC20Feature",
"compilerOutput": {
"abi": [
{
"anonymous": false,
"inputs": [{ "indexed": false, "internalType": "address", "name": "quoteSigner", "type": "address" }],
"name": "QuoteSignerUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "taker", "type": "address" },
{ "indexed": false, "internalType": "address", "name": "inputToken", "type": "address" },
{ "indexed": false, "internalType": "address", "name": "outputToken", "type": "address" },
{ "indexed": false, "internalType": "uint256", "name": "inputTokenAmount", "type": "uint256" },
{ "indexed": false, "internalType": "uint256", "name": "outputTokenAmount", "type": "uint256" }
],
"name": "TransformedERC20",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": false, "internalType": "address", "name": "transformerDeployer", "type": "address" }
],
"name": "TransformerDeployerUpdated",
"type": "event"
},
{
"inputs": [
{
"components": [
{ "internalType": "address payable", "name": "taker", "type": "address" },
{ "internalType": "contract IERC20TokenV06", "name": "inputToken", "type": "address" },
{ "internalType": "contract IERC20TokenV06", "name": "outputToken", "type": "address" },
{ "internalType": "uint256", "name": "inputTokenAmount", "type": "uint256" },
{ "internalType": "uint256", "name": "minOutputTokenAmount", "type": "uint256" },
{
"components": [
{ "internalType": "uint32", "name": "deploymentNonce", "type": "uint32" },
{ "internalType": "bytes", "name": "data", "type": "bytes" }
],
"internalType": "struct ITransformERC20Feature.Transformation[]",
"name": "transformations",
"type": "tuple[]"
},
{ "internalType": "bool", "name": "useSelfBalance", "type": "bool" },
{ "internalType": "address payable", "name": "recipient", "type": "address" }
],
"internalType": "struct ITransformERC20Feature.TransformERC20Args",
"name": "args",
"type": "tuple"
}
],
"name": "_transformERC20",
"outputs": [{ "internalType": "uint256", "name": "outputTokenAmount", "type": "uint256" }],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "createTransformWallet",
"outputs": [{ "internalType": "contract IFlashWallet", "name": "wallet", "type": "address" }],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getQuoteSigner",
"outputs": [{ "internalType": "address", "name": "signer", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTransformWallet",
"outputs": [{ "internalType": "contract IFlashWallet", "name": "wallet", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTransformerDeployer",
"outputs": [{ "internalType": "address", "name": "deployer", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "quoteSigner", "type": "address" }],
"name": "setQuoteSigner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "transformerDeployer", "type": "address" }],
"name": "setTransformerDeployer",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "contract IERC20TokenV06", "name": "inputToken", "type": "address" },
{ "internalType": "contract IERC20TokenV06", "name": "outputToken", "type": "address" },
{ "internalType": "uint256", "name": "inputTokenAmount", "type": "uint256" },
{ "internalType": "uint256", "name": "minOutputTokenAmount", "type": "uint256" },
{
"components": [
{ "internalType": "uint32", "name": "deploymentNonce", "type": "uint32" },
{ "internalType": "bytes", "name": "data", "type": "bytes" }
],
"internalType": "struct ITransformERC20Feature.Transformation[]",
"name": "transformations",
"type": "tuple[]"
}
],
"name": "transformERC20",
"outputs": [{ "internalType": "uint256", "name": "outputTokenAmount", "type": "uint256" }],
"stateMutability": "payable",
"type": "function"
}
],
"devdoc": {
"details": "Feature to composably transform between ERC20 tokens.",
"events": {
"QuoteSignerUpdated(address)": {
"details": "Raised when `setQuoteSigner()` is called.",
"params": { "quoteSigner": "The new quote signer." }
},
"TransformedERC20(address,address,address,uint256,uint256)": {
"details": "Raised upon a successful `transformERC20`.",
"params": {
"inputToken": "The token being provided by the taker. If `0xeee...`, ETH is implied and should be provided with the call.`",
"inputTokenAmount": "The amount of `inputToken` to take from the taker.",
"outputToken": "The token to be acquired by the taker. `0xeee...` implies ETH.",
"outputTokenAmount": "The amount of `outputToken` received by the taker.",
"taker": "The taker (caller) address."
}
},
"TransformerDeployerUpdated(address)": {
"details": "Raised when `setTransformerDeployer()` is called.",
"params": { "transformerDeployer": "The new deployer address." }
}
},
"kind": "dev",
"methods": {
"_transformERC20((address,address,address,uint256,uint256,(uint32,bytes)[],bool,address))": {
"details": "Internal version of `transformERC20()`. Only callable from within.",
"params": { "args": "A `TransformERC20Args` struct." },
"returns": { "outputTokenAmount": "The amount of `outputToken` received by the taker." }
},
"createTransformWallet()": {
"details": "Deploy a new flash wallet instance and replace the current one with it. Useful if we somehow break the current wallet instance. Only callable by the owner.",
"returns": { "wallet": "The new wallet instance." }
},
"getQuoteSigner()": {
"details": "Return the optional signer for `transformERC20()` calldata.",
"returns": { "signer": "The transform deployer address." }
},
"getTransformWallet()": {
"details": "Return the current wallet instance that will serve as the execution context for transformations.",
"returns": { "wallet": "The wallet instance." }
},
"getTransformerDeployer()": {
"details": "Return the allowed deployer for transformers.",
"returns": { "deployer": "The transform deployer address." }
},
"setQuoteSigner(address)": {
"details": "Replace the optional signer for `transformERC20()` calldata. Only callable by the owner.",
"params": { "quoteSigner": "The address of the new calldata signer." }
},
"setTransformerDeployer(address)": {
"details": "Replace the allowed deployer for transformers. Only callable by the owner.",
"params": {
"transformerDeployer": "The address of the new trusted deployer for transformers."
}
},
"transformERC20(address,address,uint256,uint256,(uint32,bytes)[])": {
"details": "Executes a series of transformations to convert an ERC20 `inputToken` to an ERC20 `outputToken`.",
"params": {
"inputToken": "The token being provided by the sender. If `0xeee...`, ETH is implied and should be provided with the call.`",
"inputTokenAmount": "The amount of `inputToken` to take from the sender.",
"minOutputTokenAmount": "The minimum amount of `outputToken` the sender must receive for the entire transformation to succeed.",
"outputToken": "The token to be acquired by the sender. `0xeee...` implies ETH.",
"transformations": "The transformations to execute on the token balance(s) in sequence."
},
"returns": { "outputTokenAmount": "The amount of `outputToken` received by the sender." }
}
},
"version": 1
},
"evm": { "bytecode": { "object": "0x" }, "deployedBytecode": { "immutableReferences": {}, "object": "0x" } }
},
"compiler": {
"name": "solc",
"version": "0.6.12+commit.27d51765",
"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",
"evm.methodIdentifiers"
]
}
},
"evmVersion": "istanbul"
}
},
"chains": {}
}