Skip to content
Verified contractExactMIT

Router

Address0x1cc22db69aa3b4f05098f1acee6cbdfd65ca03ea
Balance

0 ETH

 

Transactions

8

 

Compiler

solc 0.8.20

 

Same code

1 more contract

 

Details

Compiler
solc 0.8.20+commit.a1b79de6
Language
solidity
Optimization
No
EVM version
shanghai
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
23,299,996
Creation transaction
0x87c4d16033…7ee3bd6745

Read10

  • antfarmToken() → (address)
  • estimateETHForExactTokens(address,uint16,uint256) → (uint256)
  • estimateExactETHForTokens(address,uint16,uint256) → (uint256)
  • estimateExactTokensForETH(address,uint16,uint256) → (uint256)
  • factory() → (address)
  • getDeposit(address) → (uint256)
  • oraclePair() → (address)
  • totalDeposits() → (uint256)
  • userDeposits(address) → (uint256)
  • weth() → (address)

Write5

  • depositATF(uint256)
  • swapETHForExactTokens(address,uint16,address,uint256,uint256) → (uint256)
  • swapExactETHForTokens(address,uint16,address,uint256,uint256) → (uint256)
  • swapExactTokensForETH(address,uint16,address,uint256,uint256,uint256) → (uint256)
  • withdrawATF(uint256)

Events1

  • SwapExecuted(address,address,address,uint256,uint256)

Errors11

  • Router__AddressZero()
  • Router__ETHTransferFailed()
  • Router__Expired()
  • Router__IdenticalAddresses()
  • Router__InsufficientATFBalance()
  • Router__InsufficientBalance()
  • Router__InsufficientInputAmount()
  • Router__InsufficientLiquidity()
  • Router__InsufficientOutputAmount()
  • Router__TransferFailed()
  • Router__ZeroAmount()

ABI as JSON

[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "_factory",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_weth",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "Router__AddressZero",
    "type": "error",
    "inputs": []
  },
  {
    "name": "Router__ETHTransferFailed",
    "type": "error",
    "inputs": []
  },
  {
    "name": "Router__Expired",
    "type": "error",
    "inputs": []
  },
  {
    "name": "Router__IdenticalAddresses",
    "type": "error",
    "inputs": []
  },
  {
    "name": "Router__InsufficientATFBalance",
    "type": "error",
    "inputs": []
  },
  {
    "name": "Router__InsufficientBalance",
    "type": "error",
    "inputs": []
  },
  {
    "name": "Router__InsufficientInputAmount",
    "type": "error",
    "inputs": []
  },
  {
    "name": "Router__InsufficientLiquidity",
    "type": "error",
    "inputs": []
  },
  {
    "name": "Router__InsufficientOutputAmount",
    "type": "error",
    "inputs": []
  },
  {
    "name": "Router__TransferFailed",
    "type": "error",
    "inputs": []
  },
  {
    "name": "Router__ZeroAmount",
    "type": "error",
    "inputs": []
  },
  {
    "name": "SwapExecuted",
    "type": "event",
    "inputs": [
      {
        "name": "sender",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "tokenIn",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "tokenOut",
        "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": "antfarmToken",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "depositATF",
    "type": "function",
    "inputs": [
      {
        "name": "amount",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "estimateETHForExactTokens",
    "type": "function",
    "inputs": [
      {
        "name": "_output",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_fee",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "_amountOut",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "estimatedIn",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "estimateExactETHForTokens",
    "type": "function",
    "inputs": [
      {
        "name": "_output",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_fee",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "_amountIn",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "estimatedOut",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "estimateExactTokensForETH",
    "type": "function",
    "inputs": [
      {
        "name": "_input",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_fee",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "_amountIn",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "estimatedOut",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "factory",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "getDeposit",
    "type": "function",
    "inputs": [
      {
        "name": "user",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "oraclePair",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "swapETHForExactTokens",
    "type": "function",
    "inputs": [
      {
        "name": "_output",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_fee",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "_to",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_deadline",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "_amountOut",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "_amountIn",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "payable"
  },
  {
    "name": "swapExactETHForTokens",
    "type": "function",
    "inputs": [
      {
        "name": "_output",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_fee",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "_to",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_deadline",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "_amountOutMin",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "_amountOut",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "payable"
  },
  {
    "name": "swapExactTokensForETH",
    "type": "function",
    "inputs": [
      {
        "name": "_input",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_fee",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "_to",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_deadline",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "_amountIn",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "_amountOutMin",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "_amountOut",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "totalDeposits",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "userDeposits",
    "type": "function",
    "inputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "weth",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "withdrawATF",
    "type": "function",
    "inputs": [
      {
        "name": "amount",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "receive",
    "stateMutability": "payable"
  }
]

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.