Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x6020610b | 15450653 | 765 days ago | IN | 0 ETH | 0.00761885 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH | ||||
20881364 | 2 days ago | 0.00203757 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Vyper_contract
Compiler Version
vyper:0.3.1
Contract Source Code (Vyper language format)
# @version 0.3.1 """ @notice Curve Arbitrum Bridge Wrapper """ from vyper.interfaces import ERC20 interface GatewayRouter: def getGateway(_token: address) -> address: view def outboundTransferCustomRefund( # emits DepositInitiated event with Inbox sequence # _token: address, _refund_to: address, _to: address, _amount: uint256, _max_gas: uint256, _gas_price_bid: uint256, _data: Bytes[128], # _max_submission_cost, _extra_data ): payable def getOutboundCalldata( _token: address, _from: address, _to: address, _amount: uint256, _data: Bytes[128] ) -> (uint256, uint256): view # actually returns bytes, but we just need the size interface Inbox: def calculateRetryableSubmissionFee(_data_length: uint256, _base_fee: uint256) -> uint256: view event TransferOwnership: _old_owner: address _new_owner: address event UpdateSubmissionData: _old_submission_data: uint256[2] _new_submission_data: uint256[2] CRV20: constant(address) = 0xD533a949740bb3306d119CC777fa900bA034cd52 GATEWAY: constant(address) = 0xa3A7B6F88361F48403514059F1F16C8E78d60EeC GATEWAY_ROUTER: constant(address) = 0x72Ce9c846789fdB6fC1f34aC4AD25Dd9ef7031ef INBOX: constant(address) = 0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f # [gas_limit uint128][gas_price uint128] submission_data: uint256 is_approved: public(HashMap[address, bool]) is_killed: public(bool) owner: public(address) future_owner: public(address) @external def __init__(_gas_limit: uint256, _gas_price: uint256): for value in [_gas_limit, _gas_price]: assert value < 2 ** 128 self.submission_data = shift(_gas_limit, 128) + _gas_price log UpdateSubmissionData([0, 0], [_gas_limit, _gas_price]) assert ERC20(CRV20).approve(GATEWAY, MAX_UINT256) self.is_approved[CRV20] = True self.owner = msg.sender log TransferOwnership(ZERO_ADDRESS, msg.sender) @payable @external def bridge(_token: address, _to: address, _amount: uint256): """ @notice Bridge an ERC20 token using the Arbitrum standard bridge @param _token The address of the token to bridge @param _to The address to deposit token to on L2 @param _amount The amount of `_token` to deposit """ assert not self.is_killed assert ERC20(_token).transferFrom(msg.sender, self, _amount) if _token != CRV20 and not self.is_approved[_token]: assert ERC20(_token).approve(GatewayRouter(GATEWAY_ROUTER).getGateway(_token), MAX_UINT256) self.is_approved[_token] = True data: uint256 = self.submission_data gas_limit: uint256 = shift(data, -128) gas_price: uint256 = data % 2 ** 128 submission_cost: uint256 = Inbox(INBOX).calculateRetryableSubmissionFee( GatewayRouter(GATEWAY_ROUTER).getOutboundCalldata( _token, self, msg.sender, _amount, b"", )[1] + 256, block.basefee ) # NOTE: Excess ETH fee is refunded to this bridger's address on L2. # After bridging, the token should arrive on Arbitrum within 10 minutes. If it # does not, the L2 transaction may have failed due to an insufficient amount # within `max_submission_cost + (gas_limit * gas_price)` # In this case, the transaction can be manually broadcasted on Arbitrum by calling # `ArbRetryableTicket(0x000000000000000000000000000000000000006e).redeem(redemption-TxID)` # The calldata for this manual transaction is easily obtained by finding the reverted # transaction in the tx history for 0x000000000000000000000000000000000000006e on Arbiscan. # https://developer.offchainlabs.com/docs/l1_l2_messages#retryable-transaction-lifecycle GatewayRouter(GATEWAY_ROUTER).outboundTransferCustomRefund( _token, self.owner, _to, _amount, gas_limit, gas_price, _abi_encode(submission_cost, b""), value=gas_limit * gas_price + submission_cost ) if self.balance != 0: raw_call(msg.sender, b"", value=self.balance) @view @external def cost() -> uint256: """ @notice Cost in ETH to bridge """ submission_cost: uint256 = Inbox(INBOX).calculateRetryableSubmissionFee( GatewayRouter(GATEWAY_ROUTER).getOutboundCalldata( CRV20, self, msg.sender, 10 ** 36, b"", )[1] + 256, block.basefee ) data: uint256 = self.submission_data # gas_limit * gas_price return shift(data, -128) * data % 2 ** 128 + submission_cost @pure @external def check(_account: address) -> bool: """ @notice Verify if `_account` is allowed to bridge using `transmit_emissions` @param _account The account calling `transmit_emissions` """ return True @external def set_submission_data(_gas_limit: uint256, _gas_price: uint256): """ @notice Update the arb retryable ticket submission data @param _gas_limit The gas limit for the retryable ticket tx @param _gas_price The gas price for the retryable ticket tx """ assert msg.sender == self.owner for value in [_gas_limit, _gas_price]: assert value < 2 ** 128 data: uint256 = self.submission_data self.submission_data = shift(_gas_limit, 128) + _gas_price log UpdateSubmissionData( [shift(data, -128), data % 2 ** 128], [_gas_limit, _gas_price] ) @external def set_killed(_is_killed: bool): assert msg.sender == self.owner self.is_killed = _is_killed @external def commit_transfer_ownership(_future_owner: address): """ @notice Transfer ownership to `_future_owner` @param _future_owner The account to commit as the future owner """ assert msg.sender == self.owner # dev: only owner self.future_owner = _future_owner @external def accept_transfer_ownership(): """ @notice Accept the transfer of ownership @dev Only the committed future owner can call this function """ assert msg.sender == self.future_owner # dev: only future owner assert not msg.sender.is_contract log TransferOwnership(self.owner, msg.sender) self.owner = msg.sender @view @external def gas_limit() -> uint256: """ @notice Get gas limit used for L2 retryable ticket """ return shift(self.submission_data, -128) @view @external def gas_price() -> uint256: """ @notice Get gas price used for L2 retryable ticket """ return self.submission_data % 2 ** 128
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"name":"TransferOwnership","inputs":[{"name":"_old_owner","type":"address","indexed":false},{"name":"_new_owner","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"UpdateSubmissionData","inputs":[{"name":"_old_submission_data","type":"uint256[2]","indexed":false},{"name":"_new_submission_data","type":"uint256[2]","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_gas_limit","type":"uint256"},{"name":"_gas_price","type":"uint256"}],"outputs":[]},{"stateMutability":"payable","type":"function","name":"bridge","inputs":[{"name":"_token","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"outputs":[],"gas":150263},{"stateMutability":"view","type":"function","name":"cost","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":13736},{"stateMutability":"pure","type":"function","name":"check","inputs":[{"name":"_account","type":"address"}],"outputs":[{"name":"","type":"bool"}],"gas":571},{"stateMutability":"nonpayable","type":"function","name":"set_submission_data","inputs":[{"name":"_gas_limit","type":"uint256"},{"name":"_gas_price","type":"uint256"}],"outputs":[],"gas":43159},{"stateMutability":"nonpayable","type":"function","name":"set_killed","inputs":[{"name":"_is_killed","type":"bool"}],"outputs":[],"gas":37725},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"_future_owner","type":"address"}],"outputs":[],"gas":37755},{"stateMutability":"nonpayable","type":"function","name":"accept_transfer_ownership","inputs":[],"outputs":[],"gas":44530},{"stateMutability":"view","type":"function","name":"gas_limit","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2676},{"stateMutability":"view","type":"function","name":"gas_price","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2730},{"stateMutability":"view","type":"function","name":"is_approved","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"bool"}],"gas":2996},{"stateMutability":"view","type":"function","name":"is_killed","inputs":[],"outputs":[{"name":"","type":"bool"}],"gas":2760},{"stateMutability":"view","type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2790},{"stateMutability":"view","type":"function","name":"future_owner","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2820}]
Contract Creation Code
6020610b186080396080516101205260206020610b18016080396080516101405261010060006002818352015b60206101005102610120015160e05270010000000000000000000000000000000060e0511015610b1357815160010180835281141561002c5750506020610b1860803960805160801b60206020610b18016080396080518181830110610b1357808201905090506000557f08304c417384e677bfe0075c0373b3004aec0f73a9f7cd734d5065fe679f31cb600060e0526000610100526020610b186080396080516101205260206020610b180160803960805161014052608060e0a163095ea7b360e05273a3a7b6f88361f48403514059f1f16c8e78d60eec610100527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61012052602060e0604460fc600073d533a949740bb3306d119cc777fa900ba034cd525af161015e573d600060003e3d6000fd5b601f3d1115610b135760e05115610b13576001600173d533a949740bb3306d119cc777fa900ba034cd5260a052608052604060802055336003557f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c600060e0523361010052604060e0a1610afb56600436101561000d57610923565b60046000601c37600051638712175981186104dc576004358060a01c6109295760e0526024358060a01c6109295761010052600254610929576323b872dd6101205233610140523061016052604435610180526020610120606461013c600060e0515af1610080573d600060003e3d6000fd5b601f3d11156109295761012051156109295773d533a949740bb3306d119cc777fa900ba034cd5260e05114156100b75760006100ca565b600160e05160a052608052604060802054155b1561019c5763095ea7b36101605263bda009fe6101205260e051610140526020610120602461013c7372ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef5afa610118573d600060003e3d6000fd5b601f3d111561092957610120518060a01c61092957610180527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101a0526020610160604461017c600060e0515af1610176573d600060003e3d6000fd5b601f3d1115610929576101605115610929576001600160e05160a0526080526040608020555b600054610120526101205160801c6101405261012051700100000000000000000000000000000000808206905090506101605263a66b327d6102a052602063a0c76a966101c0526101e08060a060e0518252602082019150308252602082019150338252602082019150604435825260208201915080825260006101a0526101a0818401808280516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050905081015050505060406101c060c46101dc7372ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef5afa6102a0573d600060003e3d6000fd5b603f3d1115610929576101c00151610100818183011061092957808201905090506102c052486102e05260206102a060446102bc734dbd4fc535ac27206064b68ffcf827b0a60bab3f5afa6102fa573d600060003e3d6000fd5b601f3d1115610929576102a05161018052634fb1a07b610240526102608060e060e0518252602082019150600354825260208201915061010051825260208201915060443582526020820191506101405182526020820191506101605182526020820191508082526101e080604061018051825260208201915080825260006101a0526101a0818401808280516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050905081019050905090506101c0526101c0818401808280516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f82010390509050905090508101505050507372ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef3b15610929576000600061016461025c6101405161016051808202821582848304141715610929579050905061018051818183011061092957808201905090507372ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef5af16104aa573d600060003e3d6000fd5b600047146104da5760006101a0526101a050600060006101a0516101c047335af16104da573d600060003e3d6000fd5b005b34610929576313faede681186106a35763a66b327d61020052602063a0c76a96610120526101408060a073d533a949740bb3306d119cc777fa900ba034cd5282526020820191503082526020820191503382526020820191506ec097ce7bc90715b34b9f10000000008252602082019150808252600061010052610100818401808280516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f8201039050905090509050810150505050604061012060c461013c7372ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef5afa6105dc573d600060003e3d6000fd5b603f3d1115610929576101200151610100818183011061092957808201905090506102205248610240526020610200604461021c734dbd4fc535ac27206064b68ffcf827b0a60bab3f5afa610636573d600060003e3d6000fd5b601f3d1115610929576102005160e052600054610100526101005160801c6101005180820282158284830414171561092957905090507001000000000000000000000000000000008082069050905060e05181818301106109295780820190509050610120526020610120f35b63c23697a881186106c9576004358060a01c6109295760e0526001610100526020610100f35b63da4f27d581186107b557600354331861092957600435610120526024356101405261010060006002818352015b60206101005102610120015160e05270010000000000000000000000000000000060e05110156109295781516001018083528114156106f757505060005460e05260043560801b602435818183011061092957808201905090506000557f08304c417384e677bfe0075c0373b3004aec0f73a9f7cd734d5065fe679f31cb60e05160801c6101005260e051700100000000000000000000000000000000808206905090506101205260043561014052602435610160526080610100a1005b6390b2299781186107df576004358060011c6109295760e05260035433186109295760e051600255005b636b441a408118610809576004358060a01c6109295760e05260035433186109295760e051600455005b63e5ea47b8811861085d576004543318610929576000333b11610929577f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c60035460e0523361010052604060e0a133600355005b63d4180b5881186108775760005460801c60e052602060e0f35b63eae0414981186108a7576000547001000000000000000000000000000000008082069050905060e052602060e0f35b63dddb21fb81186108dc576004358060a01c6109295760e052600160e05160a052608052604060802054610100526020610100f35b639c868ac081186108f35760025460e052602060e0f35b638da5cb5b811861090a5760035460e052602060e0f35b631ec0cdc181186109215760045460e052602060e0f35b505b60006000fd5b600080fd5b6101cd610afb036101cd6000396101cd610afb036000f35b600080fd00000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000000000000000000000000000000077359400
Deployed Bytecode
0x600436101561000d57610923565b60046000601c37600051638712175981186104dc576004358060a01c6109295760e0526024358060a01c6109295761010052600254610929576323b872dd6101205233610140523061016052604435610180526020610120606461013c600060e0515af1610080573d600060003e3d6000fd5b601f3d11156109295761012051156109295773d533a949740bb3306d119cc777fa900ba034cd5260e05114156100b75760006100ca565b600160e05160a052608052604060802054155b1561019c5763095ea7b36101605263bda009fe6101205260e051610140526020610120602461013c7372ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef5afa610118573d600060003e3d6000fd5b601f3d111561092957610120518060a01c61092957610180527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101a0526020610160604461017c600060e0515af1610176573d600060003e3d6000fd5b601f3d1115610929576101605115610929576001600160e05160a0526080526040608020555b600054610120526101205160801c6101405261012051700100000000000000000000000000000000808206905090506101605263a66b327d6102a052602063a0c76a966101c0526101e08060a060e0518252602082019150308252602082019150338252602082019150604435825260208201915080825260006101a0526101a0818401808280516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050905081015050505060406101c060c46101dc7372ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef5afa6102a0573d600060003e3d6000fd5b603f3d1115610929576101c00151610100818183011061092957808201905090506102c052486102e05260206102a060446102bc734dbd4fc535ac27206064b68ffcf827b0a60bab3f5afa6102fa573d600060003e3d6000fd5b601f3d1115610929576102a05161018052634fb1a07b610240526102608060e060e0518252602082019150600354825260208201915061010051825260208201915060443582526020820191506101405182526020820191506101605182526020820191508082526101e080604061018051825260208201915080825260006101a0526101a0818401808280516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050905081019050905090506101c0526101c0818401808280516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f82010390509050905090508101505050507372ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef3b15610929576000600061016461025c6101405161016051808202821582848304141715610929579050905061018051818183011061092957808201905090507372ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef5af16104aa573d600060003e3d6000fd5b600047146104da5760006101a0526101a050600060006101a0516101c047335af16104da573d600060003e3d6000fd5b005b34610929576313faede681186106a35763a66b327d61020052602063a0c76a96610120526101408060a073d533a949740bb3306d119cc777fa900ba034cd5282526020820191503082526020820191503382526020820191506ec097ce7bc90715b34b9f10000000008252602082019150808252600061010052610100818401808280516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f8201039050905090509050810150505050604061012060c461013c7372ce9c846789fdb6fc1f34ac4ad25dd9ef7031ef5afa6105dc573d600060003e3d6000fd5b603f3d1115610929576101200151610100818183011061092957808201905090506102205248610240526020610200604461021c734dbd4fc535ac27206064b68ffcf827b0a60bab3f5afa610636573d600060003e3d6000fd5b601f3d1115610929576102005160e052600054610100526101005160801c6101005180820282158284830414171561092957905090507001000000000000000000000000000000008082069050905060e05181818301106109295780820190509050610120526020610120f35b63c23697a881186106c9576004358060a01c6109295760e0526001610100526020610100f35b63da4f27d581186107b557600354331861092957600435610120526024356101405261010060006002818352015b60206101005102610120015160e05270010000000000000000000000000000000060e05110156109295781516001018083528114156106f757505060005460e05260043560801b602435818183011061092957808201905090506000557f08304c417384e677bfe0075c0373b3004aec0f73a9f7cd734d5065fe679f31cb60e05160801c6101005260e051700100000000000000000000000000000000808206905090506101205260043561014052602435610160526080610100a1005b6390b2299781186107df576004358060011c6109295760e05260035433186109295760e051600255005b636b441a408118610809576004358060a01c6109295760e05260035433186109295760e051600455005b63e5ea47b8811861085d576004543318610929576000333b11610929577f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c60035460e0523361010052604060e0a133600355005b63d4180b5881186108775760005460801c60e052602060e0f35b63eae0414981186108a7576000547001000000000000000000000000000000008082069050905060e052602060e0f35b63dddb21fb81186108dc576004358060a01c6109295760e052600160e05160a052608052604060802054610100526020610100f35b639c868ac081186108f35760025460e052602060e0f35b638da5cb5b811861090a5760035460e052602060e0f35b631ec0cdc181186109215760045460e052602060e0f35b505b60006000fd5b600080fd
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000000000000000000000000000000077359400
-----Decoded View---------------
Arg [0] : _gas_limit (uint256): 1000000
Arg [1] : _gas_price (uint256): 2000000000
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000f4240
Arg [1] : 0000000000000000000000000000000000000000000000000000000077359400
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ 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.