Overview
xDAI Balance
0 xDAI
xDAI Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Bridge | 33926648 | 207 days ago | IN | 0 xDAI | 0.00084369 |
View more zero value Internal Transactions in Advanced View mode
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
GnosisBridger
Compiler Version
vyper:0.3.10
Contract Source Code (Vyper language format)
# @version 0.3.10 """ @title GnosisBridger @notice Curve Gnosis (prev Xdai) Omni Bridge Wrapper """ from vyper.interfaces import ERC20 interface BridgedERC20: def allowance(_from: address, _to: address) -> uint256: view def balanceOf(_of: address) -> uint256: view def approve(_to: address, _amount: uint256) -> bool: nonpayable def transferFrom(_from: address, _to: address, _amount: uint256) -> bool: nonpayable def bridgeContract() -> address: view interface Bridge: def relayTokens(_token: BridgedERC20, _receiver: address, _value: uint256): nonpayable @external def bridge(_token: BridgedERC20, _to: address, _amount: uint256, _min_amount: uint256=0) -> uint256: """ @notice Bridge an asset using the Omni Bridge @param _token The ERC20 asset to bridge @param _to The receiver on Ethereum @param _amount The amount of `_token` to bridge @param _min_amount Minimum amount when to bridge @return Bridged amount """ amount: uint256 = _amount if amount == max_value(uint256): amount = _token.balanceOf(msg.sender) if amount < _min_amount: return 0 assert _token.transferFrom(msg.sender, self, amount, default_return_value=True) bridge: address = _token.bridgeContract() if _token.allowance(self, bridge) < amount: assert _token.approve(bridge, max_value(uint256), default_return_value=True) amount = _token.balanceOf(self) Bridge(bridge).relayTokens(_token, _to, amount) return amount @pure @external def cost() -> uint256: """ @notice Cost in ETH to bridge """ return 0 @pure @external def check(_account: address) -> bool: """ @notice Check if `_account` may bridge via `transmit_emissions` @param _account The account to check """ return True
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"stateMutability":"nonpayable","type":"function","name":"bridge","inputs":[{"name":"_token","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"bridge","inputs":[{"name":"_token","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_min_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"pure","type":"function","name":"cost","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"pure","type":"function","name":"check","inputs":[{"name":"_account","type":"address"}],"outputs":[{"name":"","type":"bool"}]}]
Contract Creation Code
61033061001161000039610330610000f35f3560e01c60026005820660011b61032601601e395f51565b6387121759811861031e57606436103417610322575f6080526100565661031e565b63e5361522811861031e57608436103417610322576064356080525b6004358060a01c610322576040526024358060a01c6103225760605260443560a05260a051196100b7576040516370a0823160c0523360e052602060c0602460dc845afa6100a6573d5f5f3e3d5ffd5b60203d106103225760c090505160a0525b60805160a05110156100d0575f60c052602060c06102cc565b6040516323b872dd60c0523360e052306101005260a05161012052602060c0606460dc5f855af1610103573d5f5f3e3d5ffd5b3d61011a57803b1561032257600161014052610132565b60203d106103225760c0518060011c61032257610140525b610140905051156103225760405163cd59658360e052602060e0600460fc845afa61015f573d5f5f3e3d5ffd5b60203d106103225760e0518060a01c610322576101205261012090505160c05260a05160405163dd62ed3e60e052306101005260c05161012052602060e0604460fc845afa6101b0573d5f5f3e3d5ffd5b60203d106103225760e090505110156102515760405163095ea7b36101405260c051610160527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610180526020610140604461015c5f855af1610215573d5f5f3e3d5ffd5b3d61022c57803b156103225760016101a052610245565b60203d1061032257610140518060011c610322576101a0525b6101a090505115610322575b6040516370a0823160e0523061010052602060e0602460fc845afa610278573d5f5f3e3d5ffd5b60203d106103225760e090505160a05260c05163ad58bdd160e052604051610100526060516101205260a05161014052803b15610322575f60e0606460fc5f855af16102c6573d5f5f3e3d5ffd5b50602060a05bf361031e565b6313faede6811861031e5734610322575f60405260206040f361031e565b63c23697a8811861031e57602436103417610322576004358060a01c61032257604052600160605260206060f35b5f5ffd5b5f80fd001802d202f0003a031e84190330810a00a16576797065728300030a0014
Deployed Bytecode
0x5f3560e01c60026005820660011b61032601601e395f51565b6387121759811861031e57606436103417610322575f6080526100565661031e565b63e5361522811861031e57608436103417610322576064356080525b6004358060a01c610322576040526024358060a01c6103225760605260443560a05260a051196100b7576040516370a0823160c0523360e052602060c0602460dc845afa6100a6573d5f5f3e3d5ffd5b60203d106103225760c090505160a0525b60805160a05110156100d0575f60c052602060c06102cc565b6040516323b872dd60c0523360e052306101005260a05161012052602060c0606460dc5f855af1610103573d5f5f3e3d5ffd5b3d61011a57803b1561032257600161014052610132565b60203d106103225760c0518060011c61032257610140525b610140905051156103225760405163cd59658360e052602060e0600460fc845afa61015f573d5f5f3e3d5ffd5b60203d106103225760e0518060a01c610322576101205261012090505160c05260a05160405163dd62ed3e60e052306101005260c05161012052602060e0604460fc845afa6101b0573d5f5f3e3d5ffd5b60203d106103225760e090505110156102515760405163095ea7b36101405260c051610160527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610180526020610140604461015c5f855af1610215573d5f5f3e3d5ffd5b3d61022c57803b156103225760016101a052610245565b60203d1061032257610140518060011c610322576101a0525b6101a090505115610322575b6040516370a0823160e0523061010052602060e0602460fc845afa610278573d5f5f3e3d5ffd5b60203d106103225760e090505160a05260c05163ad58bdd160e052604051610100526060516101205260a05161014052803b15610322575f60e0606460fc5f855af16102c6573d5f5f3e3d5ffd5b50602060a05bf361031e565b6313faede6811861031e5734610322575f60405260206040f361031e565b63c23697a8811861031e57602436103417610322576004358060a01c61032257604052600160605260206060f35b5f5ffd5b5f80fd001802d202f0003a031e
Loading...
Loading
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.