Source Code
Overview
ETH Balance
0.089715867575 ETH
Token Holdings
More Info
ContractCreator
Multichain Info
N/A
Latest 11 from a total of 11 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Add Whitelisted ... | 5012363 | 23 mins ago | IN | 0 ETH | 0.00000482 | ||||
Add Whitelisted ... | 4976035 | 13 hrs ago | IN | 0 ETH | 0.00000208 | ||||
Add Whitelisted ... | 4976033 | 13 hrs ago | IN | 0 ETH | 0.00000234 | ||||
Add Whitelisted ... | 4973925 | 14 hrs ago | IN | 0 ETH | 0.00000278 | ||||
Add Whitelisted ... | 4971477 | 15 hrs ago | IN | 0 ETH | 0.00000279 | ||||
Add Whitelisted ... | 4971282 | 15 hrs ago | IN | 0 ETH | 0.00000241 | ||||
Add Whitelisted ... | 4971274 | 15 hrs ago | IN | 0 ETH | 0.00000208 | ||||
Add Whitelisted ... | 4971271 | 15 hrs ago | IN | 0 ETH | 0.00000241 | ||||
Add Whitelisted ... | 4971077 | 15 hrs ago | IN | 0 ETH | 0.00000241 | ||||
Withdraw | 4971057 | 15 hrs ago | IN | 0 ETH | 0.00000222 | ||||
Transfer | 4971023 | 15 hrs ago | IN | 0.1 ETH | 0.00000253 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
5013088 | 10 mins ago | 0 ETH | ||||
5013088 | 10 mins ago | 0.00262086 ETH | ||||
5013088 | 10 mins ago | 0 ETH | ||||
5013088 | 10 mins ago | 0 ETH | ||||
5013088 | 10 mins ago | 0 ETH | ||||
5013065 | 10 mins ago | 0 ETH | ||||
5013065 | 10 mins ago | 0.00351158 ETH | ||||
5013065 | 10 mins ago | 0 ETH | ||||
5013065 | 10 mins ago | 0 ETH | ||||
5013065 | 10 mins ago | 0 ETH | ||||
5013006 | 11 mins ago | 0 ETH | ||||
5013006 | 11 mins ago | 0.00351158 ETH | ||||
5013006 | 11 mins ago | 0 ETH | ||||
5013006 | 11 mins ago | 0 ETH | ||||
5013006 | 11 mins ago | 0 ETH | ||||
5012363 | 23 mins ago | 0 ETH | ||||
5012363 | 23 mins ago | 0 ETH | ||||
4977974 | 12 hrs ago | 0 ETH | ||||
4977974 | 12 hrs ago | 0.00061531 ETH | ||||
4977974 | 12 hrs ago | 0 ETH | ||||
4977974 | 12 hrs ago | 0 ETH | ||||
4977974 | 12 hrs ago | 0 ETH | ||||
4977956 | 12 hrs ago | 0 ETH | ||||
4977956 | 12 hrs ago | 0.00000671 ETH | ||||
4977956 | 12 hrs ago | 0 ETH |
Loading...
Loading
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:
DYLIPaymaster
Compiler Version
v0.8.24+commit.e11b9ed9
ZkSolc Version
v1.5.7
Optimization Enabled:
Yes with Mode 3
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; import "./IPaymaster.sol"; contract DYLIPaymaster is IPaymaster { address constant BOOTLOADER = address(0x8001); address public owner; mapping(address => bool) public whitelistedContracts; modifier onlyOwner() { require(msg.sender == owner, "Not the owner"); _; } constructor() { owner = msg.sender; } function validateAndPayForPaymasterTransaction( bytes32, bytes32, Transaction calldata _transaction ) external payable returns (bytes4 magic, bytes memory context) { require( msg.sender == BOOTLOADER, "Only the Bootloader can call this function" ); // Check if the transaction is coming from a whitelisted contract require( whitelistedContracts[address(uint160(_transaction.to))], "Transaction not from a whitelisted contract" ); context = ""; magic = PAYMASTER_VALIDATION_SUCCESS_MAGIC; uint requiredETH = _transaction.gasLimit * _transaction.maxFeePerGas; (bool success, ) = BOOTLOADER.call{value: requiredETH}(""); require(success, "Bootloader call failed"); } function addWhitelistedContract(address _contract) external onlyOwner { require(_contract != address(0), "Invalid address"); whitelistedContracts[_contract] = true; } function removeWhitelistedContract(address _contract) external onlyOwner { require(_contract != address(0), "Invalid address"); whitelistedContracts[_contract] = false; } function withdraw(address payable _to, uint256 _amount) external onlyOwner { require(_to != address(0), "Invalid address"); require(_amount <= address(this).balance, "Insufficient balance"); (bool success, ) = _to.call{value: _amount}(""); require(success, "Withdraw failed"); } receive() external payable {} }
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; import "./Transaction.sol"; enum ExecutionResult { Revert, Success } bytes4 constant PAYMASTER_VALIDATION_SUCCESS_MAGIC = IPaymaster .validateAndPayForPaymasterTransaction .selector; interface IPaymaster { /// @dev Called by the bootloader to verify that the paymaster agrees to pay for the /// fee for the transaction. This transaction should also send the necessary amount of funds onto the bootloader /// address. /// @param _txHash The hash of the transaction /// @param _suggestedSignedHash The hash of the transaction that is signed by an EOA /// @param _transaction The transaction itself. /// @return magic The value that should be equal to the signature of the validateAndPayForPaymasterTransaction /// if the paymaster agrees to pay for the transaction. /// @return context The "context" of the transaction: an array of bytes of length at most 1024 bytes, which will be /// passed to the `postTransaction` method of the account. /// @dev The developer should strive to preserve as many steps as possible both for valid /// and invalid transactions as this very method is also used during the gas fee estimation /// (without some of the necessary data, e.g. signature). function validateAndPayForPaymasterTransaction( bytes32 _txHash, bytes32 _suggestedSignedHash, Transaction calldata _transaction ) external payable returns (bytes4 magic, bytes memory context); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; /// @notice Structure used to represent a zkSync transaction. struct Transaction { // The type of the transaction. uint256 txType; // The caller. uint256 from; // The callee. uint256 to; // The gasLimit to pass with the transaction. // It has the same meaning as Ethereum's gasLimit. uint256 gasLimit; // The maximum amount of gas the user is willing to pay for a byte of pubdata. uint256 gasPerPubdataByteLimit; // The maximum fee per gas that the user is willing to pay. // It is akin to EIP1559's maxFeePerGas. uint256 maxFeePerGas; // The maximum priority fee per gas that the user is willing to pay. // It is akin to EIP1559's maxPriorityFeePerGas. uint256 maxPriorityFeePerGas; // The transaction's paymaster. If there is no paymaster, it is equal to 0. uint256 paymaster; // The nonce of the transaction. uint256 nonce; // The value to pass with the transaction. uint256 value; // In the future, we might want to add some // new fields to the struct. The `txData` struct // is to be passed to account and any changes to its structure // would mean a breaking change to these accounts. In order to prevent this, // we should keep some fields as "reserved". // It is also recommended that their length is fixed, since // it would allow easier proof integration (in case we will need // some special circuit for preprocessing transactions). uint256[4] reserved; // The transaction's calldata. bytes data; // The signature of the transaction. bytes signature; // The properly formatted hashes of bytecodes that must be published on L1 // with the inclusion of this transaction. Note, that a bytecode has been published // before, the user won't pay fees for its republishing. bytes32[] factoryDeps; // The input to the paymaster. bytes paymasterInput; // Reserved dynamic type for the future use-case. Using it should be avoided, // But it is still here, just in case we want to enable some additional functionality. bytes reservedDynamic; }
{ "evmVersion": "paris", "optimizer": { "enabled": true, "mode": "3" }, "outputSelection": { "*": { "*": [ "abi", "metadata" ], "": [ "ast" ] } }, "detectMissingLibraries": false, "forceEVMLA": false, "enableEraVMExtensions": false, "libraries": {} }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"addWhitelistedContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"removeWhitelistedContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bytes32","name":"","type":"bytes32"},{"components":[{"internalType":"uint256","name":"txType","type":"uint256"},{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"gasPerPubdataByteLimit","type":"uint256"},{"internalType":"uint256","name":"maxFeePerGas","type":"uint256"},{"internalType":"uint256","name":"maxPriorityFeePerGas","type":"uint256"},{"internalType":"uint256","name":"paymaster","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256[4]","name":"reserved","type":"uint256[4]"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes32[]","name":"factoryDeps","type":"bytes32[]"},{"internalType":"bytes","name":"paymasterInput","type":"bytes"},{"internalType":"bytes","name":"reservedDynamic","type":"bytes"}],"internalType":"struct Transaction","name":"_transaction","type":"tuple"}],"name":"validateAndPayForPaymasterTransaction","outputs":[{"internalType":"bytes4","name":"magic","type":"bytes4"},{"internalType":"bytes","name":"context","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedContracts","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
9c4d535b0000000000000000000000000000000000000000000000000000000000000000010000b7afe712cd739719550bdd63950d06374aba2e387ecfbe77789377915500000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x0003000000000002000200000000000200000060031002700000008d03300197000200000031035500010000000103550000008004000039000000400040043f00000001002001900000002b0000c13d000000040030008c000000380000413d000000000201043b000000e002200270000000900020009c0000003c0000213d000000940020009c0000005e0000613d000000950020009c000000940000613d000000960020009c000000dd0000c13d000000240030008c000000dd0000413d0000000002000416000000000002004b000000dd0000c13d0000000401100370000000000101043b000000970010009c000000dd0000213d000000000010043f0000000101000039000000200010043f0000000001000019023102160000040f000000000101041a000000ff001001900000000001000039000000010100c039000000800010043f000000a301000041000002320001042e0000000001000416000000000001004b000000dd0000c13d000000000100041a0000008e011001970000000002000411000000000121019f000000000010041b0000002001000039000001000010044300000120000004430000008f01000041000002320001042e000000000003004b000000dd0000c13d0000000001000019000002320001042e000000910020009c000000b40000613d000000920020009c000000d50000613d000000930020009c000000dd0000c13d000000440030008c000000dd0000413d0000000002000416000000000002004b000000dd0000c13d0000000402100370000000000202043b000000970020009c000000dd0000213d0000002401100370000000000401043b000000000100041a00000097011001970000000003000411000000000013004b000000df0000c13d0000009701200198000000f50000c13d0000009801000041000000800010043f0000002001000039000000840010043f0000000f01000039000000a40010043f000000a201000041000000c40010043f0000009a010000410000023300010430000000640030008c000000dd0000413d0000004402100370000000000202043b0000009e0020009c000000dd0000213d0000000003230049000000a40030009c000000dd0000213d000002640030008c000000dd0000413d0000000003000411000080010030008c000000e90000c13d000200440020003d0000000201100360000000000101043b0000009701100197000000000010043f0000000101000039000000200010043f00000000010004140000008d0010009c0000008d01008041000000c001100210000000a8011001c700008010020000390231022c0000040f0000000100200190000000dd0000613d000000400400043d000000000101043b000000000101041a000000ff001001900000010f0000c13d0000006401400039000000b10200004100000000002104350000004401400039000000b202000041000000000021043500000024014000390000002b020000390000000000210435000000980100004100000000001404350000000401400039000000200200003900000000002104350000008d0040009c0000008d040080410000004001400210000000b3011001c70000023300010430000000240030008c000000dd0000413d0000000002000416000000000002004b000000dd0000c13d0000000401100370000000000101043b000000970010009c000000dd0000213d000200000001001d000000000100041a00000097011001970000000002000411000000000012004b00000000010000390000000101006039023101ed0000040f000000020000006b0000000001000039000000010100c039023102010000040f0000000201000029000000000010043f0000000101000039000000200010043f0000000001000019023102160000040f000000000301041a000000b402300197000000000021041b0000000001000019000002320001042e000000240030008c000000dd0000413d0000000002000416000000000002004b000000dd0000c13d0000000401100370000000000101043b000000970010009c000000dd0000213d000200000001001d000000000100041a00000097011001970000000002000411000000000012004b00000000010000390000000101006039023101ed0000040f000000020000006b0000000001000039000000010100c039023102010000040f0000000201000029000000000010043f0000000101000039000000200010043f0000000001000019023102160000040f000000000301041a000000b40230019700000001022001bf000000000021041b0000000001000019000002320001042e0000000001000416000000000001004b000000dd0000c13d000000000100041a0000009701100197000000800010043f000000a301000041000002320001042e000000000100001900000233000104300000009801000041000000800010043f0000002001000039000000840010043f0000000d01000039000000a40010043f0000009901000041000000c40010043f0000009a0100004100000233000104300000009801000041000000800010043f0000002001000039000000840010043f0000002a01000039000000a40010043f000000a501000041000000c40010043f000000a601000041000000e40010043f000000a7010000410000023300010430000100000001001d000200000004001d0000009b0100004100000000001004430000000001000410000000040010044300000000010004140000008d0010009c0000008d01008041000000c0011002100000009c011001c70000800a020000390231022c0000040f0000000100200190000001210000613d000000000101043b0000000203000029000000000013004b000001220000a13d000000400100043d0000004402100039000000a103000041000000000032043500000024021000390000001403000039000001ab0000013d000000a90040009c000001df0000813d0000002005400039000000400050043f000000000004043500000002060000290000002001600039000000010310036700000060016000390000000101100367000000000101043b000000000203043b000000000002004b000001290000c13d000100000005001d000200000004001d0000000001000414000001320000013d000000000001042f00000000010004140000000104000029000000040040008c000001860000c13d00000001020000390000000001000031000001a10000013d00000000032100a900000000022300d9000000000021004b000001930000c13d000100000005001d000200000004001d0000000001000414000000000003004b000001e50000c13d0000008d0010009c0000008d01008041000000c0011002100000800102000039023102270000040f000200000001035500000060031002700000008d0030019d0000008d033001980000000209000029000001620000613d0000001f04300039000000ac044001970000003f04400039000000ad04400197000000400500043d0000000004450019000000000054004b000000000600003900000001060040390000009e0040009c000001df0000213d0000000100600190000001df0000c13d000000400040043f0000001f0430018f0000000006350436000000ae053001980000000003560019000001550000613d000000000701034f000000007807043c0000000006860436000000000036004b000001510000c13d000000000004004b000001620000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000000400100043d00000001002001900000018d0000613d000000200210003900000040030000390000000000320435000000b00200004100000000002104350000000002090433000000400310003900000000002304350000006003100039000000000002004b0000000107000029000001790000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000024004b000001720000413d0000001f04200039000000b5044001970000000002320019000000000002043500000060024000390000008d0020009c0000008d0200804100000060022002100000008d0010009c0000008d010080410000004001100210000000000112019f000002320001042e0000008d0010009c0000008d01008041000000c001100210000000000003004b000001990000c13d00000000020400190000019c0000013d0000004402100039000000af03000041000000000032043500000024021000390000001603000039000001ab0000013d000000aa01000041000000000010043f0000001101000039000000040010043f000000ab0100004100000233000104300000009d011001c700008009020000390000000005000019023102270000040f000200000001035500000060011002700000008d0010019d0000008d01100197000000000001004b000001b60000c13d00000001002001900000003a0000c13d000000400100043d00000044021000390000009f03000041000000000032043500000024021000390000000f030000390000000000320435000000980200004100000000002104350000000402100039000000200300003900000000003204350000008d0010009c0000008d010080410000004001100210000000a0011001c700000233000104300000009e0010009c000001df0000213d0000001f04100039000000b5044001970000003f04400039000000b505400197000000400400043d0000000005540019000000000045004b000000000600003900000001060040390000009e0050009c000001df0000213d0000000100600190000001df0000c13d000000400050043f0000000006140436000000b5031001980000001f0410018f00000000013600190000000205000367000001d10000613d000000000705034f000000007807043c0000000006860436000000000016004b000001cd0000c13d000000000004004b000001a30000613d000000000335034f0000000304400210000000000501043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f0000000000310435000001a30000013d000000aa01000041000000000010043f0000004101000039000000040010043f000000ab0100004100000233000104300000008d0010009c0000008d01008041000000c0011002100000009d011001c7000080090200003900008001040000390000000005000019000001360000013d000000000001004b000001f00000613d000000000001042d000000400100043d00000044021000390000009903000041000000000032043500000024021000390000000d030000390000000000320435000000980200004100000000002104350000000402100039000000200300003900000000003204350000008d0010009c0000008d010080410000004001100210000000a0011001c70000023300010430000000000001004b000002040000613d000000000001042d000000400100043d0000004402100039000000a203000041000000000032043500000024021000390000000f030000390000000000320435000000980200004100000000002104350000000402100039000000200300003900000000003204350000008d0010009c0000008d010080410000004001100210000000a0011001c70000023300010430000000000001042f00000000020004140000008d0020009c0000008d02008041000000c0022002100000008d0010009c0000008d010080410000004001100210000000000121019f000000a8011001c700008010020000390231022c0000040f0000000100200190000002250000613d000000000101043b000000000001042d000000000100001900000233000104300000022a002104210000000102000039000000000001042d0000000002000019000000000001042d0000022f002104230000000102000039000000000001042d0000000002000019000000000001042d0000023100000432000002320001042e000002330001043000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000002000000000000000000000000000000400000010000000000000000000000000000000000000000000000000000000000000000000000000046704ada0000000000000000000000000000000000000000000000000000000046704adb000000000000000000000000000000000000000000000000000000008da5cb5b00000000000000000000000000000000000000000000000000000000f3fef3a300000000000000000000000000000000000000000000000000000000038a24bc000000000000000000000000000000000000000000000000000000000ff24ee200000000000000000000000000000000000000000000000000000000391feebb000000000000000000000000ffffffffffffffffffffffffffffffffffffffff08c379a0000000000000000000000000000000000000000000000000000000004e6f7420746865206f776e65720000000000000000000000000000000000000000000000000000000000000000000000000000640000008000000000000000009cc7f708afc65944829bd487b90b72536b1951864fbfc14e125fc972a6507f3902000002000000000000000000000000000000240000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff5769746864726177206661696c656400000000000000000000000000000000000000000000000000000000000000000000000064000000000000000000000000496e73756666696369656e742062616c616e6365000000000000000000000000496e76616c69642061646472657373000000000000000000000000000000000000000000000000000000000000000000000000200000008000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4f6e6c792074686520426f6f746c6f616465722063616e2063616c6c20746869732066756e6374696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000840000008000000000000000000200000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffe04e487b7100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000000000000000000001ffffffe000000000000000000000000000000000000000000000000000000003ffffffe000000000000000000000000000000000000000000000000000000000ffffffe0426f6f746c6f616465722063616c6c206661696c656400000000000000000000038a24bc00000000000000000000000000000000000000000000000000000000656420636f6e74726163740000000000000000000000000000000000000000005472616e73616374696f6e206e6f742066726f6d20612077686974656c6973740000000000000000000000000000000000000084000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0fffa103e46dabd104943dca7e71306d39dd5545572b737d12a0aae6bf1f46a0f
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.