ETH Price: $3,157.45 (+1.47%)

Token

Curve SynthSwap (CRV/SS)
 

Overview

Max Total Supply

0 CRV/SS

Holders

0

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 0 Decimals)

Balance
0 CRV/SS

Value
$0.00
0x3448ad104e8254b1712f4f39a349c83e64b21b08
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.8

Optimization Enabled:
N/A

Other Settings:
MIT license
# @version 0.2.8
"""
@title Curve SynthSwap
@author Curve.fi
@license MIT
@notice Allows cross-asset swaps via Curve and Synthetix
"""

from vyper.interfaces import ERC20
from vyper.interfaces import ERC721

implements: ERC721


interface AddressProvider:
    def get_registry() -> address: view
    def get_address(_id: uint256) -> address: view

interface Curve:
    def get_dy(i: int128, j: int128, dx: uint256) -> uint256: view

interface Registry:
    def get_coins(_pool: address) -> address[8]: view
    def get_coin_indices(pool: address, _from: address, _to: address) -> (int128, int128): view

interface RegistrySwap:
    def exchange(
        _pool: address,
        _from: address,
        _to: address,
        _amount: uint256,
        _expected: uint256,
        _receiver: address,
    ) -> uint256: payable

interface SNXAddressResolver:
    def getAddress(name: bytes32) -> address: view

interface Synth:
    def currencyKey() -> bytes32: nonpayable

interface Exchanger:
    def getAmountsForExchange(
        sourceAmount: uint256,
        sourceCurrencyKey: bytes32,
        destinationCurrencyKey: bytes32
    ) -> (uint256, uint256, uint256): view
    def maxSecsLeftInWaitingPeriod(account: address, currencyKey: bytes32) -> uint256: view
    def settlementOwing(account: address, currencyKey: bytes32) -> (uint256, uint256): view
    def settle(user: address, currencyKey: bytes32): nonpayable

interface Settler:
    def initialize(): nonpayable
    def synth() -> address: view
    def time_to_settle() -> uint256: view
    def convert_synth(
        _target: address,
        _amount: uint256,
        _source_key: bytes32,
        _dest_key: bytes32
    ) -> bool: nonpayable
    def exchange(
        _target: address,
        _pool: address,
        _amount: uint256,
        _expected: uint256,
        _receiver: address,
    ) -> uint256: nonpayable
    def withdraw(_receiver: address, _amount: uint256) -> uint256: nonpayable

interface ERC721Receiver:
    def onERC721Received(
            _operator: address,
            _from: address,
            _token_id: uint256,
            _data: Bytes[1024]
        ) -> bytes32: view


event Transfer:
    sender: indexed(address)
    receiver: indexed(address)
    token_id: indexed(uint256)

event Approval:
    owner: indexed(address)
    approved: indexed(address)
    token_id: indexed(uint256)

event ApprovalForAll:
    owner: indexed(address)
    operator: indexed(address)
    approved: bool

event NewSettler:
    addr: address

event NewSynth:
    synth: address
    pool: address

event TokenUpdate:
    token_id: indexed(uint256)
    owner: indexed(address)
    synth: indexed(address)
    underlying_balance: uint256


struct TokenInfo:
    owner: address
    synth: address
    underlying_balance: uint256
    time_to_settle: uint256


ADDRESS_PROVIDER: constant(address) = 0x0000000022D53366457F9d5E68Ec105046FC4383

SNX_ADDRESS_RESOLVER: constant(address) = 0x4E3b31eB0E5CB73641EE1E65E7dCEFe520bA3ef2
EXCHANGER_KEY: constant(bytes32) = 0x45786368616e6765720000000000000000000000000000000000000000000000

# token id -> owner
id_to_owner: HashMap[uint256, address]
# token id -> address approved to transfer this nft
id_to_approval: HashMap[uint256, address]
# owner -> number of nfts
owner_to_token_count: HashMap[address, uint256]
# owner -> operator -> is approved?
owner_to_operators: HashMap[address, HashMap[address, bool]]

# implementation contract used for `Settler` proxies
settler_implementation: address

# list of available token IDs
# each token ID has an associated `Settler` contract, and to reduce
# gas costs these contracts are reused. Each token ID is created from
# [12 byte nonce][20 byte settler address]. The nonce starts at 0 and is
# incremented each time the token ID is "freed" (added to `available_token_ids`)
available_token_ids: uint256[4294967296]
id_count: uint256

# synth -> curve pool where it can be traded
synth_pools: public(HashMap[address, address])
# coin -> synth that it can be swapped for
swappable_synth: public(HashMap[address, address])
# token id -> is synth settled?
is_settled: public(HashMap[uint256, bool])
# coin -> spender -> is approved to transfer from this contract?
is_approved: HashMap[address, HashMap[address, bool]]
# synth -> currency key
currency_keys: HashMap[address, bytes32]

# Synthetix exchanger contract
exchanger: Exchanger


@external
def __init__(_settler_implementation: address, _settler_count: uint256):
    """
    @notice Contract constructor
    @param _settler_implementation `Settler` implementation deployment
    """
    self.settler_implementation = _settler_implementation
    self.exchanger = Exchanger(SNXAddressResolver(SNX_ADDRESS_RESOLVER).getAddress(EXCHANGER_KEY))

    # deploy settler contracts immediately
    self.id_count = _settler_count
    for i in range(100):
        if i == _settler_count:
            break
        settler: address = create_forwarder_to(_settler_implementation)
        Settler(settler).initialize()
        self.available_token_ids[i] = convert(settler, uint256)
        log NewSettler(settler)


@view
@external
def name() -> String[15]:
    return "Curve SynthSwap"


@view
@external
def symbol() -> String[6]:
    return "CRV/SS"


@view
@external
def supportsInterface(_interface_id: bytes32) -> bool:
    """
    @dev Interface identification is specified in ERC-165
    @param _interface_id Id of the interface
    @return bool Is interface supported?
    """
    return _interface_id in [
        0x0000000000000000000000000000000000000000000000000000000001ffc9a7,  # ERC165
        0x0000000000000000000000000000000000000000000000000000000080ac58cd,  # ERC721
    ]


@view
@external
def balanceOf(_owner: address) -> uint256:
    """
    @notice Return the number of NFTs owned by `_owner`
    @dev Reverts if `_owner` is the zero address. NFTs assigned
         to the zero address are considered invalid
    @param _owner Address for whom to query the balance
    @return uint256 Number of NFTs owned by `_owner`
    """
    assert _owner != ZERO_ADDRESS
    return self.owner_to_token_count[_owner]


@view
@external
def ownerOf(_token_id: uint256) -> address:
    """
    @notice Return the address of the owner of the NFT
    @dev Reverts if `_token_id` is not a valid NFT
    @param _token_id The identifier for an NFT
    @return address NFT owner
    """
    owner: address = self.id_to_owner[_token_id]
    assert owner != ZERO_ADDRESS
    return owner


@view
@external
def getApproved(_token_id: uint256) -> address:
    """
    @notice Get the approved address for a single NFT
    @dev Reverts if `_token_id` is not a valid NFT
    @param _token_id ID of the NFT to query the approval of
    @return address Address approved to transfer this NFT
    """
    assert self.id_to_owner[_token_id] != ZERO_ADDRESS
    return self.id_to_approval[_token_id]


@view
@external
def isApprovedForAll(_owner: address, _operator: address) -> bool:
    """
    @notice Check if `_operator` is an approved operator for `_owner`
    @param _owner The address that owns the NFTs
    @param _operator The address that acts on behalf of the owner
    @return bool Is operator approved?
    """
    return self.owner_to_operators[_owner][_operator]


@internal
def _transfer(_from: address, _to: address, _token_id: uint256, _caller: address):
    assert _from != ZERO_ADDRESS, "Cannot send from zero address"
    assert _to != ZERO_ADDRESS, "Cannot send to zero address"
    owner: address = self.id_to_owner[_token_id]
    assert owner == _from, "Incorrect owner for Token ID"

    approved_for: address = self.id_to_approval[_token_id]
    if _caller != _from:
        assert approved_for == _caller or self.owner_to_operators[owner][_caller], "Caller is not owner or operator"

    if approved_for != ZERO_ADDRESS:
        self.id_to_approval[_token_id] = ZERO_ADDRESS

    self.id_to_owner[_token_id] = _to
    self.owner_to_token_count[_from] -= 1
    self.owner_to_token_count[_to] += 1

    log Transfer(_from, _to, _token_id)


@external
def transferFrom(_from: address, _to: address, _token_id: uint256):
    """
    @notice Transfer ownership of `_token_id` from `_from` to `_to`
    @dev Reverts unless `msg.sender` is the current owner, an
         authorized operator, or the approved address for `_token_id`
         Reverts if `_to` is the zero address
    @param _from The current owner of `_token_id`
    @param _to Address to transfer the NFT to
    @param _token_id ID of the NFT to transfer
    """
    self._transfer(_from, _to, _token_id, msg.sender)


@external
def safeTransferFrom(
    _from: address,
    _to: address,
    _token_id: uint256,
    _data: Bytes[1024]=b""
):
    """
    @notice Transfer ownership of `_token_id` from `_from` to `_to`
    @dev If `_to` is a smart contract, it must implement the `onERC721Received` function
         and return the value `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
    @param _from The current owner of `_token_id`
    @param _to Address to transfer the NFT to
    @param _token_id ID of the NFT to transfer
    @param _data Additional data with no specified format, sent in call to `_to`
    """
    self._transfer(_from, _to, _token_id, msg.sender)

    if _to.is_contract:
        response: bytes32 = ERC721Receiver(_to).onERC721Received(msg.sender, _from, _token_id, _data)
        assert response == 0x150b7a0200000000000000000000000000000000000000000000000000000000


@external
def approve(_approved: address, _token_id: uint256):
    """
    @notice Set or reaffirm the approved address for an NFT.
            The zero address indicates there is no approved address.
    @dev Reverts unless `msg.sender` is the current NFT owner, or an authorized
         operator of the current owner. Reverts if `_token_id` is not a valid NFT.
    @param _approved Address to be approved for the given NFT ID
    @param _token_id ID of the token to be approved
    """
    owner: address = self.id_to_owner[_token_id]

    if msg.sender != self.id_to_owner[_token_id]:
        assert owner != ZERO_ADDRESS, "Unknown Token ID"
        assert self.owner_to_operators[owner][msg.sender], "Caller is not owner or operator"

    self.id_to_approval[_token_id] = _approved
    log Approval(owner, _approved, _token_id)


@external
def setApprovalForAll(_operator: address, _approved: bool):
    """
    @notice Enable or disable approval for a third party ("operator") to manage all
         NFTs owned by `msg.sender`.
    @param _operator Address to set operator authorization for.
    @param _approved True if the operators is approved, False to revoke approval.
    """
    self.owner_to_operators[msg.sender][_operator] = _approved
    log ApprovalForAll(msg.sender, _operator, _approved)


@view
@internal
def _get_swap_into(_from: address, _synth: address, _amount: uint256) -> uint256:
    registry: address = AddressProvider(ADDRESS_PROVIDER).get_registry()

    intermediate_synth: address = self.swappable_synth[_from]
    pool: address = self.synth_pools[intermediate_synth]

    synth_amount: uint256 = _amount
    if _from != intermediate_synth:
        i: int128 = 0
        j: int128 = 0
        i, j = Registry(registry).get_coin_indices(pool, _from, intermediate_synth)

        synth_amount = Curve(pool).get_dy(i, j, _amount)

    return self.exchanger.getAmountsForExchange(
        synth_amount,
        self.currency_keys[intermediate_synth],
        self.currency_keys[_synth],
    )[0]


@view
@external
def get_swap_into_synth_amount(_from: address, _synth: address, _amount: uint256) -> uint256:
    """
    @notice Return the amount received when performing a cross-asset swap
    @dev Used to calculate `_expected` when calling `swap_into_synth`. Be sure to
         reduce the value slightly to account for market movement prior to the
         transaction confirmation.
    @param _from Address of the initial asset being exchanged
    @param _synth Address of the synth being swapped into
    @param _amount Amount of `_from` to swap
    @return uint256 Expected amount of `_synth` received
    """
    return self._get_swap_into(_from, _synth, _amount)


@view
@internal
def _get_swap_from(_synth: address, _to: address, _amount: uint256) -> uint256:
    registry: address = AddressProvider(ADDRESS_PROVIDER).get_registry()
    pool: address = self.synth_pools[_synth]

    i: int128 = 0
    j: int128 = 0
    i, j = Registry(registry).get_coin_indices(pool, _synth, _to)

    return Curve(pool).get_dy(i, j, _amount)


@view
@external
def get_swap_from_synth_amount(_synth: address, _to: address, _amount: uint256) -> uint256:
    """
    @notice Return the amount received when swapping out of a settled synth
    @dev Used to calculate `_expected` when calling `swap_from_synth`. Be sure to
         reduce the value slightly to account for market movement prior to the
         transaction confirmation.
    @param _synth Address of the synth being swapped out of
    @param _to Address of the asset to swap into
    @param _amount Amount of `_synth` being exchanged
    @return uint256 Expected amount of `_to` received
    """
    return self._get_swap_from(_synth, _to, _amount)


@view
@external
def get_estimated_swap_amount(_from: address, _to: address, _amount: uint256) -> uint256:
    """
    @notice Estimate the final amount received when swapping between `_from` and `_to`
    @dev Actual received amount may be different if synth rates change during settlement
    @param _from Address of the initial asset being exchanged
    @param _to Address of the asset to swap into
    @param _amount Amount of `_from` being exchanged
    @return uint256 Estimated amount of `_to` received
    """
    synth: address = self.swappable_synth[_to]
    synth_amount: uint256 = self._get_swap_into(_from, synth, _amount)
    return self._get_swap_from(synth, _to, synth_amount)


@view
@external
def token_info(_token_id: uint256) -> TokenInfo:
    """
    @notice Get information about the synth represented by an NFT
    @param _token_id NFT token ID to query info about
    @return NFT owner
            Address of synth within the NFT
            Balance of the synth
            Max settlement time in seconds
    """
    info: TokenInfo = empty(TokenInfo)
    info.owner = self.id_to_owner[_token_id]
    assert info.owner != ZERO_ADDRESS

    settler: address = convert(_token_id % (2**160), address)
    info.synth = Settler(settler).synth()
    info.underlying_balance = ERC20(info.synth).balanceOf(settler)

    if not self.is_settled[_token_id]:
        currency_key: bytes32 = self.currency_keys[info.synth]
        reclaim: uint256 = 0
        rebate: uint256 = 0
        reclaim, rebate = self.exchanger.settlementOwing(settler, currency_key)
        info.underlying_balance = info.underlying_balance - reclaim + rebate
        info.time_to_settle = self.exchanger.maxSecsLeftInWaitingPeriod(settler, currency_key)

    return info


@payable
@external
def swap_into_synth(
    _from: address,
    _synth: address,
    _amount: uint256,
    _expected: uint256,
    _receiver: address = msg.sender,
    _existing_token_id: uint256 = 0,
) -> uint256:
    """
    @notice Perform a cross-asset swap between `_from` and `_synth`
    @dev Synth swaps require a settlement time to complete and so the newly
         generated synth cannot immediately be transferred onward. Calling
         this function mints an NFT which represents ownership of the generated
         synth. Once the settlement time has passed, the owner may claim the
         synth by calling to `swap_from_synth` or `withdraw`.
    @param _from Address of the initial asset being exchanged
    @param _synth Address of the synth being swapped into
    @param _amount Amount of `_from` to swap
    @param _expected Minimum amount of `_synth` to receive
    @param _receiver Address of the recipient of `_synth`, if not given
                       defaults to `msg.sender`
    @param _existing_token_id Token ID to deposit `_synth` into. If left as 0, a new NFT
                       is minted for the generated synth. If non-zero, the token ID
                       must be owned by `msg.sender` and must represent the same
                       synth as is being swapped into.
    @return uint256 NFT token ID
    """
    settler: address = ZERO_ADDRESS
    token_id: uint256 = 0

    if _existing_token_id == 0:
        # if no token ID is given we are initiating a new swap
        count: uint256 = self.id_count
        if count == 0:
            # if there are no availale settler contracts we must deploy a new one
            settler = create_forwarder_to(self.settler_implementation)
            Settler(settler).initialize()
            token_id = convert(settler, uint256)
            log NewSettler(settler)
        else:
            count -= 1
            token_id = self.available_token_ids[count]
            settler = convert(token_id % (2**160), address)
            self.id_count = count
    else:
        # if a token ID is given we are adding to the balance of an existing swap
        # so must check to make sure this is a permitted action
        settler = convert(_existing_token_id % (2**160), address)
        token_id = _existing_token_id
        owner: address = self.id_to_owner[_existing_token_id]
        if msg.sender != owner:
            assert owner != ZERO_ADDRESS, "Unknown Token ID"
            assert (
                self.owner_to_operators[owner][msg.sender] or
                msg.sender == self.id_to_approval[_existing_token_id]
            ), "Caller is not owner or operator"
        assert owner == _receiver, "Receiver is not owner"
        assert Settler(settler).synth() == _synth, "Incorrect synth for Token ID"

    registry_swap: address = AddressProvider(ADDRESS_PROVIDER).get_address(2)
    intermediate_synth: address = self.swappable_synth[_from]
    synth_amount: uint256 = 0

    if intermediate_synth == _from:
        # if `_from` is already a synth, no initial curve exchange is required
        assert ERC20(_from).transferFrom(msg.sender, settler, _amount)
        synth_amount = _amount
    else:
        if _from != 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:
            # Vyper equivalent of SafeERC20Transfer, handles most ERC20 return values
            response: Bytes[32] = raw_call(
                _from,
                concat(
                    method_id("transferFrom(address,address,uint256)"),
                    convert(msg.sender, bytes32),
                    convert(self, bytes32),
                    convert(_amount, bytes32),
                ),
                max_outsize=32,
            )
            if len(response) != 0:
                assert convert(response, bool)
            if not self.is_approved[_from][registry_swap]:
                response = raw_call(
                    _from,
                    concat(
                        method_id("approve(address,uint256)"),
                        convert(registry_swap, bytes32),
                        convert(MAX_UINT256, bytes32),
                    ),
                    max_outsize=32,
                )
                if len(response) != 0:
                    assert convert(response, bool)
                self.is_approved[_from][registry_swap] = True

        # use Curve to exchange for initial synth, which is sent to the settler
        synth_amount = RegistrySwap(registry_swap).exchange(
            self.synth_pools[intermediate_synth],
            _from,
            intermediate_synth,
            _amount,
            0,
            settler,
            value=msg.value
        )

    # use Synthetix to convert initial synth into the target synth
    initial_balance: uint256 = ERC20(_synth).balanceOf(settler)
    Settler(settler).convert_synth(
        _synth,
        synth_amount,
        self.currency_keys[intermediate_synth],
        self.currency_keys[_synth]
    )
    final_balance: uint256 = ERC20(_synth).balanceOf(settler)
    assert final_balance - initial_balance >= _expected, "Rekt by slippage"

    # if this is a new swap, mint an NFT to represent the unsettled conversion
    if _existing_token_id == 0:
        self.id_to_owner[token_id] = _receiver
        self.owner_to_token_count[_receiver] += 1
        log Transfer(ZERO_ADDRESS, _receiver, token_id)

    log TokenUpdate(token_id, _receiver, _synth, final_balance)

    return token_id


@external
def swap_from_synth(
    _token_id: uint256,
    _to: address,
    _amount: uint256,
    _expected: uint256,
    _receiver: address = msg.sender,
) -> uint256:
    """
    @notice Swap the synth represented by an NFT into another asset.
    @dev Callable by the owner or operator of `_token_id` after the synth settlement
         period has passed. If `_amount` is equal to the entire balance within
         the NFT, the NFT is burned.
    @param _token_id The identifier for an NFT
    @param _to Address of the asset to swap into
    @param _amount Amount of the synth to swap
    @param _expected Minimum amount of `_to` to receive
    @param _receiver Address of the recipient of the synth,
                     if not given defaults to `msg.sender`
    @return uint256 Synth balance remaining in `_token_id`
    """
    owner: address = self.id_to_owner[_token_id]
    if msg.sender != self.id_to_owner[_token_id]:
        assert owner != ZERO_ADDRESS, "Unknown Token ID"
        assert (
            self.owner_to_operators[owner][msg.sender] or
            msg.sender == self.id_to_approval[_token_id]
        ), "Caller is not owner or operator"

    settler: address = convert(_token_id % (2**160), address)
    synth: address = self.swappable_synth[_to]
    pool: address = self.synth_pools[synth]

    # ensure the synth is settled prior to swapping
    if not self.is_settled[_token_id]:
        currency_key: bytes32 = self.currency_keys[synth]
        self.exchanger.settle(settler, currency_key)
        self.is_settled[_token_id] = True

    # use Curve to exchange the synth for another asset which is sent to the receiver
    remaining: uint256 = Settler(settler).exchange(_to, pool, _amount, _expected, _receiver)

    # if the balance of the synth within the NFT is now zero, burn the NFT
    if remaining == 0:
        self.id_to_owner[_token_id] = ZERO_ADDRESS
        self.id_to_approval[_token_id] = ZERO_ADDRESS
        self.is_settled[_token_id] = False
        self.owner_to_token_count[msg.sender] -= 1

        count: uint256 = self.id_count
        # add 2**160 to increment the nonce for next time this settler is used
        self.available_token_ids[count] = _token_id + 2**160
        self.id_count = count + 1

        owner = ZERO_ADDRESS
        synth = ZERO_ADDRESS
        log Transfer(msg.sender, ZERO_ADDRESS, _token_id)

    log TokenUpdate(_token_id, owner, synth, remaining)

    return remaining


@external
def withdraw(_token_id: uint256, _amount: uint256, _receiver: address = msg.sender) -> uint256:
    """
    @notice Withdraw the synth represented by an NFT.
    @dev Callable by the owner or operator of `_token_id` after the synth settlement
         period has passed. If `_amount` is equal to the entire balance within
         the NFT, the NFT is burned.
    @param _token_id The identifier for an NFT
    @param _amount Amount of the synth to withdraw
    @param _receiver Address of the recipient of the synth,
                     if not given defaults to `msg.sender`
    @return uint256 Synth balance remaining in `_token_id`
    """
    owner: address = self.id_to_owner[_token_id]
    if msg.sender != self.id_to_owner[_token_id]:
        assert owner != ZERO_ADDRESS, "Unknown Token ID"
        assert (
            self.owner_to_operators[owner][msg.sender] or
            msg.sender == self.id_to_approval[_token_id]
        ), "Caller is not owner or operator"

    settler: address = convert(_token_id % (2**160), address)
    synth: address = Settler(settler).synth()

    # ensure the synth is settled prior to withdrawal
    if not self.is_settled[_token_id]:
        currency_key: bytes32 = self.currency_keys[synth]
        self.exchanger.settle(settler, currency_key)
        self.is_settled[_token_id] = True

    remaining: uint256 = Settler(settler).withdraw(_receiver, _amount)

    # if the balance of the synth within the NFT is now zero, burn the NFT
    if remaining == 0:
        self.id_to_owner[_token_id] = ZERO_ADDRESS
        self.id_to_approval[_token_id] = ZERO_ADDRESS
        self.is_settled[_token_id] = False
        self.owner_to_token_count[msg.sender] -= 1

        count: uint256 = self.id_count
        # add 2**160 to increment the nonce for next time this settler is used
        self.available_token_ids[count] = _token_id + 2**160
        self.id_count = count + 1

        owner = ZERO_ADDRESS
        synth = ZERO_ADDRESS
        log Transfer(msg.sender, ZERO_ADDRESS, _token_id)


    log TokenUpdate(_token_id, owner, synth, remaining)

    return remaining


@external
def settle(_token_id: uint256) -> bool:
    """
    @notice Settle the synth represented in an NFT.
    @dev Settlement is performed when swapping or withdrawing, there
         is no requirement to call this function separately.
    @param _token_id The identifier for an NFT
    @return bool Success
    """
    if not self.is_settled[_token_id]:
        assert self.id_to_owner[_token_id] != ZERO_ADDRESS, "Unknown Token ID"

        settler: address = convert(_token_id % (2**160), address)
        synth: address = Settler(settler).synth()
        currency_key: bytes32 = self.currency_keys[synth]
        self.exchanger.settle(settler, currency_key)  # dev: settlement failed
        self.is_settled[_token_id] = True

    return True


@external
def add_synth(_synth: address, _pool: address):
    """
    @notice Add a new swappable synth
    @dev Callable by anyone, however `_pool` must exist within the Curve
         pool registry and `_synth` must be a valid synth that is swappable
         within the pool
    @param _synth Address of the synth to add
    @param _pool Address of the Curve pool where `_synth` is swappable
    """
    assert self.synth_pools[_synth] == ZERO_ADDRESS  # dev: already added

    # this will revert if `_synth` is not actually a synth
    self.currency_keys[_synth] = Synth(_synth).currencyKey()

    registry: address = AddressProvider(ADDRESS_PROVIDER).get_registry()
    pool_coins: address[8] = Registry(registry).get_coins(_pool)

    has_synth: bool = False
    for coin in pool_coins:
        if coin == ZERO_ADDRESS:
            assert has_synth  # dev: synth not in pool
            break
        if coin == _synth:
            self.synth_pools[_synth] = _pool
            has_synth = True
        self.swappable_synth[coin] = _synth

    log NewSynth(_synth, _pool)


@external
def rebuildCache():
    """
    @notice Update the current address of the SNX Exchanger contract
    @dev The SNX exchanger address is kept in the local contract storage to reduce gas costs.
         If this address changes, contract will stop working until the local address is updated.
         Synthetix automates this process within their own architecture by exposing a `rebuildCache`
         method in their own contracts, and calling them all to update via `AddressResolver.rebuildCaches`,
         so we use the same API in order to be able to receive updates from them as well.
         https://docs.synthetix.io/contracts/source/contracts/AddressResolver/#rebuildcaches
    """
    self.exchanger = Exchanger(SNXAddressResolver(SNX_ADDRESS_RESOLVER).getAddress(EXCHANGER_KEY))

Contract Security Audit

Contract ABI

[{"name":"Transfer","inputs":[{"type":"address","name":"sender","indexed":true},{"type":"address","name":"receiver","indexed":true},{"type":"uint256","name":"token_id","indexed":true}],"anonymous":false,"type":"event"},{"name":"Approval","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"approved","indexed":true},{"type":"uint256","name":"token_id","indexed":true}],"anonymous":false,"type":"event"},{"name":"ApprovalForAll","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"operator","indexed":true},{"type":"bool","name":"approved","indexed":false}],"anonymous":false,"type":"event"},{"name":"NewSettler","inputs":[{"type":"address","name":"addr","indexed":false}],"anonymous":false,"type":"event"},{"name":"NewSynth","inputs":[{"type":"address","name":"synth","indexed":false},{"type":"address","name":"pool","indexed":false}],"anonymous":false,"type":"event"},{"name":"TokenUpdate","inputs":[{"type":"uint256","name":"token_id","indexed":true},{"type":"address","name":"owner","indexed":true},{"type":"address","name":"synth","indexed":true},{"type":"uint256","name":"underlying_balance","indexed":false}],"anonymous":false,"type":"event"},{"outputs":[],"inputs":[{"type":"address","name":"_settler_implementation"},{"type":"uint256","name":"_settler_count"}],"stateMutability":"nonpayable","type":"constructor"},{"name":"name","outputs":[{"type":"string","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":4579},{"name":"symbol","outputs":[{"type":"string","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":4609},{"name":"supportsInterface","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"bytes32","name":"_interface_id"}],"stateMutability":"view","type":"function","gas":845},{"name":"balanceOf","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_owner"}],"stateMutability":"view","type":"function","gas":1553},{"name":"ownerOf","outputs":[{"type":"address","name":""}],"inputs":[{"type":"uint256","name":"_token_id"}],"stateMutability":"view","type":"function","gas":1498},{"name":"getApproved","outputs":[{"type":"address","name":""}],"inputs":[{"type":"uint256","name":"_token_id"}],"stateMutability":"view","type":"function","gas":2425},{"name":"isApprovedForAll","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"_owner"},{"type":"address","name":"_operator"}],"stateMutability":"view","type":"function","gas":1761},{"name":"transferFrom","outputs":[],"inputs":[{"type":"address","name":"_from"},{"type":"address","name":"_to"},{"type":"uint256","name":"_token_id"}],"stateMutability":"nonpayable","type":"function","gas":134578},{"name":"safeTransferFrom","outputs":[],"inputs":[{"type":"address","name":"_from"},{"type":"address","name":"_to"},{"type":"uint256","name":"_token_id"}],"stateMutability":"nonpayable","type":"function"},{"name":"safeTransferFrom","outputs":[],"inputs":[{"type":"address","name":"_from"},{"type":"address","name":"_to"},{"type":"uint256","name":"_token_id"},{"type":"bytes","name":"_data"}],"stateMutability":"nonpayable","type":"function"},{"name":"approve","outputs":[],"inputs":[{"type":"address","name":"_approved"},{"type":"uint256","name":"_token_id"}],"stateMutability":"nonpayable","type":"function","gas":40888},{"name":"setApprovalForAll","outputs":[],"inputs":[{"type":"address","name":"_operator"},{"type":"bool","name":"_approved"}],"stateMutability":"nonpayable","type":"function","gas":38179},{"name":"get_swap_into_synth_amount","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_from"},{"type":"address","name":"_synth"},{"type":"uint256","name":"_amount"}],"stateMutability":"view","type":"function","gas":8579},{"name":"get_swap_from_synth_amount","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_synth"},{"type":"address","name":"_to"},{"type":"uint256","name":"_amount"}],"stateMutability":"view","type":"function","gas":4312},{"name":"get_estimated_swap_amount","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_from"},{"type":"address","name":"_to"},{"type":"uint256","name":"_amount"}],"stateMutability":"view","type":"function","gas":12949},{"name":"token_info","outputs":[{"type":"address","name":"owner"},{"type":"address","name":"synth"},{"type":"uint256","name":"underlying_balance"},{"type":"uint256","name":"time_to_settle"}],"inputs":[{"type":"uint256","name":"_token_id"}],"stateMutability":"view","type":"function","gas":8207},{"name":"swap_into_synth","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_from"},{"type":"address","name":"_synth"},{"type":"uint256","name":"_amount"},{"type":"uint256","name":"_expected"}],"stateMutability":"payable","type":"function"},{"name":"swap_into_synth","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_from"},{"type":"address","name":"_synth"},{"type":"uint256","name":"_amount"},{"type":"uint256","name":"_expected"},{"type":"address","name":"_receiver"}],"stateMutability":"payable","type":"function"},{"name":"swap_into_synth","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_from"},{"type":"address","name":"_synth"},{"type":"uint256","name":"_amount"},{"type":"uint256","name":"_expected"},{"type":"address","name":"_receiver"},{"type":"uint256","name":"_existing_token_id"}],"stateMutability":"payable","type":"function"},{"name":"swap_from_synth","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_token_id"},{"type":"address","name":"_to"},{"type":"uint256","name":"_amount"},{"type":"uint256","name":"_expected"}],"stateMutability":"nonpayable","type":"function"},{"name":"swap_from_synth","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_token_id"},{"type":"address","name":"_to"},{"type":"uint256","name":"_amount"},{"type":"uint256","name":"_expected"},{"type":"address","name":"_receiver"}],"stateMutability":"nonpayable","type":"function"},{"name":"withdraw","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_token_id"},{"type":"uint256","name":"_amount"}],"stateMutability":"nonpayable","type":"function"},{"name":"withdraw","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_token_id"},{"type":"uint256","name":"_amount"},{"type":"address","name":"_receiver"}],"stateMutability":"nonpayable","type":"function"},{"name":"settle","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"uint256","name":"_token_id"}],"stateMutability":"nonpayable","type":"function","gas":42848},{"name":"add_synth","outputs":[],"inputs":[{"type":"address","name":"_synth"},{"type":"address","name":"_pool"}],"stateMutability":"nonpayable","type":"function","gas":605929},{"name":"rebuildCache","outputs":[],"inputs":[],"stateMutability":"nonpayable","type":"function","gas":36338},{"name":"synth_pools","outputs":[{"type":"address","name":""}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":2086},{"name":"swappable_synth","outputs":[{"type":"address","name":""}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":2116},{"name":"is_settled","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"uint256","name":"arg0"}],"stateMutability":"view","type":"function","gas":2046}]

6040612c6d610140396020612c6d60c03960c05160a01c1561002057600080fd5b61014051600455602061020060246321f8a721610180527f45786368616e67657200000000000000000000000000000000000000000000006101a05261019c734e3b31eb0e5cb73641ee1e65e7dcefe520ba3ef25afa61007f57600080fd5b601f3d1161008c57600080fd5b60005061020051600c556101605160065561018060006064818352015b610160516101805114156100bc576101c9565b7f6033600c60003960336000f336600060003761100060003660007300000000006101c0526c0100000000000000000000000061014051026101db527f5af4602c57600080fd5b6110006000f3000000000000000000000000000000006101ef5260606101c06000f08061012f57600080fd5b6101a0526101a0513b61014157600080fd5b600060006004638129fc1c6101c0526101dc60006101a0515af161016457600080fd5b6101a05161018051640100000000811061017d57600080fd5b600560c052602060c02001556101a0516101c0527f9663d922bbc250e8d974501d76ed29effb34ff751262543efd9d16393fb272ac60206101c0a15b81516001018083528114156100a9575b5050612c5556600436101561000d57612a7f565b600035601c526306fdde0360005114156100b757341561002c57600080fd5b600f610140527f43757276652053796e7468537761700000000000000000000000000000000000610160526101408051602001806101e08284600060045af161007457600080fd5b50506101e0518061020001818260206001820306601f820103905003368237505060206101c05260406101e0510160206001820306601f82010390506101c0f350005b6395d89b41600051141561015b5734156100d057600080fd5b6006610140527f4352562f53530000000000000000000000000000000000000000000000000000610160526101408051602001806101e08284600060045af161011857600080fd5b50506101e0518061020001818260206001820306601f820103905003368237505060206101c05260406101e0510160206001820306601f82010390506101c0f350005b63f175355060005114156101dc57341561017457600080fd5b6301ffc9a7610160526380ac58cd6101805260006101405261014061012060006002818352015b61012051602002610160015160043514156101b957600183526101ca565b5b815160010180835281141561019b575b5050506101405160005260206000f350005b6370a0823160005114156102305734156101f557600080fd5b60043560a01c1561020557600080fd5b60006004351861021457600080fd5b600260043560e05260c052604060c0205460005260206000f350005b636352211e600051141561027d57341561024957600080fd5b600060043560e05260c052604060c02054610140526000610140511861026e57600080fd5b6101405160005260206000f350005b63081812fc60005114156102cf57341561029657600080fd5b6000600060043560e05260c052604060c02054186102b357600080fd5b600160043560e05260c052604060c0205460005260206000f350005b63e985e9c560005114156103325734156102e857600080fd5b60043560a01c156102f857600080fd5b60243560a01c1561030857600080fd5b600360043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f350005b6000156105cf575b6101c0526101405261016052610180526101a052600061014051141515156103a1576308c379a06101e052602061020052601d610220527f43616e6e6f742073656e642066726f6d207a65726f2061646472657373000000610240526102205060646101fcfd5b600061016051141515156103f4576308c379a06101e052602061020052601b610220527f43616e6e6f742073656e6420746f207a65726f20616464726573730000000000610240526102205060646101fcfd5b60006101805160e05260c052604060c020546101e052610140516101e05114151561045e576308c379a061020052602061022052601c610240527f496e636f7272656374206f776e657220666f7220546f6b656e204944000000006102605261024050606461021cfd5b60016101805160e05260c052604060c0205461020052610140516101a0511815610506576101a0516102005114156104975760016104b9565b60036101e05160e05260c052604060c0206101a05160e05260c052604060c020545b5b1515610505576308c379a061022052602061024052601f610260527f43616c6c6572206973206e6f74206f776e6572206f72206f70657261746f72006102805261026050606461023cfd5b5b600061020051181561052757600060016101805160e05260c052604060c020555b6101605160006101805160e05260c052604060c0205560026101405160e05260c052604060c020805460018082101561055f57600080fd5b8082039050905081555060026101605160e05260c052604060c0208054600181818301101561058d57600080fd5b808201905090508155506101805161016051610140517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60006000a46101c051565b6323b872dd60005114156106405734156105e857600080fd5b60043560a01c156105f857600080fd5b60243560a01c1561060857600080fd5b600435610140526024356101605260443561018052336101a0526101a0516101805161016051610140516006580161033a565b600050005b6342842e0e6000511415610678576000610580526105808051602001806101408284600060045af161067157600080fd5b50506106c5565b63b88d4fde60005114156106bd57610420606435600401610140376104006064356004013511156106a857600080fd5b610440606435600401610140376000506106c5565b6000156108fd575b34156106d057600080fd5b60043560a01c156106e057600080fd5b60243560a01c156106f057600080fd5b6101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516102a0516102c0516102e05161030051610320516103405161036051610380516103a0516103c0516103e05161040051610420516104405161046051610480516104a0516104c0516104e05161050051610520516105405161056051610580516105a0516004356105c0526024356105e05260443561060052336106205261062051610600516105e0516105c0516006580161033a565b6105a05261058052610560526105405261052052610500526104e0526104c0526104a05261048052610460526104405261042052610400526103e0526103c0526103a05261038052610360526103405261032052610300526102e0526102c0526102a05261028052610260526102405261022052610200526101e0526101c0526101a05261018052610160526101405260005060006024353b11156108fb576020610ae06104a4608063150b7a026105e0523361060052600435610620526044356106405280610660526101408080516020018084610600018284600060045af161089d57600080fd5b5050506105fc90506024355afa6108b357600080fd5b601f3d116108c057600080fd5b600050610ae0516105c0527f150b7a02000000000000000000000000000000000000000000000000000000006105c051146108fa57600080fd5b5b005b63095ea7b36000511415610a5657341561091657600080fd5b60043560a01c1561092657600080fd5b600060243560e05260c052604060c0205461014052600060243560e05260c052604060c02054331815610a1057600061014051141515156109a6576308c379a06101605260206101805260106101a0527f556e6b6e6f776e20546f6b656e204944000000000000000000000000000000006101c0526101a050606461017cfd5b60036101405160e05260c052604060c0203360e05260c052604060c020541515610a0f576308c379a061016052602061018052601f6101a0527f43616c6c6572206973206e6f74206f776e6572206f72206f70657261746f72006101c0526101a050606461017cfd5b5b600435600160243560e05260c052604060c02055602435600435610140517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560006000a4005b63a22cb4656000511415610ae3573415610a6f57600080fd5b60043560a01c15610a7f57600080fd5b60243560011c15610a8f57600080fd5b60243560033360e05260c052604060c02060043560e05260c052604060c0205560243561014052600435337f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c316020610140a3005b600015610d02575b6101a0526101405261016052610180526020610240600463a262904b6101e0526101fc6f22d53366457f9d5e68ec105046fc43835afa610b2a57600080fd5b601f3d11610b3757600080fd5b600050610240516101c05260086101405160e05260c052604060c020546101e05260076101e05160e05260c052604060c020546102005261018051610220526101e051610140511815610c5b57604036610240376040610340606463eb85226d61028052610200516102a052610140516102c0526101e0516102e05261029c6101c0515afa610bc557600080fd5b603f3d11610bd257600080fd5b6103408080808051610380525050602081019050808080516103a052505050506000506103808051610240528060200151610260525060206103406064635e0d443f61028052610240516102a052610260516102c052610180516102e05261029c610200515afa610c4257600080fd5b601f3d11610c4f57600080fd5b60005061034051610220525b6060610300606463f450aa34610240526102205161026052600b6101e05160e05260c052604060c0205461028052600b6101605160e05260c052604060c020546102a05261025c600c545afa610cb057600080fd5b605f3d11610cbd57600080fd5b610300808080805161036052505060208101905080808051610380525050602081019050808080516103a05250505050600050610360516000526000516101a0515650005b63af89565a6000511415610d78573415610d1b57600080fd5b60043560a01c15610d2b57600080fd5b60243560a01c15610d3b57600080fd5b60043561014052602435610160526044356101805261018051610160516101405160065801610aeb565b6101e0526101e05160005260206000f350005b600015610ecd575b6101a0526101405261016052610180526020610240600463a262904b6101e0526101fc6f22d53366457f9d5e68ec105046fc43835afa610dbf57600080fd5b601f3d11610dcc57600080fd5b600050610240516101c05260076101405160e05260c052604060c020546101e052604036610200376040610300606463eb85226d610240526101e051610260526101405161028052610160516102a05261025c6101c0515afa610e2e57600080fd5b603f3d11610e3b57600080fd5b61030080808080516103405250506020810190508080805161036052505050506000506103408051610200528060200151610220525060206103006064635e0d443f6102405261020051610260526102205161028052610180516102a05261025c6101e0515afa610eab57600080fd5b601f3d11610eb857600080fd5b600050610300516000526000516101a0515650005b632b2ca9806000511415610f43573415610ee657600080fd5b60043560a01c15610ef657600080fd5b60243560a01c15610f0657600080fd5b60043561014052602435610160526044356101805261018051610160516101405160065801610d80565b6101e0526101e05160005260206000f350005b63b691a2b56000511415611027573415610f5c57600080fd5b60043560a01c15610f6c57600080fd5b60243560a01c15610f7c57600080fd5b600860243560e05260c052604060c0205461014052610140516101605160043561018052610140516101a0526044356101c0526101c0516101a0516101805160065801610aeb565b6102205261016052610140526102205161016052610140516101605161014051610180526024356101a052610160516101c0526101c0516101a0516101805160065801610d80565b6102205261016052610140526102205160005260206000f350005b63d4d06faf600051141561129f57341561104057600080fd5b60803661014037600060043560e05260c052604060c02054610140526000610140511861106c57600080fd5b60043574010000000000000000000000000000000000000000808206905090508060a01c1561109a57600080fd5b8090506101c0526020610240600463115f4fee6101e0526101fc6101c0515afa6110c357600080fd5b601f3d116110d057600080fd5b6000506102405161016052602061026060246370a082316101e0526101c051610200526101fc610160515afa61110557600080fd5b601f3d1161111257600080fd5b6000506102605161018052600960043560e05260c052604060c02054151561124957600b6101605160e05260c052604060c020546101e0526040366102003760406102e060446319d5c665610240526101c051610260526101e0516102805261025c600c545afa61118257600080fd5b603f3d1161118f57600080fd5b6102e08080808051610320525050602081019050808080516103405250505050600050610320805161020052806020015161022052506101805161020051808210156111da57600080fd5b80820390509050610220518181830110156111f457600080fd5b808201905090506101805260206102e0604463059c29ec610240526101c051610260526101e0516102805261025c600c545afa61123057600080fd5b601f3d1161123d57600080fd5b6000506102e0516101a0525b6101406101e080808084518152505060208101905080808460200151815250506020810190508080846040015181525050602081019050808084606001518152505060809050905060c05260c0516101e0f39050005b63489c7c7c60005114156112bd57336101405260006101605261132f565b63efc68b2060005114156112f15760006101605260843560a01c156112e157600080fd5b602060846101403760005061132f565b63fd22d70f60005114156113275760843560a01c1561130f57600080fd5b6020608461014037602060a46101603760005061132f565b600015611d7a575b60043560a01c1561133f57600080fd5b60243560a01c1561134f57600080fd5b604036610180376101605115156114da576006546101c0526101c0511515611454577f6033600c60003960336000f336600060003761100060003660007300000000006101e0526c01000000000000000000000000600454026101fb527f5af4602c57600080fd5b6110006000f30000000000000000000000000000000061020f5260606101e06000f0806113e357600080fd5b61018052610180513b6113f557600080fd5b600060006004638129fc1c6101e0526101fc6000610180515af161141857600080fd5b610180516101a052610180516101e0527f9663d922bbc250e8d974501d76ed29effb34ff751262543efd9d16393fb272ac60206101e0a16114d5565b6101c0805160018082101561146857600080fd5b808203905090508152506101c051640100000000811061148757600080fd5b600560c052602060c02001546101a0526101a05174010000000000000000000000000000000000000000808206905090508060a01c156114c657600080fd5b809050610180526101c0516006555b6116f2565b6101605174010000000000000000000000000000000000000000808206905090508060a01c1561150957600080fd5b80905061018052610160516101a05260006101605160e05260c052604060c020546101c0526101c0513318156116185760006101c0511415151561158c576308c379a06101e0526020610200526010610220527f556e6b6e6f776e20546f6b656e20494400000000000000000000000000000000610240526102205060646101fcfd5b60036101c05160e05260c052604060c0203360e05260c052604060c02054156115b65760016115cb565b60016101605160e05260c052604060c0205433145b5b1515611617576308c379a06101e052602061020052601f610220527f43616c6c6572206973206e6f74206f776e6572206f72206f70657261746f7200610240526102205060646101fcfd5b5b610140516101c05114151561166c576308c379a06101e0526020610200526015610220527f5265636569766572206973206e6f74206f776e65720000000000000000000000610240526102205060646101fcfd5b6024356020610240600463115f4fee6101e0526101fc610180515afa61169157600080fd5b601f3d1161169e57600080fd5b600050610240511415156116f1576308c379a061026052602061028052601c6102a0527f496e636f72726563742073796e746820666f7220546f6b656e204944000000006102c0526102a050606461027cfd5b5b6020610260602463493f4f746101e0526002610200526101fc6f22d53366457f9d5e68ec105046fc43835afa61172757600080fd5b601f3d1161173457600080fd5b600050610260516101c052600860043560e05260c052604060c020546101e0526000610200526004356101e05114156117c75760206102e060646323b872dd61022052336102405261018051610260526044356102805261023c60006004355af161179e57600080fd5b601f3d116117ab57600080fd5b6000506102e0516117bb57600080fd5b60443561020052611b52565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6004351815611adc5760006004610280527f23b872dd000000000000000000000000000000000000000000000000000000006102a0526102806004806020846102e001018260208501600060045af1505080518201915050336020826102e0010152602081019050306020826102e00101526020810190506044356020826102e0010152602081019050806102e0526102e090508051602001806103a08284600060045af161188a57600080fd5b505060206104806103a0516103c060006004355af16118a857600080fd5b60203d808211156118b957806118bb565b815b90509050610460526104608051602001806102208284600060045af16118e057600080fd5b505060006102205118156119335761022080602001516000825180602090131561190957600080fd5b809190121561191757600080fd5b806020036101000a8204905090509050151561193257600080fd5b5b600a60043560e05260c052604060c0206101c05160e05260c052604060c020541515611adb5760006004610280527f095ea7b3000000000000000000000000000000000000000000000000000000006102a0526102806004806020846102e001018260208501600060045af15050805182019150506101c0516020826102e00101526020810190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6020826102e0010152602081019050806102e0526102e090508051602001806103808284600060045af1611a0f57600080fd5b50506020610440610380516103a060006004355af1611a2d57600080fd5b60203d80821115611a3e5780611a40565b815b90509050610420526104208051602001806102208284600060045af1611a6557600080fd5b50506000610220511815611ab857610220806020015160008251806020901315611a8e57600080fd5b8091901215611a9c57600080fd5b806020036101000a82049050905090501515611ab757600080fd5b5b6001600a60043560e05260c052604060c0206101c05160e05260c052604060c020555b5b602061034060c4631a4c1ca36102205260076101e05160e05260c052604060c0205461024052600435610260526101e051610280526044356102a05260006102c052610180516102e05261023c346101c0515af1611b3957600080fd5b601f3d11611b4657600080fd5b60005061034051610200525b60206102c060246370a0823161024052610180516102605261025c6024355afa611b7b57600080fd5b601f3d11611b8857600080fd5b6000506102c0516102205260206103206084637122acfb61024052602435610260526102005161028052600b6101e05160e05260c052604060c020546102a052600b60243560e05260c052604060c020546102c05261025c6000610180515af1611bf157600080fd5b601f3d11611bfe57600080fd5b6000506103205060206102e060246370a0823161026052610180516102805261027c6024355afa611c2e57600080fd5b601f3d11611c3b57600080fd5b6000506102e05161024052606435610240516102205180821015611c5e57600080fd5b8082039050905010151515611cb2576308c379a06102605260206102805260106102a0527f52656b7420627920736c697070616765000000000000000000000000000000006102c0526102a050606461027cfd5b610160511515611d31576101405160006101a05160e05260c052604060c0205560026101405160e05260c052604060c02080546001818183011015611cf657600080fd5b808201905090508155506101a0516101405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60006000a45b6102405161026052602435610140516101a0517f72946db909d02e0ff93d1e9ff43433f9740b00add96b36bd7df362987648bc8d6020610260a46101a05160005260206000f350005b636adadd5a6000511415611d92573361014052611dc8565b63dc4606586000511415611dc05760843560a01c15611db057600080fd5b6020608461014037600050611dc8565b600015612193575b3415611dd357600080fd5b60243560a01c15611de357600080fd5b600060043560e05260c052604060c0205461016052600060043560e05260c052604060c02054331815611eee5760006101605114151515611e63576308c379a06101805260206101a05260106101c0527f556e6b6e6f776e20546f6b656e204944000000000000000000000000000000006101e0526101c050606461019cfd5b60036101605160e05260c052604060c0203360e05260c052604060c0205415611e8d576001611ea1565b600160043560e05260c052604060c0205433145b5b1515611eed576308c379a06101805260206101a052601f6101c0527f43616c6c6572206973206e6f74206f776e6572206f72206f70657261746f72006101e0526101c050606461019cfd5b5b60043574010000000000000000000000000000000000000000808206905090508060a01c15611f1c57600080fd5b80905061018052600860243560e05260c052604060c020546101a05260076101a05160e05260c052604060c020546101c052600960043560e05260c052604060c020541515611fce57600b6101a05160e05260c052604060c020546101e052600c543b611f8857600080fd5b600060006044631b16802c6102005261018051610220526101e0516102405261021c6000600c545af1611fba57600080fd5b6001600960043560e05260c052604060c020555b602061030060a463c955f5b461020052602435610220526101c051610240526044356102605260643561028052610140516102a05261021c6000610180515af161201757600080fd5b601f3d1161202457600080fd5b600050610300516101e0526101e051151561214a576000600060043560e05260c052604060c020556000600160043560e05260c052604060c020556000600960043560e05260c052604060c0205560023360e05260c052604060c020805460018082101561209157600080fd5b8082039050905081555060065461020052600435740100000000000000000000000000000000000000008181830110156120ca57600080fd5b808201905090506102005164010000000081106120e657600080fd5b600560c052602060c020015561020051600181818301101561210757600080fd5b8082019050905060065560006101605260006101a0526004356000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60006000a45b6101e051610200526101a051610160516004357f72946db909d02e0ff93d1e9ff43433f9740b00add96b36bd7df362987648bc8d6020610200a46101e05160005260206000f350005b63441a3e7060005114156121ab5733610140526121e1565b630ad58d2f60005114156121d95760443560a01c156121c957600080fd5b60206044610140376000506121e1565b600015612595575b34156121ec57600080fd5b600060043560e05260c052604060c0205461016052600060043560e05260c052604060c020543318156122f7576000610160511415151561226c576308c379a06101805260206101a05260106101c0527f556e6b6e6f776e20546f6b656e204944000000000000000000000000000000006101e0526101c050606461019cfd5b60036101605160e05260c052604060c0203360e05260c052604060c02054156122965760016122aa565b600160043560e05260c052604060c0205433145b5b15156122f6576308c379a06101805260206101a052601f6101c0527f43616c6c6572206973206e6f74206f776e6572206f72206f70657261746f72006101e0526101c050606461019cfd5b5b60043574010000000000000000000000000000000000000000808206905090508060a01c1561232557600080fd5b809050610180526020610220600463115f4fee6101c0526101dc610180515afa61234e57600080fd5b601f3d1161235b57600080fd5b600050610220516101a052600960043560e05260c052604060c0205415156123e657600b6101a05160e05260c052604060c020546101c052600c543b6123a057600080fd5b600060006044631b16802c6101e05261018051610200526101c051610220526101fc6000600c545af16123d257600080fd5b6001600960043560e05260c052604060c020555b6020610280604463f3fef3a36101e0526101405161020052602435610220526101fc6000610180515af161241957600080fd5b601f3d1161242657600080fd5b600050610280516101c0526101c051151561254c576000600060043560e05260c052604060c020556000600160043560e05260c052604060c020556000600960043560e05260c052604060c0205560023360e05260c052604060c020805460018082101561249357600080fd5b808203905090508155506006546101e052600435740100000000000000000000000000000000000000008181830110156124cc57600080fd5b808201905090506101e05164010000000081106124e857600080fd5b600560c052602060c02001556101e051600181818301101561250957600080fd5b8082019050905060065560006101605260006101a0526004356000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60006000a45b6101c0516101e0526101a051610160516004357f72946db909d02e0ff93d1e9ff43433f9740b00add96b36bd7df362987648bc8d60206101e0a46101c05160005260206000f350005b638df82800600051141561270a5734156125ae57600080fd5b600960043560e05260c052604060c0205415156126fd576000600060043560e05260c052604060c0205414151515612625576308c379a0610140526020610160526010610180527f556e6b6e6f776e20546f6b656e204944000000000000000000000000000000006101a05261018050606461015cfd5b60043574010000000000000000000000000000000000000000808206905090508060a01c1561265357600080fd5b8090506101405260206101e0600463115f4fee6101805261019c610140515afa61267c57600080fd5b601f3d1161268957600080fd5b6000506101e05161016052600b6101605160e05260c052604060c0205461018052600c543b6126b757600080fd5b600060006044631b16802c6101a052610140516101c052610180516101e0526101bc6000600c545af16126e957600080fd5b6001600960043560e05260c052604060c020555b600160005260206000f350005b63fe1e897b600051141561293557341561272357600080fd5b60043560a01c1561273357600080fd5b60243560a01c1561274357600080fd5b600760043560e05260c052604060c020541561275e57600080fd5b60206101a0600463dbd06c856101405261015c60006004355af161278157600080fd5b601f3d1161278e57600080fd5b6000506101a051600b60043560e05260c052604060c0205560206101c0600463a262904b6101605261017c6f22d53366457f9d5e68ec105046fc43835afa6127d557600080fd5b601f3d116127e257600080fd5b6000506101c051610140526101006102e06024639ac90d3d610260526024356102805261027c610140515afa61281757600080fd5b60ff3d1161282457600080fd5b6000506102e080516101605280602001516101805280604001516101a05280606001516101c05280608001516101e0528060a00151610200528060c00151610220528060e0015161024052506000610260526102a060006008818352015b60206102a051026101600151610280526102805115156128ae57610260516128a957600080fd5b6128fc565b6004356102805114156128d657602435600760043560e05260c052604060c020556001610260525b60043560086102805160e05260c052604060c020555b8151600101808352811415612882575b5050600435610280526024356102a0527f9f8815bba4c2fe0a80beb8f1257105a9bef3466417d3d962974b6be33a2a8a386040610280a1005b637418536060005114156129bf57341561294e57600080fd5b60206101c060246321f8a721610140527f45786368616e67657200000000000000000000000000000000000000000000006101605261015c734e3b31eb0e5cb73641ee1e65e7dcefe520ba3ef25afa6129a657600080fd5b601f3d116129b357600080fd5b6000506101c051600c55005b63294bb4d36000511415612a045734156129d857600080fd5b60043560a01c156129e857600080fd5b600760043560e05260c052604060c0205460005260206000f350005b63d922eccd6000511415612a49573415612a1d57600080fd5b60043560a01c15612a2d57600080fd5b600860043560e05260c052604060c0205460005260206000f350005b638906c4e06000511415612a7e573415612a6257600080fd5b600960043560e05260c052604060c0205460005260206000f350005b5b60006000fd5b6101d0612c55036101d06000396101d0612c55036000f300000000000000000000000082c1cc1685be4825400854ce5b1c7d86da75b7ac0000000000000000000000000000000000000000000000000000000000000005

Deployed Bytecode

0x600436101561000d57612a7f565b600035601c526306fdde0360005114156100b757341561002c57600080fd5b600f610140527f43757276652053796e7468537761700000000000000000000000000000000000610160526101408051602001806101e08284600060045af161007457600080fd5b50506101e0518061020001818260206001820306601f820103905003368237505060206101c05260406101e0510160206001820306601f82010390506101c0f350005b6395d89b41600051141561015b5734156100d057600080fd5b6006610140527f4352562f53530000000000000000000000000000000000000000000000000000610160526101408051602001806101e08284600060045af161011857600080fd5b50506101e0518061020001818260206001820306601f820103905003368237505060206101c05260406101e0510160206001820306601f82010390506101c0f350005b63f175355060005114156101dc57341561017457600080fd5b6301ffc9a7610160526380ac58cd6101805260006101405261014061012060006002818352015b61012051602002610160015160043514156101b957600183526101ca565b5b815160010180835281141561019b575b5050506101405160005260206000f350005b6370a0823160005114156102305734156101f557600080fd5b60043560a01c1561020557600080fd5b60006004351861021457600080fd5b600260043560e05260c052604060c0205460005260206000f350005b636352211e600051141561027d57341561024957600080fd5b600060043560e05260c052604060c02054610140526000610140511861026e57600080fd5b6101405160005260206000f350005b63081812fc60005114156102cf57341561029657600080fd5b6000600060043560e05260c052604060c02054186102b357600080fd5b600160043560e05260c052604060c0205460005260206000f350005b63e985e9c560005114156103325734156102e857600080fd5b60043560a01c156102f857600080fd5b60243560a01c1561030857600080fd5b600360043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f350005b6000156105cf575b6101c0526101405261016052610180526101a052600061014051141515156103a1576308c379a06101e052602061020052601d610220527f43616e6e6f742073656e642066726f6d207a65726f2061646472657373000000610240526102205060646101fcfd5b600061016051141515156103f4576308c379a06101e052602061020052601b610220527f43616e6e6f742073656e6420746f207a65726f20616464726573730000000000610240526102205060646101fcfd5b60006101805160e05260c052604060c020546101e052610140516101e05114151561045e576308c379a061020052602061022052601c610240527f496e636f7272656374206f776e657220666f7220546f6b656e204944000000006102605261024050606461021cfd5b60016101805160e05260c052604060c0205461020052610140516101a0511815610506576101a0516102005114156104975760016104b9565b60036101e05160e05260c052604060c0206101a05160e05260c052604060c020545b5b1515610505576308c379a061022052602061024052601f610260527f43616c6c6572206973206e6f74206f776e6572206f72206f70657261746f72006102805261026050606461023cfd5b5b600061020051181561052757600060016101805160e05260c052604060c020555b6101605160006101805160e05260c052604060c0205560026101405160e05260c052604060c020805460018082101561055f57600080fd5b8082039050905081555060026101605160e05260c052604060c0208054600181818301101561058d57600080fd5b808201905090508155506101805161016051610140517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60006000a46101c051565b6323b872dd60005114156106405734156105e857600080fd5b60043560a01c156105f857600080fd5b60243560a01c1561060857600080fd5b600435610140526024356101605260443561018052336101a0526101a0516101805161016051610140516006580161033a565b600050005b6342842e0e6000511415610678576000610580526105808051602001806101408284600060045af161067157600080fd5b50506106c5565b63b88d4fde60005114156106bd57610420606435600401610140376104006064356004013511156106a857600080fd5b610440606435600401610140376000506106c5565b6000156108fd575b34156106d057600080fd5b60043560a01c156106e057600080fd5b60243560a01c156106f057600080fd5b6101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516102a0516102c0516102e05161030051610320516103405161036051610380516103a0516103c0516103e05161040051610420516104405161046051610480516104a0516104c0516104e05161050051610520516105405161056051610580516105a0516004356105c0526024356105e05260443561060052336106205261062051610600516105e0516105c0516006580161033a565b6105a05261058052610560526105405261052052610500526104e0526104c0526104a05261048052610460526104405261042052610400526103e0526103c0526103a05261038052610360526103405261032052610300526102e0526102c0526102a05261028052610260526102405261022052610200526101e0526101c0526101a05261018052610160526101405260005060006024353b11156108fb576020610ae06104a4608063150b7a026105e0523361060052600435610620526044356106405280610660526101408080516020018084610600018284600060045af161089d57600080fd5b5050506105fc90506024355afa6108b357600080fd5b601f3d116108c057600080fd5b600050610ae0516105c0527f150b7a02000000000000000000000000000000000000000000000000000000006105c051146108fa57600080fd5b5b005b63095ea7b36000511415610a5657341561091657600080fd5b60043560a01c1561092657600080fd5b600060243560e05260c052604060c0205461014052600060243560e05260c052604060c02054331815610a1057600061014051141515156109a6576308c379a06101605260206101805260106101a0527f556e6b6e6f776e20546f6b656e204944000000000000000000000000000000006101c0526101a050606461017cfd5b60036101405160e05260c052604060c0203360e05260c052604060c020541515610a0f576308c379a061016052602061018052601f6101a0527f43616c6c6572206973206e6f74206f776e6572206f72206f70657261746f72006101c0526101a050606461017cfd5b5b600435600160243560e05260c052604060c02055602435600435610140517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560006000a4005b63a22cb4656000511415610ae3573415610a6f57600080fd5b60043560a01c15610a7f57600080fd5b60243560011c15610a8f57600080fd5b60243560033360e05260c052604060c02060043560e05260c052604060c0205560243561014052600435337f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c316020610140a3005b600015610d02575b6101a0526101405261016052610180526020610240600463a262904b6101e0526101fc6f22d53366457f9d5e68ec105046fc43835afa610b2a57600080fd5b601f3d11610b3757600080fd5b600050610240516101c05260086101405160e05260c052604060c020546101e05260076101e05160e05260c052604060c020546102005261018051610220526101e051610140511815610c5b57604036610240376040610340606463eb85226d61028052610200516102a052610140516102c0526101e0516102e05261029c6101c0515afa610bc557600080fd5b603f3d11610bd257600080fd5b6103408080808051610380525050602081019050808080516103a052505050506000506103808051610240528060200151610260525060206103406064635e0d443f61028052610240516102a052610260516102c052610180516102e05261029c610200515afa610c4257600080fd5b601f3d11610c4f57600080fd5b60005061034051610220525b6060610300606463f450aa34610240526102205161026052600b6101e05160e05260c052604060c0205461028052600b6101605160e05260c052604060c020546102a05261025c600c545afa610cb057600080fd5b605f3d11610cbd57600080fd5b610300808080805161036052505060208101905080808051610380525050602081019050808080516103a05250505050600050610360516000526000516101a0515650005b63af89565a6000511415610d78573415610d1b57600080fd5b60043560a01c15610d2b57600080fd5b60243560a01c15610d3b57600080fd5b60043561014052602435610160526044356101805261018051610160516101405160065801610aeb565b6101e0526101e05160005260206000f350005b600015610ecd575b6101a0526101405261016052610180526020610240600463a262904b6101e0526101fc6f22d53366457f9d5e68ec105046fc43835afa610dbf57600080fd5b601f3d11610dcc57600080fd5b600050610240516101c05260076101405160e05260c052604060c020546101e052604036610200376040610300606463eb85226d610240526101e051610260526101405161028052610160516102a05261025c6101c0515afa610e2e57600080fd5b603f3d11610e3b57600080fd5b61030080808080516103405250506020810190508080805161036052505050506000506103408051610200528060200151610220525060206103006064635e0d443f6102405261020051610260526102205161028052610180516102a05261025c6101e0515afa610eab57600080fd5b601f3d11610eb857600080fd5b600050610300516000526000516101a0515650005b632b2ca9806000511415610f43573415610ee657600080fd5b60043560a01c15610ef657600080fd5b60243560a01c15610f0657600080fd5b60043561014052602435610160526044356101805261018051610160516101405160065801610d80565b6101e0526101e05160005260206000f350005b63b691a2b56000511415611027573415610f5c57600080fd5b60043560a01c15610f6c57600080fd5b60243560a01c15610f7c57600080fd5b600860243560e05260c052604060c0205461014052610140516101605160043561018052610140516101a0526044356101c0526101c0516101a0516101805160065801610aeb565b6102205261016052610140526102205161016052610140516101605161014051610180526024356101a052610160516101c0526101c0516101a0516101805160065801610d80565b6102205261016052610140526102205160005260206000f350005b63d4d06faf600051141561129f57341561104057600080fd5b60803661014037600060043560e05260c052604060c02054610140526000610140511861106c57600080fd5b60043574010000000000000000000000000000000000000000808206905090508060a01c1561109a57600080fd5b8090506101c0526020610240600463115f4fee6101e0526101fc6101c0515afa6110c357600080fd5b601f3d116110d057600080fd5b6000506102405161016052602061026060246370a082316101e0526101c051610200526101fc610160515afa61110557600080fd5b601f3d1161111257600080fd5b6000506102605161018052600960043560e05260c052604060c02054151561124957600b6101605160e05260c052604060c020546101e0526040366102003760406102e060446319d5c665610240526101c051610260526101e0516102805261025c600c545afa61118257600080fd5b603f3d1161118f57600080fd5b6102e08080808051610320525050602081019050808080516103405250505050600050610320805161020052806020015161022052506101805161020051808210156111da57600080fd5b80820390509050610220518181830110156111f457600080fd5b808201905090506101805260206102e0604463059c29ec610240526101c051610260526101e0516102805261025c600c545afa61123057600080fd5b601f3d1161123d57600080fd5b6000506102e0516101a0525b6101406101e080808084518152505060208101905080808460200151815250506020810190508080846040015181525050602081019050808084606001518152505060809050905060c05260c0516101e0f39050005b63489c7c7c60005114156112bd57336101405260006101605261132f565b63efc68b2060005114156112f15760006101605260843560a01c156112e157600080fd5b602060846101403760005061132f565b63fd22d70f60005114156113275760843560a01c1561130f57600080fd5b6020608461014037602060a46101603760005061132f565b600015611d7a575b60043560a01c1561133f57600080fd5b60243560a01c1561134f57600080fd5b604036610180376101605115156114da576006546101c0526101c0511515611454577f6033600c60003960336000f336600060003761100060003660007300000000006101e0526c01000000000000000000000000600454026101fb527f5af4602c57600080fd5b6110006000f30000000000000000000000000000000061020f5260606101e06000f0806113e357600080fd5b61018052610180513b6113f557600080fd5b600060006004638129fc1c6101e0526101fc6000610180515af161141857600080fd5b610180516101a052610180516101e0527f9663d922bbc250e8d974501d76ed29effb34ff751262543efd9d16393fb272ac60206101e0a16114d5565b6101c0805160018082101561146857600080fd5b808203905090508152506101c051640100000000811061148757600080fd5b600560c052602060c02001546101a0526101a05174010000000000000000000000000000000000000000808206905090508060a01c156114c657600080fd5b809050610180526101c0516006555b6116f2565b6101605174010000000000000000000000000000000000000000808206905090508060a01c1561150957600080fd5b80905061018052610160516101a05260006101605160e05260c052604060c020546101c0526101c0513318156116185760006101c0511415151561158c576308c379a06101e0526020610200526010610220527f556e6b6e6f776e20546f6b656e20494400000000000000000000000000000000610240526102205060646101fcfd5b60036101c05160e05260c052604060c0203360e05260c052604060c02054156115b65760016115cb565b60016101605160e05260c052604060c0205433145b5b1515611617576308c379a06101e052602061020052601f610220527f43616c6c6572206973206e6f74206f776e6572206f72206f70657261746f7200610240526102205060646101fcfd5b5b610140516101c05114151561166c576308c379a06101e0526020610200526015610220527f5265636569766572206973206e6f74206f776e65720000000000000000000000610240526102205060646101fcfd5b6024356020610240600463115f4fee6101e0526101fc610180515afa61169157600080fd5b601f3d1161169e57600080fd5b600050610240511415156116f1576308c379a061026052602061028052601c6102a0527f496e636f72726563742073796e746820666f7220546f6b656e204944000000006102c0526102a050606461027cfd5b5b6020610260602463493f4f746101e0526002610200526101fc6f22d53366457f9d5e68ec105046fc43835afa61172757600080fd5b601f3d1161173457600080fd5b600050610260516101c052600860043560e05260c052604060c020546101e0526000610200526004356101e05114156117c75760206102e060646323b872dd61022052336102405261018051610260526044356102805261023c60006004355af161179e57600080fd5b601f3d116117ab57600080fd5b6000506102e0516117bb57600080fd5b60443561020052611b52565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6004351815611adc5760006004610280527f23b872dd000000000000000000000000000000000000000000000000000000006102a0526102806004806020846102e001018260208501600060045af1505080518201915050336020826102e0010152602081019050306020826102e00101526020810190506044356020826102e0010152602081019050806102e0526102e090508051602001806103a08284600060045af161188a57600080fd5b505060206104806103a0516103c060006004355af16118a857600080fd5b60203d808211156118b957806118bb565b815b90509050610460526104608051602001806102208284600060045af16118e057600080fd5b505060006102205118156119335761022080602001516000825180602090131561190957600080fd5b809190121561191757600080fd5b806020036101000a8204905090509050151561193257600080fd5b5b600a60043560e05260c052604060c0206101c05160e05260c052604060c020541515611adb5760006004610280527f095ea7b3000000000000000000000000000000000000000000000000000000006102a0526102806004806020846102e001018260208501600060045af15050805182019150506101c0516020826102e00101526020810190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6020826102e0010152602081019050806102e0526102e090508051602001806103808284600060045af1611a0f57600080fd5b50506020610440610380516103a060006004355af1611a2d57600080fd5b60203d80821115611a3e5780611a40565b815b90509050610420526104208051602001806102208284600060045af1611a6557600080fd5b50506000610220511815611ab857610220806020015160008251806020901315611a8e57600080fd5b8091901215611a9c57600080fd5b806020036101000a82049050905090501515611ab757600080fd5b5b6001600a60043560e05260c052604060c0206101c05160e05260c052604060c020555b5b602061034060c4631a4c1ca36102205260076101e05160e05260c052604060c0205461024052600435610260526101e051610280526044356102a05260006102c052610180516102e05261023c346101c0515af1611b3957600080fd5b601f3d11611b4657600080fd5b60005061034051610200525b60206102c060246370a0823161024052610180516102605261025c6024355afa611b7b57600080fd5b601f3d11611b8857600080fd5b6000506102c0516102205260206103206084637122acfb61024052602435610260526102005161028052600b6101e05160e05260c052604060c020546102a052600b60243560e05260c052604060c020546102c05261025c6000610180515af1611bf157600080fd5b601f3d11611bfe57600080fd5b6000506103205060206102e060246370a0823161026052610180516102805261027c6024355afa611c2e57600080fd5b601f3d11611c3b57600080fd5b6000506102e05161024052606435610240516102205180821015611c5e57600080fd5b8082039050905010151515611cb2576308c379a06102605260206102805260106102a0527f52656b7420627920736c697070616765000000000000000000000000000000006102c0526102a050606461027cfd5b610160511515611d31576101405160006101a05160e05260c052604060c0205560026101405160e05260c052604060c02080546001818183011015611cf657600080fd5b808201905090508155506101a0516101405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60006000a45b6102405161026052602435610140516101a0517f72946db909d02e0ff93d1e9ff43433f9740b00add96b36bd7df362987648bc8d6020610260a46101a05160005260206000f350005b636adadd5a6000511415611d92573361014052611dc8565b63dc4606586000511415611dc05760843560a01c15611db057600080fd5b6020608461014037600050611dc8565b600015612193575b3415611dd357600080fd5b60243560a01c15611de357600080fd5b600060043560e05260c052604060c0205461016052600060043560e05260c052604060c02054331815611eee5760006101605114151515611e63576308c379a06101805260206101a05260106101c0527f556e6b6e6f776e20546f6b656e204944000000000000000000000000000000006101e0526101c050606461019cfd5b60036101605160e05260c052604060c0203360e05260c052604060c0205415611e8d576001611ea1565b600160043560e05260c052604060c0205433145b5b1515611eed576308c379a06101805260206101a052601f6101c0527f43616c6c6572206973206e6f74206f776e6572206f72206f70657261746f72006101e0526101c050606461019cfd5b5b60043574010000000000000000000000000000000000000000808206905090508060a01c15611f1c57600080fd5b80905061018052600860243560e05260c052604060c020546101a05260076101a05160e05260c052604060c020546101c052600960043560e05260c052604060c020541515611fce57600b6101a05160e05260c052604060c020546101e052600c543b611f8857600080fd5b600060006044631b16802c6102005261018051610220526101e0516102405261021c6000600c545af1611fba57600080fd5b6001600960043560e05260c052604060c020555b602061030060a463c955f5b461020052602435610220526101c051610240526044356102605260643561028052610140516102a05261021c6000610180515af161201757600080fd5b601f3d1161202457600080fd5b600050610300516101e0526101e051151561214a576000600060043560e05260c052604060c020556000600160043560e05260c052604060c020556000600960043560e05260c052604060c0205560023360e05260c052604060c020805460018082101561209157600080fd5b8082039050905081555060065461020052600435740100000000000000000000000000000000000000008181830110156120ca57600080fd5b808201905090506102005164010000000081106120e657600080fd5b600560c052602060c020015561020051600181818301101561210757600080fd5b8082019050905060065560006101605260006101a0526004356000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60006000a45b6101e051610200526101a051610160516004357f72946db909d02e0ff93d1e9ff43433f9740b00add96b36bd7df362987648bc8d6020610200a46101e05160005260206000f350005b63441a3e7060005114156121ab5733610140526121e1565b630ad58d2f60005114156121d95760443560a01c156121c957600080fd5b60206044610140376000506121e1565b600015612595575b34156121ec57600080fd5b600060043560e05260c052604060c0205461016052600060043560e05260c052604060c020543318156122f7576000610160511415151561226c576308c379a06101805260206101a05260106101c0527f556e6b6e6f776e20546f6b656e204944000000000000000000000000000000006101e0526101c050606461019cfd5b60036101605160e05260c052604060c0203360e05260c052604060c02054156122965760016122aa565b600160043560e05260c052604060c0205433145b5b15156122f6576308c379a06101805260206101a052601f6101c0527f43616c6c6572206973206e6f74206f776e6572206f72206f70657261746f72006101e0526101c050606461019cfd5b5b60043574010000000000000000000000000000000000000000808206905090508060a01c1561232557600080fd5b809050610180526020610220600463115f4fee6101c0526101dc610180515afa61234e57600080fd5b601f3d1161235b57600080fd5b600050610220516101a052600960043560e05260c052604060c0205415156123e657600b6101a05160e05260c052604060c020546101c052600c543b6123a057600080fd5b600060006044631b16802c6101e05261018051610200526101c051610220526101fc6000600c545af16123d257600080fd5b6001600960043560e05260c052604060c020555b6020610280604463f3fef3a36101e0526101405161020052602435610220526101fc6000610180515af161241957600080fd5b601f3d1161242657600080fd5b600050610280516101c0526101c051151561254c576000600060043560e05260c052604060c020556000600160043560e05260c052604060c020556000600960043560e05260c052604060c0205560023360e05260c052604060c020805460018082101561249357600080fd5b808203905090508155506006546101e052600435740100000000000000000000000000000000000000008181830110156124cc57600080fd5b808201905090506101e05164010000000081106124e857600080fd5b600560c052602060c02001556101e051600181818301101561250957600080fd5b8082019050905060065560006101605260006101a0526004356000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60006000a45b6101c0516101e0526101a051610160516004357f72946db909d02e0ff93d1e9ff43433f9740b00add96b36bd7df362987648bc8d60206101e0a46101c05160005260206000f350005b638df82800600051141561270a5734156125ae57600080fd5b600960043560e05260c052604060c0205415156126fd576000600060043560e05260c052604060c0205414151515612625576308c379a0610140526020610160526010610180527f556e6b6e6f776e20546f6b656e204944000000000000000000000000000000006101a05261018050606461015cfd5b60043574010000000000000000000000000000000000000000808206905090508060a01c1561265357600080fd5b8090506101405260206101e0600463115f4fee6101805261019c610140515afa61267c57600080fd5b601f3d1161268957600080fd5b6000506101e05161016052600b6101605160e05260c052604060c0205461018052600c543b6126b757600080fd5b600060006044631b16802c6101a052610140516101c052610180516101e0526101bc6000600c545af16126e957600080fd5b6001600960043560e05260c052604060c020555b600160005260206000f350005b63fe1e897b600051141561293557341561272357600080fd5b60043560a01c1561273357600080fd5b60243560a01c1561274357600080fd5b600760043560e05260c052604060c020541561275e57600080fd5b60206101a0600463dbd06c856101405261015c60006004355af161278157600080fd5b601f3d1161278e57600080fd5b6000506101a051600b60043560e05260c052604060c0205560206101c0600463a262904b6101605261017c6f22d53366457f9d5e68ec105046fc43835afa6127d557600080fd5b601f3d116127e257600080fd5b6000506101c051610140526101006102e06024639ac90d3d610260526024356102805261027c610140515afa61281757600080fd5b60ff3d1161282457600080fd5b6000506102e080516101605280602001516101805280604001516101a05280606001516101c05280608001516101e0528060a00151610200528060c00151610220528060e0015161024052506000610260526102a060006008818352015b60206102a051026101600151610280526102805115156128ae57610260516128a957600080fd5b6128fc565b6004356102805114156128d657602435600760043560e05260c052604060c020556001610260525b60043560086102805160e05260c052604060c020555b8151600101808352811415612882575b5050600435610280526024356102a0527f9f8815bba4c2fe0a80beb8f1257105a9bef3466417d3d962974b6be33a2a8a386040610280a1005b637418536060005114156129bf57341561294e57600080fd5b60206101c060246321f8a721610140527f45786368616e67657200000000000000000000000000000000000000000000006101605261015c734e3b31eb0e5cb73641ee1e65e7dcefe520ba3ef25afa6129a657600080fd5b601f3d116129b357600080fd5b6000506101c051600c55005b63294bb4d36000511415612a045734156129d857600080fd5b60043560a01c156129e857600080fd5b600760043560e05260c052604060c0205460005260206000f350005b63d922eccd6000511415612a49573415612a1d57600080fd5b60043560a01c15612a2d57600080fd5b600860043560e05260c052604060c0205460005260206000f350005b638906c4e06000511415612a7e573415612a6257600080fd5b600960043560e05260c052604060c0205460005260206000f350005b5b60006000fd

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

00000000000000000000000082c1cc1685be4825400854ce5b1c7d86da75b7ac0000000000000000000000000000000000000000000000000000000000000005

-----Decoded View---------------
Arg [0] : _settler_implementation (address): 0x82c1cc1685Be4825400854ce5b1c7d86DA75B7AC
Arg [1] : _settler_count (uint256): 5

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000082c1cc1685be4825400854ce5b1c7d86da75b7ac
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000005


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.