153 lines
8.3 KiB
JSON
Generated
153 lines
8.3 KiB
JSON
Generated
{
|
|
"schemaVersion": "2.0.0",
|
|
"contractName": "ITransformERC20",
|
|
"compilerOutput": {
|
|
"abi": [
|
|
{
|
|
"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"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{ "internalType": "bytes32", "name": "callDataHash", "type": "bytes32" },
|
|
{ "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": "contract IERC20Transformer", "name": "transformer", "type": "address" },
|
|
{ "internalType": "bytes", "name": "data", "type": "bytes" }
|
|
],
|
|
"internalType": "struct ITransformERC20.Transformation[]",
|
|
"name": "transformations",
|
|
"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": "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": "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": "contract IERC20Transformer", "name": "transformer", "type": "address" },
|
|
{ "internalType": "bytes", "name": "data", "type": "bytes" }
|
|
],
|
|
"internalType": "struct ITransformERC20.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.",
|
|
"methods": {
|
|
"_transformERC20(bytes32,address,address,address,uint256,uint256,(address,bytes)[])": {
|
|
"details": "Internal version of `transformERC20()`. Only callable from within.",
|
|
"params": {
|
|
"callDataHash": "Hash of the ingress calldata.",
|
|
"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.",
|
|
"minOutputTokenAmount": "The minimum amount of `outputToken` the taker must receive for the entire transformation to succeed.",
|
|
"outputToken": "The token to be acquired by the taker. `0xeee...` implies ETH.",
|
|
"taker": "The taker address.",
|
|
"transformations": "The transformations to execute on the token balance(s) in sequence."
|
|
},
|
|
"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. Anyone can call this.",
|
|
"returns": { "wallet": "The new wallet instance." }
|
|
},
|
|
"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." }
|
|
},
|
|
"transformERC20(address,address,uint256,uint256,(address,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." }
|
|
}
|
|
}
|
|
},
|
|
"evm": { "bytecode": { "object": "0x" }, "deployedBytecode": { "immutableReferences": {}, "object": "0x" } }
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.6.8+commit.0bbfe453",
|
|
"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": "istanbul"
|
|
}
|
|
},
|
|
"chains": {}
|
|
}
|