Skip to content
Verified contractPartial

Swap

Address0x5e92e50032d4c19e9e08d98ebd68f508aee8efeb
Balance

0 ETH

 

Transactions

381

 

Compiler

solc 0.5.17

 

Same code

1 more contract

 

Details

Compiler
solc 0.5.17+commit.d19bba13
Language
solidity
Optimization
No
EVM version
istanbul
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
12,605,859
Creation transaction
0x0894eb7d69…e5806c8bfb

Read5

  • CONVERSION_RATE_PER_MILLE(uint256) → (uint256)
  • NEW_TOKEN_ADDRESS() → (address)
  • OLD_TOKEN_ADDRESS(uint256) → (address)
  • OWNER() → (address)
  • checkResult(uint256,uint256) → (uint256)

Write2

  • doSwap(uint256,uint256)
  • drawToken(address,uint256,address)

Events1

  • TokenSwapped(address,address,uint256,uint256)

ABI as JSON

[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "owner",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "newTokenAddress",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "oldTokenAddress",
        "type": "address[]",
        "internalType": "address[]"
      },
      {
        "name": "conversionRatePerMille",
        "type": "uint256[]",
        "internalType": "uint256[]"
      }
    ],
    "payable": false,
    "stateMutability": "nonpayable"
  },
  {
    "name": "TokenSwapped",
    "type": "event",
    "inputs": [
      {
        "name": "requestor",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "inputToken",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "inputQuantity",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "outputQuantity",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "name": "CONVERSION_RATE_PER_MILLE",
    "type": "function",
    "inputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "payable": false,
    "constant": true,
    "stateMutability": "view"
  },
  {
    "name": "NEW_TOKEN_ADDRESS",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "payable": false,
    "constant": true,
    "stateMutability": "view"
  },
  {
    "name": "OLD_TOKEN_ADDRESS",
    "type": "function",
    "inputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "payable": false,
    "constant": true,
    "stateMutability": "view"
  },
  {
    "name": "OWNER",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "payable": false,
    "constant": true,
    "stateMutability": "view"
  },
  {
    "name": "checkResult",
    "type": "function",
    "inputs": [
      {
        "name": "oldTokenIndex",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "inputQuantity",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "payable": false,
    "constant": true,
    "stateMutability": "view"
  },
  {
    "name": "doSwap",
    "type": "function",
    "inputs": [
      {
        "name": "oldTokenIndex",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "inputQuantity",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "payable": false,
    "constant": false,
    "stateMutability": "nonpayable"
  },
  {
    "name": "drawToken",
    "type": "function",
    "inputs": [
      {
        "name": "token",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "quantity",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "to",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "payable": false,
    "constant": false,
    "stateMutability": "nonpayable"
  }
]

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.