Verified contractExactGPL-3.0-only
SwapOperator
Address0xcafead1b3a9b57fe2a59cd5d44de9bd54571b1bb
- Balance
0 ETH
- Transactions
951
- Compiler
solc 0.8.4
- Same code
Only this contract
Details
- Compiler
- solc 0.8.4+commit.c7e474f2
- Language
- solidity
- Optimization
- Yes, 200 runs
- License
- GPL-3.0-only
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 15,302,866
- Creation transaction
- 0x32960baff6…2fe51a0eb1
Read12
- ETH() → (address)
- MAX_LIQUIDITY_RATIO() → (uint256)
- MIN_TIME_BETWEEN_SWAPS() → (uint256)
- communityFundTransferExecuted() → (bool)
- enzymeFundValueCalculatorRouter() → (address)
- enzymeV4VaultProxyAddress() → (address)
- getSwapQuote(uint256,address,address) → (uint256)
- router() → (address)
- stETH() → (address)
- swapController() → (address)
- twapOracle() → (address)
- weth() → (address)
Write7
- recoverAsset(address,address)
- swapAssetForETH(address,uint256,uint256)
- swapETHForAsset(address,uint256,uint256)
- swapETHForEnzymeVaultShare(uint256,uint256)
- swapETHForStETH(uint256)
- swapEnzymeVaultShareForETH(uint256,uint256)
- transferToCommunityFund()
Events1
- Swapped(address,address,uint256,uint256)
ABI as JSON
[
{
"type": "constructor",
"inputs": [
{
"name": "_master",
"type": "address",
"internalType": "address payable"
},
{
"name": "_twapOracle",
"type": "address",
"internalType": "address"
},
{
"name": "_swapController",
"type": "address",
"internalType": "address"
},
{
"name": "_stETH",
"type": "address",
"internalType": "address"
},
{
"name": "_enzymeV4VaultProxyAddress",
"type": "address",
"internalType": "address"
},
{
"name": "_enzymeFundValueCalculatorRouter",
"type": "address",
"internalType": "contract IEnzymeFundValueCalculatorRouter"
},
{
"name": "_weth",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "nonpayable"
},
{
"name": "Swapped",
"type": "event",
"inputs": [
{
"name": "fromAsset",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "toAsset",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "amountIn",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "amountOut",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "ETH",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"name": "MAX_LIQUIDITY_RATIO",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "MIN_TIME_BETWEEN_SWAPS",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "communityFundTransferExecuted",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"name": "enzymeFundValueCalculatorRouter",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IEnzymeFundValueCalculatorRouter"
}
],
"stateMutability": "view"
},
{
"name": "enzymeV4VaultProxyAddress",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"name": "getSwapQuote",
"type": "function",
"inputs": [
{
"name": "tokenAmountIn",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "fromToken",
"type": "address",
"internalType": "contract IERC20"
},
{
"name": "toToken",
"type": "address",
"internalType": "contract IERC20"
}
],
"outputs": [
{
"name": "tokenAmountOut",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "recoverAsset",
"type": "function",
"inputs": [
{
"name": "assetAddress",
"type": "address",
"internalType": "address"
},
{
"name": "receiver",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "router",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IUniswapV2Router02"
}
],
"stateMutability": "view"
},
{
"name": "stETH",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"name": "swapAssetForETH",
"type": "function",
"inputs": [
{
"name": "fromTokenAddress",
"type": "address",
"internalType": "address"
},
{
"name": "amountIn",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amountOutMin",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "swapController",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"name": "swapETHForAsset",
"type": "function",
"inputs": [
{
"name": "toTokenAddress",
"type": "address",
"internalType": "address"
},
{
"name": "amountIn",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amountOutMin",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "swapETHForEnzymeVaultShare",
"type": "function",
"inputs": [
{
"name": "amountIn",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amountOutMin",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "swapETHForStETH",
"type": "function",
"inputs": [
{
"name": "amountIn",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "swapEnzymeVaultShareForETH",
"type": "function",
"inputs": [
{
"name": "amountIn",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amountOutMin",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "transferToCommunityFund",
"type": "function",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "twapOracle",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract ITwapOracle"
}
],
"stateMutability": "view"
},
{
"name": "weth",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IWETH"
}
],
"stateMutability": "view"
},
{
"type": "receive",
"stateMutability": "payable"
}
]Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.