ETH Price: $2,538.36 (-18.13%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Perform Switch136146752021-11-14 15:07:221176 days ago1636902442IN
0x8Af65674...B96E12951
0 ETH0.0130262106.25831946
Perform Switch135057162021-10-28 12:22:561193 days ago1635423776IN
0x8Af65674...B96E12951
0 ETH0.01421371115.9337721
Perform Switch135050502021-10-28 9:58:461193 days ago1635415126IN
0x8Af65674...B96E12951
0 ETH0.01508248123.01991348
Perform Switch135005442021-10-27 16:48:051194 days ago1635353285IN
0x8Af65674...B96E12951
0 ETH0.01951378159.19485523
Perform Switch134935032021-10-26 14:23:341195 days ago1635258214IN
0x8Af65674...B96E12951
0 ETH0.01625173127.61068264
Perform Switch134929252021-10-26 12:11:211195 days ago1635250281IN
0x8Af65674...B96E12951
0 ETH0.0100034981.60122955
Perform Switch134926472021-10-26 11:11:251195 days ago1635246685IN
0x8Af65674...B96E12951
0 ETH0.0079873365.1484743
Perform Switch134920802021-10-26 9:05:211195 days ago1635239121IN
0x8Af65674...B96E12951
0 ETH0.0109341189.18386098
Perform Switch134915562021-10-26 7:09:581195 days ago1635232198IN
0x8Af65674...B96E12951
0 ETH0.0081961566.85825148
Perform Switch134794142021-10-24 9:35:511197 days ago1635068151IN
0x8Af65674...B96E12951
0 ETH0.0047597638.82289241
Perform Switch134792592021-10-24 9:00:561197 days ago1635066056IN
0x8Af65674...B96E12951
0 ETH0.0046393843.98435795
Perform Switch134764322021-10-23 22:12:351198 days ago1635027155IN
0x8Af65674...B96E12951
0 ETH0.0117023595.45927541
Perform Switch134759242021-10-23 20:19:031198 days ago1635020343IN
0x8Af65674...B96E12951
0 ETH0.008581370
Perform Switch134726852021-10-23 8:23:441198 days ago1634977424IN
0x8Af65674...B96E12951
0 ETH0.0059498648.53468736
Perform Switch134720352021-10-23 5:48:251199 days ago1634968105IN
0x8Af65674...B96E12951
0 ETH0.0049923847.33108481
Perform Switch134696242021-10-22 20:41:471199 days ago1634935307IN
0x8Af65674...B96E12951
0 ETH0.0084021768.55224761
Perform Switch134614472021-10-21 14:05:271200 days ago1634825127IN
0x8Af65674...B96E12951
0 ETH0.0114335293.26634391
Perform Switch134609232021-10-21 12:08:511200 days ago1634818131IN
0x8Af65674...B96E12951
0 ETH0.0084750169.14652427
Perform Switch134598582021-10-21 8:12:031200 days ago1634803923IN
0x8Af65674...B96E12951
0 ETH0.007426560.56818527
Perform Switch134576222021-10-20 23:55:511201 days ago1634774151IN
0x8Af65674...B96E12951
0 ETH0.0088286983.69220094
Perform Switch134570802021-10-20 21:52:361201 days ago1634766756IN
0x8Af65674...B96E12951
0 ETH0.0079465664.81594943
Perform Switch134569872021-10-20 21:33:371201 days ago1634765617IN
0x8Af65674...B96E12951
0 ETH0.0081546277.28479959
Perform Switch134569872021-10-20 21:33:371201 days ago1634765617IN
0x8Af65674...B96E12951
0 ETH0.0094743477.28479959
Perform Switch134562352021-10-20 18:33:001201 days ago1634754780IN
0x8Af65674...B96E12951
0 ETH0.0095117677.5900247
Perform Switch134553882021-10-20 15:22:211201 days ago1634743341IN
0x8Af65674...B96E12951
0 ETH0.01512685123.39388302
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AleToschiSwitch

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2021-08-19
*/

// File: node_modules\@openzeppelin\contracts\utils\introspection\IERC165.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// File: @openzeppelin\contracts\token\ERC1155\IERC1155.sol

// SPDX_License_Identifier: MIT

pragma solidity ^0.8.0;


/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

// File: @openzeppelin\contracts\token\ERC20\IERC20.sol

// SPDX_License_Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: contracts\AleToschiSwitch.sol

//SPDX_License_Identifier: MIT
pragma solidity >=0.7.0;



interface IVotingToken is IERC20 {
    function burn(uint256 amount) external;
}

interface AleToschiSwitchPriceDumper {
    function pricePerETH(address) external view returns(uint256);
}

contract AleToschiSwitch {

    address private creator = msg.sender;

    address private switchPriceDumper;
    address private destinationTokenAddress;
    address[] private tokenAddresses;
    uint256[] private conversionsPerToken;
    uint256 private totalSupply;
    uint256 private snapshotBlock;
    uint256 private startBlock;

    constructor(address _switchPriceDumper, address _destinationTokenAddress, address[] memory _tokenAddresses, uint256 _totalSupply, uint256 _snapshotBlock, uint256 _startBlock) {
        switchPriceDumper = _switchPriceDumper;
        destinationTokenAddress = _destinationTokenAddress;
        tokenAddresses = _tokenAddresses;
        totalSupply = _totalSupply;
        snapshotBlock = _snapshotBlock;
        startBlock = _startBlock;
    }

    function info() external view returns(address, address, address[] memory, uint256[] memory, uint256, uint256, uint256) {
        return (switchPriceDumper, destinationTokenAddress, tokenAddresses, conversionsPerToken, totalSupply, snapshotBlock, startBlock);
    }

    function snapshot() external {
        require(block.number >= snapshotBlock, "too early");
        require(conversionsPerToken.length == 0, "already done");
        require(msg.sender == creator, "only creator");
        uint256[] memory tokenMarketCaps = new uint256[](tokenAddresses.length);
        uint256[] memory tokenTotalSupplies = new uint256[](tokenAddresses.length);
        uint256 cumulativeMarketCap = 0;
        for(uint256 i = 0; i < tokenAddresses.length; i++) {
            uint256 tokenPrice = AleToschiSwitchPriceDumper(switchPriceDumper).pricePerETH(tokenAddresses[i]);
            uint256 tokenTotalSupply = IERC20(tokenAddresses[i]).totalSupply();
            uint256 tokenMarketCap = tokenPrice * tokenTotalSupply;
            tokenTotalSupplies[i] = tokenTotalSupply;
            tokenMarketCaps[i] = tokenMarketCap;
            cumulativeMarketCap += tokenMarketCap;
        }
        for(uint256 i = 0; i < tokenAddresses.length; i++) {
            uint256 tokenRatio = (tokenMarketCaps[i] * 1e18) / cumulativeMarketCap;
            uint256 tokenNumerator = tokenRatio * totalSupply;
            uint256 conversionPerToken = tokenNumerator / tokenTotalSupplies[i];
            conversionsPerToken.push(conversionPerToken);
        }
    }

    modifier preConditionCheck(uint256 tokenAddressIndex, uint256 amount) {
        require(block.number >= startBlock, "too early");
        require(conversionsPerToken.length > 0, "snapshot");
        require(tokenAddressIndex < tokenAddresses.length, "unsupported");
        require(amount > 0, "amount");
        _;
    }

    function performSwitch(uint256 tokenAddressIndex, uint256 amount, address receiverInput) external preConditionCheck(tokenAddressIndex, amount) {
        address tokenAddress = tokenAddresses[tokenAddressIndex];
        IVotingToken token = IVotingToken(tokenAddress);
        token.transferFrom(msg.sender, address(this), amount);
        token.burn(amount);
        uint256 value = calculateAmount(tokenAddressIndex, amount);
        address receiver = receiverInput == address(0) ? msg.sender : receiverInput;
        IERC20(destinationTokenAddress).transfer(receiver, value);
    }

    function calculateAmount(uint256 tokenAddressIndex, uint256 amount) public preConditionCheck(tokenAddressIndex, amount) view returns(uint256) {
        return (conversionsPerToken[tokenAddressIndex] * amount) / 1e18;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_switchPriceDumper","type":"address"},{"internalType":"address","name":"_destinationTokenAddress","type":"address"},{"internalType":"address[]","name":"_tokenAddresses","type":"address[]"},{"internalType":"uint256","name":"_totalSupply","type":"uint256"},{"internalType":"uint256","name":"_snapshotBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"tokenAddressIndex","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"calculateAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"info","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAddressIndex","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"receiverInput","type":"address"}],"name":"performSwitch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"snapshot","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600080546001600160a01b031916331790553480156200002357600080fd5b5060405162000e4f38038062000e4f833981016040819052620000469162000140565b600180546001600160a01b038089166001600160a01b031992831617909255600280549288169290911691909117905583516200008b906003906020870190620000a2565b506005929092556006556007555062000273915050565b828054828255906000526020600020908101928215620000fa579160200282015b82811115620000fa57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620000c3565b50620001089291506200010c565b5090565b5b808211156200010857600081556001016200010d565b80516001600160a01b03811681146200013b57600080fd5b919050565b60008060008060008060c087890312156200015a57600080fd5b620001658762000123565b955060206200017681890162000123565b60408901519096506001600160401b03808211156200019457600080fd5b818a0191508a601f830112620001a957600080fd5b815181811115620001be57620001be6200025d565b8060051b604051601f19603f83011681018181108582111715620001e657620001e66200025d565b604052828152858101935084860182860187018f10156200020657600080fd5b600095505b8386101562000234576200021f8162000123565b8552600195909501949386019386016200020b565b50809950505050505050606087015192506080870151915060a087015190509295509295509295565b634e487b7160e01b600052604160045260246000fd5b610bcc80620002836000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80632ed3509e14610051578063370158ea146100665780639711715a1461008a578063cbcd558214610092575b600080fd5b61006461005f3660046109b3565b6100b3565b005b61006e610355565b6040516100819796959493929190610a33565b60405180910390f35b61006461045e565b6100a56100a0366004610991565b610832565b604051908152602001610081565b82826007544310156100e05760405162461bcd60e51b81526004016100d790610abd565b60405180910390fd5b60045461011a5760405162461bcd60e51b81526020600482015260086024820152671cdb985c1cda1bdd60c21b60448201526064016100d7565b60035482106101595760405162461bcd60e51b815260206004820152600b60248201526a1d5b9cdd5c1c1bdc9d195960aa1b60448201526064016100d7565b600081116101925760405162461bcd60e51b8152602060048201526006602482015265185b5bdd5b9d60d21b60448201526064016100d7565b6000600386815481106101a7576101a7610b6a565b6000918252602090912001546040516323b872dd60e01b8152336004820152306024820152604481018790526001600160a01b039091169150819081906323b872dd90606401602060405180830381600087803b15801561020757600080fd5b505af115801561021b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023f919061094f565b50604051630852cd8d60e31b8152600481018790526001600160a01b038216906342966c6890602401600060405180830381600087803b15801561028257600080fd5b505af1158015610296573d6000803e3d6000fd5b5050505060006102a68888610832565b905060006001600160a01b038716156102bf57866102c1565b335b60025460405163a9059cbb60e01b81526001600160a01b0380841660048301526024820186905292935091169063a9059cbb90604401602060405180830381600087803b15801561031157600080fd5b505af1158015610325573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610349919061094f565b50505050505050505050565b6000806060806000806000600160009054906101000a90046001600160a01b0316600260009054906101000a90046001600160a01b031660036004600554600654600754848054806020026020016040519081016040528092919081815260200182805480156103ee57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116103d0575b505050505094508380548060200260200160405190810160405280929190818152602001828054801561044057602002820191906000526020600020905b81548152602001906001019080831161042c575b50505050509350965096509650965096509650965090919293949596565b6006544310156104805760405162461bcd60e51b81526004016100d790610abd565b600454156104bf5760405162461bcd60e51b815260206004820152600c60248201526b616c726561647920646f6e6560a01b60448201526064016100d7565b6000546001600160a01b031633146105085760405162461bcd60e51b815260206004820152600c60248201526b37b7363c9031b932b0ba37b960a11b60448201526064016100d7565b60035460009067ffffffffffffffff81111561052657610526610b80565b60405190808252806020026020018201604052801561054f578160200160208202803683370190505b5060035490915060009067ffffffffffffffff81111561057157610571610b80565b60405190808252806020026020018201604052801561059a578160200160208202803683370190505b5090506000805b60035481101561075f57600154600380546000926001600160a01b03169163cf6ca28991859081106105d5576105d5610b6a565b60009182526020909120015460405160e083901b6001600160e01b03191681526001600160a01b03909116600482015260240160206040518083038186803b15801561062057600080fd5b505afa158015610634573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106589190610978565b905060006003838154811061066f5761066f610b6a565b60009182526020918290200154604080516318160ddd60e01b815290516001600160a01b03909216926318160ddd92600480840193829003018186803b1580156106b857600080fd5b505afa1580156106cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f09190610978565b905060006106fe8284610b1a565b90508186858151811061071357610713610b6a565b6020026020010181815250508087858151811061073257610732610b6a565b60209081029190910101526107478186610ae0565b9450505050808061075790610b39565b9150506105a1565b5060005b60035481101561082c5760008285838151811061078257610782610b6a565b6020026020010151670de0b6b3a764000061079d9190610b1a565b6107a79190610af8565b90506000600554826107b99190610b1a565b905060008584815181106107cf576107cf610b6a565b6020026020010151826107e29190610af8565b600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b015550829150610824905081610b39565b915050610763565b50505050565b600082826007544310156108585760405162461bcd60e51b81526004016100d790610abd565b6004546108925760405162461bcd60e51b81526020600482015260086024820152671cdb985c1cda1bdd60c21b60448201526064016100d7565b60035482106108d15760405162461bcd60e51b815260206004820152600b60248201526a1d5b9cdd5c1c1bdc9d195960aa1b60448201526064016100d7565b6000811161090a5760405162461bcd60e51b8152602060048201526006602482015265185b5bdd5b9d60d21b60448201526064016100d7565b670de0b6b3a7640000846004878154811061092757610927610b6a565b906000526020600020015461093c9190610b1a565b6109469190610af8565b95945050505050565b60006020828403121561096157600080fd5b8151801515811461097157600080fd5b9392505050565b60006020828403121561098a57600080fd5b5051919050565b600080604083850312156109a457600080fd5b50508035926020909101359150565b6000806000606084860312156109c857600080fd5b833592506020840135915060408401356001600160a01b03811681146109ed57600080fd5b809150509250925092565b600081518084526020808501945080840160005b83811015610a2857815187529582019590820190600101610a0c565b509495945050505050565b600060e0820160018060a01b03808b1684526020818b168186015260e06040860152828a5180855261010087019150828c01945060005b81811015610a88578551851683529483019491830191600101610a6a565b50508581036060870152610a9c818b6109f8565b60808701999099525050505060a082019390935260c0015250949350505050565b602080825260099082015268746f6f206561726c7960b81b604082015260600190565b60008219821115610af357610af3610b54565b500190565b600082610b1557634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615610b3457610b34610b54565b500290565b6000600019821415610b4d57610b4d610b54565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220ab897ea9ad45b655d52f2d9d868b3d294486868c0efbfa80da5cb7d895ac7ed964736f6c6343000806003300000000000000000000000028a681943f15114a44aeed2e4534b7f05d3bed14000000000000000000000000fdb29741f239a2406ae287913ef12415160378d300000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000d3c21bcecceda10000000000000000000000000000000000000000000000000000000000000000c7091b0000000000000000000000000000000000000000000000000000000000c7364300000000000000000000000000000000000000000000000000000000000000030000000000000000000000007b123f53421b1bf8533339bfbdc7c98aa94163db00000000000000000000000034612903db071e888a4dadcaa416d3ee263a87b90000000000000000000000009e78b8274e1d6a76a0dbbf90418894df27cbceb5

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80632ed3509e14610051578063370158ea146100665780639711715a1461008a578063cbcd558214610092575b600080fd5b61006461005f3660046109b3565b6100b3565b005b61006e610355565b6040516100819796959493929190610a33565b60405180910390f35b61006461045e565b6100a56100a0366004610991565b610832565b604051908152602001610081565b82826007544310156100e05760405162461bcd60e51b81526004016100d790610abd565b60405180910390fd5b60045461011a5760405162461bcd60e51b81526020600482015260086024820152671cdb985c1cda1bdd60c21b60448201526064016100d7565b60035482106101595760405162461bcd60e51b815260206004820152600b60248201526a1d5b9cdd5c1c1bdc9d195960aa1b60448201526064016100d7565b600081116101925760405162461bcd60e51b8152602060048201526006602482015265185b5bdd5b9d60d21b60448201526064016100d7565b6000600386815481106101a7576101a7610b6a565b6000918252602090912001546040516323b872dd60e01b8152336004820152306024820152604481018790526001600160a01b039091169150819081906323b872dd90606401602060405180830381600087803b15801561020757600080fd5b505af115801561021b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023f919061094f565b50604051630852cd8d60e31b8152600481018790526001600160a01b038216906342966c6890602401600060405180830381600087803b15801561028257600080fd5b505af1158015610296573d6000803e3d6000fd5b5050505060006102a68888610832565b905060006001600160a01b038716156102bf57866102c1565b335b60025460405163a9059cbb60e01b81526001600160a01b0380841660048301526024820186905292935091169063a9059cbb90604401602060405180830381600087803b15801561031157600080fd5b505af1158015610325573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610349919061094f565b50505050505050505050565b6000806060806000806000600160009054906101000a90046001600160a01b0316600260009054906101000a90046001600160a01b031660036004600554600654600754848054806020026020016040519081016040528092919081815260200182805480156103ee57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116103d0575b505050505094508380548060200260200160405190810160405280929190818152602001828054801561044057602002820191906000526020600020905b81548152602001906001019080831161042c575b50505050509350965096509650965096509650965090919293949596565b6006544310156104805760405162461bcd60e51b81526004016100d790610abd565b600454156104bf5760405162461bcd60e51b815260206004820152600c60248201526b616c726561647920646f6e6560a01b60448201526064016100d7565b6000546001600160a01b031633146105085760405162461bcd60e51b815260206004820152600c60248201526b37b7363c9031b932b0ba37b960a11b60448201526064016100d7565b60035460009067ffffffffffffffff81111561052657610526610b80565b60405190808252806020026020018201604052801561054f578160200160208202803683370190505b5060035490915060009067ffffffffffffffff81111561057157610571610b80565b60405190808252806020026020018201604052801561059a578160200160208202803683370190505b5090506000805b60035481101561075f57600154600380546000926001600160a01b03169163cf6ca28991859081106105d5576105d5610b6a565b60009182526020909120015460405160e083901b6001600160e01b03191681526001600160a01b03909116600482015260240160206040518083038186803b15801561062057600080fd5b505afa158015610634573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106589190610978565b905060006003838154811061066f5761066f610b6a565b60009182526020918290200154604080516318160ddd60e01b815290516001600160a01b03909216926318160ddd92600480840193829003018186803b1580156106b857600080fd5b505afa1580156106cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f09190610978565b905060006106fe8284610b1a565b90508186858151811061071357610713610b6a565b6020026020010181815250508087858151811061073257610732610b6a565b60209081029190910101526107478186610ae0565b9450505050808061075790610b39565b9150506105a1565b5060005b60035481101561082c5760008285838151811061078257610782610b6a565b6020026020010151670de0b6b3a764000061079d9190610b1a565b6107a79190610af8565b90506000600554826107b99190610b1a565b905060008584815181106107cf576107cf610b6a565b6020026020010151826107e29190610af8565b600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b015550829150610824905081610b39565b915050610763565b50505050565b600082826007544310156108585760405162461bcd60e51b81526004016100d790610abd565b6004546108925760405162461bcd60e51b81526020600482015260086024820152671cdb985c1cda1bdd60c21b60448201526064016100d7565b60035482106108d15760405162461bcd60e51b815260206004820152600b60248201526a1d5b9cdd5c1c1bdc9d195960aa1b60448201526064016100d7565b6000811161090a5760405162461bcd60e51b8152602060048201526006602482015265185b5bdd5b9d60d21b60448201526064016100d7565b670de0b6b3a7640000846004878154811061092757610927610b6a565b906000526020600020015461093c9190610b1a565b6109469190610af8565b95945050505050565b60006020828403121561096157600080fd5b8151801515811461097157600080fd5b9392505050565b60006020828403121561098a57600080fd5b5051919050565b600080604083850312156109a457600080fd5b50508035926020909101359150565b6000806000606084860312156109c857600080fd5b833592506020840135915060408401356001600160a01b03811681146109ed57600080fd5b809150509250925092565b600081518084526020808501945080840160005b83811015610a2857815187529582019590820190600101610a0c565b509495945050505050565b600060e0820160018060a01b03808b1684526020818b168186015260e06040860152828a5180855261010087019150828c01945060005b81811015610a88578551851683529483019491830191600101610a6a565b50508581036060870152610a9c818b6109f8565b60808701999099525050505060a082019390935260c0015250949350505050565b602080825260099082015268746f6f206561726c7960b81b604082015260600190565b60008219821115610af357610af3610b54565b500190565b600082610b1557634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615610b3457610b34610b54565b500290565b6000600019821415610b4d57610b4d610b54565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220ab897ea9ad45b655d52f2d9d868b3d294486868c0efbfa80da5cb7d895ac7ed964736f6c63430008060033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000028a681943f15114a44aeed2e4534b7f05d3bed14000000000000000000000000fdb29741f239a2406ae287913ef12415160378d300000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000d3c21bcecceda10000000000000000000000000000000000000000000000000000000000000000c7091b0000000000000000000000000000000000000000000000000000000000c7364300000000000000000000000000000000000000000000000000000000000000030000000000000000000000007b123f53421b1bf8533339bfbdc7c98aa94163db00000000000000000000000034612903db071e888a4dadcaa416d3ee263a87b90000000000000000000000009e78b8274e1d6a76a0dbbf90418894df27cbceb5

-----Decoded View---------------
Arg [0] : _switchPriceDumper (address): 0x28A681943F15114a44aeed2E4534B7f05d3beD14
Arg [1] : _destinationTokenAddress (address): 0xFdB29741F239a2406AE287913Ef12415160378d3
Arg [2] : _tokenAddresses (address[]): 0x7b123f53421b1bF8533339BFBdc7C98aA94163db,0x34612903Db071e888a4dADcaA416d3EE263a87b9,0x9E78b8274e1D6a76a0dBbf90418894DF27cBCEb5
Arg [3] : _totalSupply (uint256): 1000000000000000000000000
Arg [4] : _snapshotBlock (uint256): 13043995
Arg [5] : _startBlock (uint256): 13055555

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 00000000000000000000000028a681943f15114a44aeed2e4534b7f05d3bed14
Arg [1] : 000000000000000000000000fdb29741f239a2406ae287913ef12415160378d3
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [3] : 00000000000000000000000000000000000000000000d3c21bcecceda1000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000c7091b
Arg [5] : 0000000000000000000000000000000000000000000000000000000000c73643
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [7] : 0000000000000000000000007b123f53421b1bf8533339bfbdc7c98aa94163db
Arg [8] : 00000000000000000000000034612903db071e888a4dadcaa416d3ee263a87b9
Arg [9] : 0000000000000000000000009e78b8274e1d6a76a0dbbf90418894df27cbceb5


Deployed Bytecode Sourcemap

8205:3541:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10919:592;;;;;;:::i;:::-;;:::i;:::-;;9015:266;;;:::i;:::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;9289:1287;;;:::i;11519:224::-;;;;;;:::i;:::-;;:::i;:::-;;;5882:25:1;;;5870:2;5855:18;11519:224:0;5837:76:1;10919:592:0;11035:17;11054:6;10689:10;;10673:12;:26;;10665:48;;;;-1:-1:-1;;;10665:48:0;;;;;;;:::i;:::-;;;;;;;;;10732:19;:26;10724:51;;;;-1:-1:-1;;;10724:51:0;;5262:2:1;10724:51:0;;;5244:21:1;5301:1;5281:18;;;5274:29;-1:-1:-1;;;5319:18:1;;;5312:38;5367:18;;10724:51:0;5234:157:1;10724:51:0;10814:14;:21;10794:41;;10786:65;;;;-1:-1:-1;;;10786:65:0;;5598:2:1;10786:65:0;;;5580:21:1;5637:2;5617:18;;;5610:30;-1:-1:-1;;;5656:18:1;;;5649:41;5707:18;;10786:65:0;5570:161:1;10786:65:0;10879:1;10870:6;:10;10862:29;;;;-1:-1:-1;;;10862:29:0;;4250:2:1;10862:29:0;;;4232:21:1;4289:1;4269:18;;;4262:29;-1:-1:-1;;;4307:18:1;;;4300:36;4353:18;;10862:29:0;4222:155:1;10862:29:0;11073:20:::1;11096:14;11111:17;11096:33;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;::::0;11198:53:::1;::::0;-1:-1:-1;;;11198:53:0;;11217:10:::1;11198:53;::::0;::::1;3288:34:1::0;11237:4:0::1;3338:18:1::0;;;3331:43;3390:18;;;3383:34;;;-1:-1:-1;;;;;11096:33:0;;::::1;::::0;-1:-1:-1;11096:33:0;;;;11198:18:::1;::::0;3223::1;;11198:53:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;11262:18:0::1;::::0;-1:-1:-1;;;11262:18:0;;::::1;::::0;::::1;5882:25:1::0;;;-1:-1:-1;;;;;11262:10:0;::::1;::::0;::::1;::::0;5855:18:1;;11262::0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;11291:13;11307:42;11323:17;11342:6;11307:15;:42::i;:::-;11291:58:::0;-1:-1:-1;11360:16:0::1;-1:-1:-1::0;;;;;11379:27:0;::::1;::::0;:56:::1;;11422:13;11379:56;;;11409:10;11379:56;11453:23;::::0;11446:57:::1;::::0;-1:-1:-1;;;11446:57:0;;-1:-1:-1;;;;;3620:32:1;;;11446:57:0::1;::::0;::::1;3602:51:1::0;3669:18;;;3662:34;;;11360:75:0;;-1:-1:-1;11453:23:0;::::1;::::0;11446:40:::1;::::0;3575:18:1;;11446:57:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;11062:449;;;;10919:592:::0;;;;;:::o;9015:266::-;9053:7;9062;9071:16;9089;9107:7;9116;9125;9153:17;;;;;;;;;-1:-1:-1;;;;;9153:17:0;9172:23;;;;;;;;;-1:-1:-1;;;;;9172:23:0;9197:14;9213:19;9234:11;;9247:13;;9262:10;;9145:128;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9145:128:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9015:266;;;;;;;:::o;9289:1287::-;9353:13;;9337:12;:29;;9329:51;;;;-1:-1:-1;;;9329:51:0;;;;;;;:::i;:::-;9399:19;:26;:31;9391:56;;;;-1:-1:-1;;;9391:56:0;;4584:2:1;9391:56:0;;;4566:21:1;4623:2;4603:18;;;4596:30;-1:-1:-1;;;4642:18:1;;;4635:42;4694:18;;9391:56:0;4556:162:1;9391:56:0;9480:7;;-1:-1:-1;;;;;9480:7:0;9466:10;:21;9458:46;;;;-1:-1:-1;;;9458:46:0;;3909:2:1;9458:46:0;;;3891:21:1;3948:2;3928:18;;;3921:30;-1:-1:-1;;;3967:18:1;;;3960:42;4019:18;;9458:46:0;3881:162:1;9458:46:0;9564:14;:21;9515:32;;9550:36;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9550:36:0;-1:-1:-1;9649:14:0;:21;9515:71;;-1:-1:-1;9597:35:0;;9635:36;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9635:36:0;;9597:74;;9682:27;9728:9;9724:482;9747:14;:21;9743:25;;9724:482;;;9838:17;;9869:14;:17;;9790:18;;-1:-1:-1;;;;;9838:17:0;;9811:57;;9884:1;;9869:17;;;;;;:::i;:::-;;;;;;;;;;;9811:76;;;;;;-1:-1:-1;;;;;;9811:76:0;;;-1:-1:-1;;;;;9869:17:0;;;9811:76;;;1751:51:1;1724:18;;9811:76:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9790:97;;9902:24;9936:14;9951:1;9936:17;;;;;;;;:::i;:::-;;;;;;;;;;;;9929:39;;;-1:-1:-1;;;9929:39:0;;;;-1:-1:-1;;;;;9936:17:0;;;;9929:37;;:39;;;;;;;;;;9936:17;9929:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9902:66;-1:-1:-1;9983:22:0;10008:29;9902:66;10008:10;:29;:::i;:::-;9983:54;;10076:16;10052:18;10071:1;10052:21;;;;;;;;:::i;:::-;;;;;;:40;;;;;10128:14;10107:15;10123:1;10107:18;;;;;;;;:::i;:::-;;;;;;;;;;:35;10157:37;10180:14;10157:37;;:::i;:::-;;;9775:431;;;9770:3;;;;;:::i;:::-;;;;9724:482;;;;10220:9;10216:353;10239:14;:21;10235:25;;10216:353;;;10282:18;10333:19;10304:15;10320:1;10304:18;;;;;;;;:::i;:::-;;;;;;;10325:4;10304:25;;;;:::i;:::-;10303:49;;;;:::i;:::-;10282:70;;10367:22;10405:11;;10392:10;:24;;;;:::i;:::-;10367:49;;10431:26;10477:18;10496:1;10477:21;;;;;;;;:::i;:::-;;;;;;;10460:14;:38;;;;:::i;:::-;10513:19;:44;;;;;;;-1:-1:-1;10513:44:0;;;;;;;-1:-1:-1;10262:3:0;;-1:-1:-1;10262:3:0;;-1:-1:-1;10262:3:0;;:::i;:::-;;;;10216:353;;;;9318:1258;;;9289:1287::o;11519:224::-;11652:7;11612:17;11631:6;10689:10;;10673:12;:26;;10665:48;;;;-1:-1:-1;;;10665:48:0;;;;;;;:::i;:::-;10732:19;:26;10724:51;;;;-1:-1:-1;;;10724:51:0;;5262:2:1;10724:51:0;;;5244:21:1;5301:1;5281:18;;;5274:29;-1:-1:-1;;;5319:18:1;;;5312:38;5367:18;;10724:51:0;5234:157:1;10724:51:0;10814:14;:21;10794:41;;10786:65;;;;-1:-1:-1;;;10786:65:0;;5598:2:1;10786:65:0;;;5580:21:1;5637:2;5617:18;;;5610:30;-1:-1:-1;;;5656:18:1;;;5649:41;5707:18;;10786:65:0;5570:161:1;10786:65:0;10879:1;10870:6;:10;10862:29;;;;-1:-1:-1;;;10862:29:0;;4250:2:1;10862:29:0;;;4232:21:1;4289:1;4269:18;;;4262:29;-1:-1:-1;;;4307:18:1;;;4300:36;4353:18;;10862:29:0;4222:155:1;10862:29:0;11731:4:::1;11721:6;11680:19;11700:17;11680:38;;;;;;;;:::i;:::-;;;;;;;;;:47;;;;:::i;:::-;11679:56;;;;:::i;:::-;11672:63:::0;11519:224;-1:-1:-1;;;;;11519:224:0:o;14:277:1:-;81:6;134:2;122:9;113:7;109:23;105:32;102:2;;;150:1;147;140:12;102:2;182:9;176:16;235:5;228:13;221:21;214:5;211:32;201:2;;257:1;254;247:12;201:2;280:5;92:199;-1:-1:-1;;;92:199:1:o;296:184::-;366:6;419:2;407:9;398:7;394:23;390:32;387:2;;;435:1;432;425:12;387:2;-1:-1:-1;458:16:1;;377:103;-1:-1:-1;377:103:1:o;485:248::-;553:6;561;614:2;602:9;593:7;589:23;585:32;582:2;;;630:1;627;620:12;582:2;-1:-1:-1;;653:23:1;;;723:2;708:18;;;695:32;;-1:-1:-1;572:161:1:o;738:422::-;815:6;823;831;884:2;872:9;863:7;859:23;855:32;852:2;;;900:1;897;890:12;852:2;923:23;;;-1:-1:-1;993:2:1;978:18;;965:32;;-1:-1:-1;1047:2:1;1032:18;;1019:32;-1:-1:-1;;;;;1080:31:1;;1070:42;;1060:2;;1126:1;1123;1116:12;1060:2;1149:5;1139:15;;;842:318;;;;;:::o;1165:435::-;1218:3;1256:5;1250:12;1283:6;1278:3;1271:19;1309:4;1338:2;1333:3;1329:12;1322:19;;1375:2;1368:5;1364:14;1396:1;1406:169;1420:6;1417:1;1414:13;1406:169;;;1481:13;;1469:26;;1515:12;;;;1550:15;;;;1442:1;1435:9;1406:169;;;-1:-1:-1;1591:3:1;;1226:374;-1:-1:-1;;;;;1226:374:1:o;1813:1230::-;2173:4;2221:3;2210:9;2206:19;2261:1;2257;2252:3;2248:11;2244:19;2302:2;2294:6;2290:15;2279:9;2272:34;2325:2;2375;2367:6;2363:15;2358:2;2347:9;2343:18;2336:43;2415:3;2410:2;2399:9;2395:18;2388:31;2439:6;2474;2468:13;2505:6;2497;2490:22;2543:3;2532:9;2528:19;2521:26;;2582:2;2574:6;2570:15;2556:29;;2603:1;2613:178;2627:6;2624:1;2621:13;2613:178;;;2692:13;;2688:22;;2676:35;;2766:15;;;;2731:12;;;;2649:1;2642:9;2613:178;;;2617:3;;2836:9;2831:3;2827:19;2822:2;2811:9;2807:18;2800:47;2864:41;2901:3;2893:6;2864:41;:::i;:::-;2936:3;2921:19;;2914:35;;;;-1:-1:-1;;;;2980:3:1;2965:19;;2958:35;;;;3024:3;3009:19;3002:35;-1:-1:-1;2856:49:1;2182:861;-1:-1:-1;;;;2182:861:1:o;4723:332::-;4925:2;4907:21;;;4964:1;4944:18;;;4937:29;-1:-1:-1;;;4997:2:1;4982:18;;4975:39;5046:2;5031:18;;4897:158::o;5918:128::-;5958:3;5989:1;5985:6;5982:1;5979:13;5976:2;;;5995:18;;:::i;:::-;-1:-1:-1;6031:9:1;;5966:80::o;6051:217::-;6091:1;6117;6107:2;;6161:10;6156:3;6152:20;6149:1;6142:31;6196:4;6193:1;6186:15;6224:4;6221:1;6214:15;6107:2;-1:-1:-1;6253:9:1;;6097:171::o;6273:168::-;6313:7;6379:1;6375;6371:6;6367:14;6364:1;6361:21;6356:1;6349:9;6342:17;6338:45;6335:2;;;6386:18;;:::i;:::-;-1:-1:-1;6426:9:1;;6325:116::o;6446:135::-;6485:3;-1:-1:-1;;6506:17:1;;6503:2;;;6526:18;;:::i;:::-;-1:-1:-1;6573:1:1;6562:13;;6493:88::o;6586:127::-;6647:10;6642:3;6638:20;6635:1;6628:31;6678:4;6675:1;6668:15;6702:4;6699:1;6692:15;6718:127;6779:10;6774:3;6770:20;6767:1;6760:31;6810:4;6807:1;6800:15;6834:4;6831:1;6824:15;6850:127;6911:10;6906:3;6902:20;6899:1;6892:31;6942:4;6939:1;6932:15;6966:4;6963:1;6956:15

Swarm Source

ipfs://ab897ea9ad45b655d52f2d9d868b3d294486868c0efbfa80da5cb7d895ac7ed9

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.