POL Price: $0.70074 (+0.86%)
 

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Commit_transfer_...213718452021-11-14 20:23:211118 days ago1636921401IN
Curve.fi: BridgeContract
0 POL0.0014064630

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.3.0

Optimization Enabled:
N/A

Other Settings:
MIT license

Contract Source Code (Vyper language format)

# @version 0.3.0
"""
@title Polygon Bridging Contract
@author Curve Finance
@license MIT
"""


interface BridgeToken:
    def withdraw(_amount: uint256): nonpayable
    def balanceOf(_user: address) -> uint256: view


event CommitOwnership:
    admin: address

event ApplyOwnership:
    admin: address

event AssetBridged:
    token: address
    amount: uint256


admin: public(address)
future_admin: public(address)


@external
def __init__(_admin: address):
    """
    @param _admin Contract owner. Should be the `PoolProxy` contract
                  used to handle fee burns.
    """
    self.admin = _admin


@external
def bridge(_token: address) -> bool:
    """
    @notice Transfer a token to the root chain via Anyswap.
    """
    assert msg.sender == self.admin

    amount: uint256 = BridgeToken(_token).balanceOf(self)
    BridgeToken(_token).withdraw(amount)

    log AssetBridged(_token, amount)
    return True


@external
def commit_transfer_ownership(_addr: address):
    """
    @notice Transfer ownership of GaugeController to `addr`
    @param _addr Address to have ownership transferred to
    """
    assert msg.sender == self.admin  # dev: admin only

    self.future_admin = _addr
    log CommitOwnership(_addr)


@external
def accept_transfer_ownership():
    """
    @notice Accept a pending ownership transfer
    """
    _admin: address = self.future_admin
    assert msg.sender == _admin  # dev: future admin only

    self.admin = _admin
    log ApplyOwnership(_admin)

Contract Security Audit

Contract ABI

[{"name":"CommitOwnership","inputs":[{"name":"admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"ApplyOwnership","inputs":[{"name":"admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"AssetBridged","inputs":[{"name":"token","type":"address","indexed":false},{"name":"amount","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_admin","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"bridge","inputs":[{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"bool"}],"gas":12314},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"_addr","type":"address"}],"outputs":[],"gas":39512},{"stateMutability":"nonpayable","type":"function","name":"accept_transfer_ownership","inputs":[],"outputs":[],"gas":39400},{"stateMutability":"view","type":"function","name":"admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2616},{"stateMutability":"view","type":"function","name":"future_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2646}]

602061022660c03960c0518060a01c61022157809050610140526101405160005561020956600436101561000d576101d9565b60046000601c37600051346101df576353ca57da8114156100ed576004358060a01c6101df57809050610140526000543314156101df576370a0823161018052306101a0526020610180602461019c610140515afa156101df57601f3d11156101df576101805161016052632e1a7d4d61018052610160516101a052610140513b156101df5760006000602461019c6000610140515af1156101df577fb42e435ec95cbbb7479b3af3aa14b852e7c137788d33bb7c4bab840b12281a786101405161018052610160516101a0526040610180a16001610180526020610180f35b636b441a4081141561014d576004358060a01c6101df57809050610140526000543314156101df57610140516001557f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e961014051610160526020610160a1005b63e5ea47b88114156101a35760015461014052610140513314156101df57610140516000557febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a118910561014051610160526020610160a1005b63f851a4408114156101bd57600054610140526020610140f35b6317f7182a8114156101d757600154610140526020610140f35b505b60006000fd5b600080fd5b61002561020903610025600039610025610209036000f35b600080fd0000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a

Deployed Bytecode

0x600436101561000d576101d9565b60046000601c37600051346101df576353ca57da8114156100ed576004358060a01c6101df57809050610140526000543314156101df576370a0823161018052306101a0526020610180602461019c610140515afa156101df57601f3d11156101df576101805161016052632e1a7d4d61018052610160516101a052610140513b156101df5760006000602461019c6000610140515af1156101df577fb42e435ec95cbbb7479b3af3aa14b852e7c137788d33bb7c4bab840b12281a786101405161018052610160516101a0526040610180a16001610180526020610180f35b636b441a4081141561014d576004358060a01c6101df57809050610140526000543314156101df57610140516001557f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e961014051610160526020610160a1005b63e5ea47b88114156101a35760015461014052610140513314156101df57610140516000557febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a118910561014051610160526020610160a1005b63f851a4408114156101bd57600054610140526020610140f35b6317f7182a8114156101d757600154610140526020610140f35b505b60006000fd5b600080fd

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

0000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a

-----Decoded View---------------
Arg [0] : _admin (address): 0x7EeAC6CDdbd1D0B8aF061742D41877D7F707289a

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a


Block Transaction 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
[ 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.