Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 2,231 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deposit | 21593874 | 28 hrs ago | IN | 0 ETH | 0.00062825 | ||||
Deposit | 21591338 | 37 hrs ago | IN | 0 ETH | 0.00045323 | ||||
Deposit | 21588342 | 47 hrs ago | IN | 0 ETH | 0.00125695 | ||||
Withdraw | 21581594 | 2 days ago | IN | 0 ETH | 0.0011842 | ||||
Deposit | 21577076 | 3 days ago | IN | 0 ETH | 0.00055606 | ||||
Deposit | 21575779 | 3 days ago | IN | 0 ETH | 0.00091118 | ||||
Withdraw | 21574811 | 3 days ago | IN | 0 ETH | 0.00150245 | ||||
Withdraw | 21574720 | 3 days ago | IN | 0 ETH | 0.00123332 | ||||
Deposit | 21569622 | 4 days ago | IN | 0 ETH | 0.00080373 | ||||
Withdraw | 21562465 | 5 days ago | IN | 0 ETH | 0.00043374 | ||||
Withdraw | 21559433 | 6 days ago | IN | 0 ETH | 0.00071329 | ||||
Deposit | 21559101 | 6 days ago | IN | 0 ETH | 0.00154842 | ||||
Withdraw | 21557378 | 6 days ago | IN | 0 ETH | 0.00040149 | ||||
Deposit | 21554361 | 6 days ago | IN | 0 ETH | 0.00053792 | ||||
Deposit | 21554324 | 6 days ago | IN | 1 wei | 0.00081732 | ||||
Deposit | 21549173 | 7 days ago | IN | 0 ETH | 0.00050164 | ||||
Deposit | 21545587 | 7 days ago | IN | 0 ETH | 0.0018031 | ||||
Withdraw | 21541559 | 8 days ago | IN | 0 ETH | 0.00062653 | ||||
Deposit | 21541509 | 8 days ago | IN | 0 ETH | 0.00064171 | ||||
Deposit | 21541504 | 8 days ago | IN | 0 ETH | 0.0007488 | ||||
Deposit | 21537302 | 9 days ago | IN | 0 ETH | 0.00144533 | ||||
Deposit | 21536533 | 9 days ago | IN | 0 ETH | 0.00123557 | ||||
Deposit | 21536078 | 9 days ago | IN | 0 ETH | 0.00153385 | ||||
Deposit | 21535994 | 9 days ago | IN | 0 ETH | 0.00125541 | ||||
Deposit | 21530681 | 10 days ago | IN | 0 ETH | 0.00343666 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
21593874 | 28 hrs ago | 1 wei | ||||
21591338 | 37 hrs ago | 1 wei | ||||
21588342 | 47 hrs ago | 1 wei | ||||
21577076 | 3 days ago | 1 wei | ||||
21575779 | 3 days ago | 1 wei | ||||
21569622 | 4 days ago | 1 wei | ||||
21559101 | 6 days ago | 1 wei | ||||
21554361 | 6 days ago | 1 wei | ||||
21554324 | 6 days ago | 1 wei | ||||
21549173 | 7 days ago | 1 wei | ||||
21545587 | 7 days ago | 1 wei | ||||
21541509 | 8 days ago | 1 wei | ||||
21541504 | 8 days ago | 1 wei | ||||
21537302 | 9 days ago | 1 wei | ||||
21536533 | 9 days ago | 1 wei | ||||
21536078 | 9 days ago | 1 wei | ||||
21535994 | 9 days ago | 1 wei | ||||
21530681 | 10 days ago | 1 wei | ||||
21527004 | 10 days ago | 1 wei | ||||
21525716 | 10 days ago | 1 wei | ||||
21517958 | 11 days ago | 1 wei | ||||
21511963 | 12 days ago | 1 wei | ||||
21508427 | 13 days ago | 1 wei | ||||
21504699 | 13 days ago | 1 wei | ||||
21504293 | 13 days ago | 1 wei |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x0763B9b7...85a248c63 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
LordsL1Bridge
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20Like { function transfer(address to, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool success); } interface IStarknetCore { /** Sends a message to an L2 contract. Returns the hash of the message. */ function sendMessageToL2( uint256 toAddress, uint256 selector, uint256[] calldata payload ) external payable returns (bytes32); /** Consumes a message that was sent from an L2 contract. Returns the hash of the message. */ function consumeMessageFromL2( uint256 fromAddress, uint256[] calldata payload ) external returns (bytes32); } contract LordsL1Bridge { /// @notice The Starknet Core contract address on L1 address public immutable starknet; /// @notice The $LORDS ERC20 contract address on L1 address public immutable l1Token; /// @notice The L2 address of the $LORDS bridge, the counterpart to this contract uint256 public immutable l2Bridge; event LogDeposit( address indexed l1Sender, uint256 amount, uint256 l2Recipient ); event LogWithdrawal(address indexed l1Recipient, uint256 amount); // 2 ** 251 + 17 * 2 ** 192 + 1; uint256 private constant CAIRO_PRIME = 3618502788666131213697322783095070105623107215331596699973092056135872020481; // from starkware.starknet.compiler.compile import get_selector_from_name // print(get_selector_from_name('handle_deposit')) uint256 private constant DEPOSIT_SELECTOR = 1285101517810983806491589552491143496277809242732141897358598292095611420389; // operation ID sent in the L2 -> L1 message uint256 private constant PROCESS_WITHDRAWAL = 1; function splitUint256(uint256 value) internal pure returns (uint256, uint256) { uint256 low = value & ((1 << 128) - 1); uint256 high = value >> 128; return (low, high); } constructor( address _starknet, address _l1Token, uint256 _l2Bridge ) { require(_l2Bridge < CAIRO_PRIME, "Invalid L2 bridge address"); starknet = _starknet; l1Token = _l1Token; l2Bridge = _l2Bridge; } /// @notice Function used to bridge $LORDS from L1 to L2 /// @param amount How many $LORDS to send from msg.sender /// @param l2Recipient To which L2 address should we deposit the $LORDS to /// @param fee Compulsory fee paid to the sequencer for passing on the message function deposit(uint256 amount, uint256 l2Recipient, uint256 fee) external payable { require(amount > 0, "Amount is 0"); require( l2Recipient != 0 && l2Recipient != l2Bridge && l2Recipient < CAIRO_PRIME, "Invalid L2 recipient" ); uint256[] memory payload = new uint256[](3); payload[0] = l2Recipient; (payload[1], payload[2]) = splitUint256(amount); IERC20Like(l1Token).transferFrom(msg.sender, address(this), amount); IStarknetCore(starknet).sendMessageToL2{value: fee}( l2Bridge, DEPOSIT_SELECTOR, payload ); emit LogDeposit(msg.sender, amount, l2Recipient); } /// @notice Function to process the L2 withdrawal /// @param amount How many $LORDS were sent from L2 /// @param l1Recipient Recipient of the (de)bridged $LORDS function withdraw(uint256 amount, address l1Recipient) external { uint256[] memory payload = new uint256[](4); payload[0] = PROCESS_WITHDRAWAL; payload[1] = uint256(uint160(l1Recipient)); (payload[2], payload[3]) = splitUint256(amount); // The call to consumeMessageFromL2 will succeed only if a // matching L2->L1 message exists and is ready for consumption. IStarknetCore(starknet).consumeMessageFromL2(l2Bridge, payload); IERC20Like(l1Token).transfer(l1Recipient, amount); emit LogWithdrawal(l1Recipient, amount); } }
{ "remappings": [ "create3-factory/=lib/create3-factory/src/", "ds-test/=lib/create3-factory/lib/forge-std/lib/ds-test/src/", "forge-std/=lib/create3-factory/lib/forge-std/src/", "solmate/=lib/create3-factory/lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_starknet","type":"address"},{"internalType":"address","name":"_l1Token","type":"address"},{"internalType":"uint256","name":"_l2Bridge","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"l1Sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"l2Recipient","type":"uint256"}],"name":"LogDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"l1Recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogWithdrawal","type":"event"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"l2Recipient","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"l1Token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l2Bridge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"starknet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"l1Recipient","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x6080604052600436106100485760003560e01c8062aeef8a1461004d578062f714ce14610062578063ae1f6aaf14610082578063bb903eea146100c9578063c01e1bd614610115575b600080fd5b61006061005b366004610697565b610149565b005b34801561006e57600080fd5b5061006061007d3660046106c3565b610453565b34801561008e57600080fd5b506100b67f07c76a71952ce3acd1f953fd2a3fda8564408b821ff367041c89f4452607663381565b6040519081526020015b60405180910390f35b3480156100d557600080fd5b506100fd7f000000000000000000000000c662c410c0ecf747543f5ba90660f6abebd9c8c481565b6040516001600160a01b0390911681526020016100c0565b34801561012157600080fd5b506100fd7f000000000000000000000000686f2404e77ab0d9070a46cdfb0b7fecdd2318b081565b6000831161018c5760405162461bcd60e51b815260206004820152600b60248201526a0416d6f756e7420697320360ac1b60448201526064015b60405180910390fd5b81158015906101bb57507f07c76a71952ce3acd1f953fd2a3fda8564408b821ff367041c89f445260766338214155b80156101d45750600167080000000000001160c01b0182105b6102175760405162461bcd60e51b8152602060048201526014602482015273125b9d985b1a5908130c881c9958da5c1a595b9d60621b6044820152606401610183565b6040805160038082526080820190925260009160208201606080368337019050509050828160008151811061024e5761024e6106ff565b60209081029190910101526001600160801b038416608085901c8260018151811061027b5761027b6106ff565b6020026020010183600281518110610295576102956106ff565b6020908102919091010191909152526040516323b872dd60e01b8152336004820152306024820152604481018590527f000000000000000000000000686f2404e77ab0d9070a46cdfb0b7fecdd2318b06001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610317573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033b9190610715565b50604051633e3aa6c560e01b81526001600160a01b037f000000000000000000000000c662c410c0ecf747543f5ba90660f6abebd9c8c41690633e3aa6c59084906103ce907f07c76a71952ce3acd1f953fd2a3fda8564408b821ff367041c89f44526076633907f02d757788a8d8d6f21d1cd40bce38a8222d70654214e96ff95d8086e684fbee5908790600401610779565b60206040518083038185885af11580156103ec573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061041191906107a1565b50604080518581526020810185905233917f9dbb0e7dda3e09710ce75b801addc87cf9d9c6c581641b3275fca409ad086c62910160405180910390a250505050565b60408051600480825260a082019092526000916020820160808036833701905050905060018160008151811061048b5761048b6106ff565b602002602001018181525050816001600160a01b0316816001815181106104b4576104b46106ff565b60209081029190910101526001600160801b038316608084901c826002815181106104e1576104e16106ff565b60200260200101836003815181106104fb576104fb6106ff565b60209081029190910101919091525260405162b2775760e61b81526001600160a01b037f000000000000000000000000c662c410c0ecf747543f5ba90660f6abebd9c8c41690632c9dd5c090610577907f07c76a71952ce3acd1f953fd2a3fda8564408b821ff367041c89f445260766339085906004016107ba565b6020604051808303816000875af1158015610596573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ba91906107a1565b5060405163a9059cbb60e01b81526001600160a01b038381166004830152602482018590527f000000000000000000000000686f2404e77ab0d9070a46cdfb0b7fecdd2318b0169063a9059cbb906044016020604051808303816000875af115801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e9190610715565b50816001600160a01b03167fb4214c8c54fc7442f36d3682f59aebaf09358a4431835b30efb29d52cf9e1e918460405161068a91815260200190565b60405180910390a2505050565b6000806000606084860312156106ac57600080fd5b505081359360208301359350604090920135919050565b600080604083850312156106d657600080fd5b8235915060208301356001600160a01b03811681146106f457600080fd5b809150509250929050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561072757600080fd5b8151801515811461073757600080fd5b9392505050565b600081518084526020808501945080840160005b8381101561076e57815187529582019590820190600101610752565b509495945050505050565b838152826020820152606060408201526000610798606083018461073e565b95945050505050565b6000602082840312156107b357600080fd5b5051919050565b8281526040602082015260006107d3604083018461073e565b94935050505056fea2646970667358221220c33ca61a720c683ac7046a76bc48edbb4eb382ab1903707ee5c9f04dfc65de2564736f6c63430008140033
Loading...
Loading
Loading...
Loading
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.