More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 27,891 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Query | 18500956 | 18 days ago | IN | 0.00045 frxETH | 0 | ||||
Query | 14638077 | 107 days ago | IN | 0.00015 frxETH | 0.00000004 | ||||
Query | 14638029 | 107 days ago | IN | 0.00005 frxETH | 0.00000004 | ||||
Query | 13590825 | 131 days ago | IN | 0.00045 frxETH | 0.00000004 | ||||
Query | 11954218 | 169 days ago | IN | 0.00045 frxETH | 0 | ||||
Query | 11702072 | 175 days ago | IN | 0.00015 frxETH | 0 | ||||
Query | 11702065 | 175 days ago | IN | 0.00015 frxETH | 0 | ||||
Query | 11701772 | 175 days ago | IN | 0.00015 frxETH | 0 | ||||
Query | 11701769 | 175 days ago | IN | 0.00015 frxETH | 0 | ||||
Query | 11701757 | 175 days ago | IN | 0.00015 frxETH | 0 | ||||
Query | 11701698 | 175 days ago | IN | 0.00015 frxETH | 0 | ||||
Query | 9379508 | 229 days ago | IN | 0.00015 frxETH | 0 | ||||
Query | 9118644 | 235 days ago | IN | 0.00015 frxETH | 0 | ||||
Query | 9091388 | 236 days ago | IN | 0.00015 frxETH | 0 | ||||
Query | 9091371 | 236 days ago | IN | 0.00015 frxETH | 0 | ||||
Query | 9081729 | 236 days ago | IN | 0.00015 frxETH | 0.00000004 | ||||
Query | 9077583 | 236 days ago | IN | 0.00045 frxETH | 0 | ||||
Query | 9077554 | 236 days ago | IN | 0.00045 frxETH | 0 | ||||
Query | 9059848 | 236 days ago | IN | 0.00045 frxETH | 0 | ||||
Query | 9059789 | 236 days ago | IN | 0.00045 frxETH | 0 | ||||
Query | 9059748 | 236 days ago | IN | 0.00045 frxETH | 0 | ||||
Query | 9033673 | 237 days ago | IN | 0.00045 frxETH | 0 | ||||
Query | 9004316 | 238 days ago | IN | 0.00045 frxETH | 0 | ||||
Query | 9004294 | 238 days ago | IN | 0.00045 frxETH | 0 | ||||
Query | 9004250 | 238 days ago | IN | 0.00045 frxETH | 0 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
18500956 | 18 days ago | 0.00045 frxETH | ||||
14638077 | 107 days ago | 0.00015 frxETH | ||||
14638029 | 107 days ago | 0.00005 frxETH | ||||
13590825 | 131 days ago | 0.00045 frxETH | ||||
11954218 | 169 days ago | 0.00045 frxETH | ||||
11702072 | 175 days ago | 0.00015 frxETH | ||||
11702065 | 175 days ago | 0.00015 frxETH | ||||
11701772 | 175 days ago | 0.00015 frxETH | ||||
11701769 | 175 days ago | 0.00015 frxETH | ||||
11701757 | 175 days ago | 0.00015 frxETH | ||||
11701698 | 175 days ago | 0.00015 frxETH | ||||
9379508 | 229 days ago | 0.00015 frxETH | ||||
9118644 | 235 days ago | 0.00015 frxETH | ||||
9091388 | 236 days ago | 0.00015 frxETH | ||||
9091371 | 236 days ago | 0.00015 frxETH | ||||
9081729 | 236 days ago | 0.00015 frxETH | ||||
9077583 | 236 days ago | 0.00045 frxETH | ||||
9077554 | 236 days ago | 0.00045 frxETH | ||||
9059848 | 236 days ago | 0.00045 frxETH | ||||
9059789 | 236 days ago | 0.00045 frxETH | ||||
9059748 | 236 days ago | 0.00045 frxETH | ||||
9033673 | 237 days ago | 0.00045 frxETH | ||||
9004316 | 238 days ago | 0.00045 frxETH | ||||
9004294 | 238 days ago | 0.00045 frxETH | ||||
9004250 | 238 days ago | 0.00045 frxETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
LPNQueryV0
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {LPNClientV0} from "./LPNClientV0.sol"; import {ILPNRegistry} from "../interfaces/ILPNRegistry.sol"; /** * @title LPNQueryV0 * @dev A contract for querying NFT ownership using the Lagrange Euclid testnet. */ contract LPNQueryV0 is LPNClientV0 { /** * @dev Struct to store metadata about a query request. * @param sender The address that sent the query request. * @param holder The address of the NFT holder being queried. */ struct RequestMetadata { address sender; address holder; } /** * @dev Mapping to store request metadata by request ID. */ mapping(uint256 requestId => RequestMetadata request) public requests; /** * @dev Event emitted when a query request is made. * @param sender The address that sent the query request. * @param storageContract The address of the NFT contract being queried. */ event Query(address indexed sender, address indexed storageContract); /** * @dev Event emitted when the result of a query is received. * @param requestId The ID of the query request. * @param sender The address that sent the query request. * @param holder The address of the NFT holder that was queried. * @param results The array of NFT IDs owned by the queried holder. */ event Result( uint256 indexed requestId, address indexed sender, address indexed holder, uint256[] results ); /** * @dev Constructor to initialize the LPNQueryV0 contract. * @param lpnRegistry The address of the LPN registry contract. */ constructor(ILPNRegistry lpnRegistry) LPNClientV0(lpnRegistry) {} /** * @dev Function to query the NFT IDs of a specific owner over a range of blocks. * @param storageContract The address of the NFT contract to query. * @param holder The address of the NFT holder to query. * @param startBlock The starting block number for the query range. * @param endBlock The ending block number for the query range. * @param offset The offset for pagination of results. */ function query( address storageContract, address holder, uint256 startBlock, uint256 endBlock, uint8 offset ) external payable { uint256 requestId = lpnRegistry.request{value: msg.value}( storageContract, bytes32(uint256(uint160(holder))), startBlock, endBlock, offset ); requests[requestId] = RequestMetadata({sender: msg.sender, holder: holder}); emit Query(msg.sender, storageContract); } /** * @dev Internal function called by LPNClientV0 to provide the result of a query. * @param requestId The ID of the query request. * @param results The array of NFT IDs owned by the queried holder. */ function processCallback(uint256 requestId, uint256[] calldata results) internal override { RequestMetadata memory req = requests[requestId]; emit Result(requestId, req.sender, req.holder, results); delete requests[requestId]; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {ILPNRegistry} from "../interfaces/ILPNRegistry.sol"; import {ILPNClient} from "../interfaces/ILPNClient.sol"; error CallbackNotAuthorized(); abstract contract LPNClientV0 is ILPNClient { ILPNRegistry public lpnRegistry; modifier onlyLagrangeRegistry() { if (msg.sender != address(lpnRegistry)) { revert CallbackNotAuthorized(); } _; } constructor(ILPNRegistry _lpnRegistry) { lpnRegistry = _lpnRegistry; } function lpnCallback(uint256 requestId, uint256[] calldata results) external onlyLagrangeRegistry { processCallback(requestId, results); } function processCallback(uint256 requestId, uint256[] calldata results) internal virtual; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title ILPNRegistry /// @notice Interface for the LPNRegistryV0 contract. interface ILPNRegistry { /// @notice Event emitted when a new client registers. /// @param storageContract The address of the smart contract to be indexed. /// @param client The address of the client who requested this contract to be indexed. /// @param mappingSlot The storage slot of the client's mapping to be computed and proved over. /// @param lengthSlot The storage slot of the variable storing the length of the client's mapping. event NewRegistration( address indexed storageContract, address indexed client, uint256 mappingSlot, uint256 lengthSlot ); /// @notice Event emitted when a new request is made. /// @param requestId The ID of the request. /// @param storageContract The address of the smart contract with the storage associated with the request. /// @param client The address of the client who made this request. /// @param key The key of the mapping for the value associated with the request. /// @param startBlock The starting block for the computation. /// @param endBlock The ending block for the computation. /// @param proofBlock The requested block for the proof to be computed against. /// Currently required for OP Stack chains event NewRequest( uint256 indexed requestId, address indexed storageContract, address indexed client, bytes32 key, uint256 startBlock, uint256 endBlock, uint256 offset, uint256 gasFee, uint256 proofBlock ); /// @notice Event emitted when a response is received. /// @param requestId The ID of the request. /// @param client The address of the client who made the matching request. /// @param results The computed results for the request. event NewResponse( uint256 indexed requestId, address indexed client, uint256[] results ); /// @notice The gas fee paid for on request to reimburse the response transaction. function gasFee() external returns (uint256); /// @notice Registers a client with the provided mapping and length slots. /// @param storageContract The address of the contract to be queried. /// @param mappingSlot The storage slot of the client's mapping to be computed and proved over. /// @param lengthSlot The storage slot of the variable storing the length of the client's mapping. function register( address storageContract, uint256 mappingSlot, uint256 lengthSlot ) external; /// @notice Submits a new request to the registry. /// @param storageContract The address of the smart contract with the storage associated with the request. /// @param key The key of the mapping for the value associated with the request. /// @param startBlock The starting block for the computation. /// @param endBlock The ending block for the computation. /// @return The ID of the newly created request. function request( address storageContract, bytes32 key, uint256 startBlock, uint256 endBlock, uint256 offset ) external payable returns (uint256); /// @notice Submits a response to a specific request. /// @param requestId_ The ID of the request to respond to. /// @param data The proof, inputs, and public inputs to verify. /// - groth16_proof.proofs: 8 * U256 = 256 bytes /// - groth16_proof.inputs: 3 * U256 = 96 bytes /// - plonky2_proof.public_inputs: the little-endian bytes of public inputs exported by user /// @param blockNumber The block number of the block hash corresponding to the proof. function respond( uint256 requestId_, bytes32[] calldata data, uint256 blockNumber ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {ILPNRegistry} from "./ILPNRegistry.sol"; /** * @title ILPNClient * @notice Interface for the LPNClientV0 contract. */ interface ILPNClient { /// @notice Callback function called by the LPNRegistry contract. /// @param requestId The ID of the request. /// @param results The result of the request. function lpnCallback(uint256 requestId, uint256[] calldata results) external; }
{ "remappings": [ "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "solady/=lib/solady/src/", "@openzeppelin-upgrades/=lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable/", "eigenlayer-contracts/=lib/eigenlayer-contracts/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "cancun", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract ILPNRegistry","name":"lpnRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CallbackNotAuthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"storageContract","type":"address"}],"name":"Query","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"holder","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"results","type":"uint256[]"}],"name":"Result","type":"event"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"results","type":"uint256[]"}],"name":"lpnCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lpnRegistry","outputs":[{"internalType":"contract ILPNRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"storageContract","type":"address"},{"internalType":"address","name":"holder","type":"address"},{"internalType":"uint256","name":"startBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"},{"internalType":"uint8","name":"offset","type":"uint8"}],"name":"query","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"}],"name":"requests","outputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"holder","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052348015600e575f80fd5b50604051610519380380610519833981016040819052602b91604e565b5f80546001600160a01b0319166001600160a01b03929092169190911790556079565b5f60208284031215605d575f80fd5b81516001600160a01b03811681146072575f80fd5b9392505050565b610493806100865f395ff3fe60806040526004361061003e575f3560e01c806315bf2e41146100425780633e8258f1146100575780636337ec5a1461007657806381d12c58146100b1575b5f80fd5b610055610050366004610324565b610110565b005b348015610062575f80fd5b50610055610071366004610380565b61022c565b348015610081575f80fd5b505f54610094906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100bc575f80fd5b506100f06100cb3660046103f8565b600160208190525f918252604090912080549101546001600160a01b03918216911682565b604080516001600160a01b039384168152929091166020830152016100a8565b5f80546040516304e8ad4360e21b81526001600160a01b0388811660048301528781166024830152604482018790526064820186905260ff85166084830152909116906313a2b50c90349060a40160206040518083038185885af115801561017a573d5f803e3d5ffd5b50505050506040513d601f19601f8201168201806040525081019061019f919061040f565b604080518082018252338082526001600160a01b0389811660208085019182525f878152600191829052868120955186549085166001600160a01b03199182161787559251959091018054958416959092169490941790559251939450918916927f5904592568a4fbb78135ee4f11eab3d6638454d85eec4b0f4e1002f125fd66b29190a3505050505050565b5f546001600160a01b03163314610256576040516311016bf360e01b815260040160405180910390fd5b610261838383610266565b505050565b5f838152600160208181526040928390208351808501855281546001600160a01b03908116808352929094015490931691830182905292519192909186907f96cd981e2886f10a0f0fdfa65634c1242f211bf9abdbaaf18e199aed945b6ff9906102d39088908890610426565b60405180910390a45050505f90815260016020819052604090912080546001600160a01b03199081168255910180549091169055565b80356001600160a01b038116811461031f575f80fd5b919050565b5f805f805f60a08688031215610338575f80fd5b61034186610309565b945061034f60208701610309565b93506040860135925060608601359150608086013560ff81168114610372575f80fd5b809150509295509295909350565b5f805f60408486031215610392575f80fd5b83359250602084013567ffffffffffffffff808211156103b0575f80fd5b818601915086601f8301126103c3575f80fd5b8135818111156103d1575f80fd5b8760208260051b85010111156103e5575f80fd5b6020830194508093505050509250925092565b5f60208284031215610408575f80fd5b5035919050565b5f6020828403121561041f575f80fd5b5051919050565b602080825281018290525f6001600160fb1b03831115610444575f80fd5b8260051b8085604085013791909101604001939250505056fea2646970667358221220266c6d50994fd4d0a32f5eec857765ac9f5ac5a8285c0ee9c84931c328423f2f64736f6c634300081900330000000000000000000000002584665beff871534118aabae781bc267af142f9
Deployed Bytecode
0x60806040526004361061003e575f3560e01c806315bf2e41146100425780633e8258f1146100575780636337ec5a1461007657806381d12c58146100b1575b5f80fd5b610055610050366004610324565b610110565b005b348015610062575f80fd5b50610055610071366004610380565b61022c565b348015610081575f80fd5b505f54610094906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100bc575f80fd5b506100f06100cb3660046103f8565b600160208190525f918252604090912080549101546001600160a01b03918216911682565b604080516001600160a01b039384168152929091166020830152016100a8565b5f80546040516304e8ad4360e21b81526001600160a01b0388811660048301528781166024830152604482018790526064820186905260ff85166084830152909116906313a2b50c90349060a40160206040518083038185885af115801561017a573d5f803e3d5ffd5b50505050506040513d601f19601f8201168201806040525081019061019f919061040f565b604080518082018252338082526001600160a01b0389811660208085019182525f878152600191829052868120955186549085166001600160a01b03199182161787559251959091018054958416959092169490941790559251939450918916927f5904592568a4fbb78135ee4f11eab3d6638454d85eec4b0f4e1002f125fd66b29190a3505050505050565b5f546001600160a01b03163314610256576040516311016bf360e01b815260040160405180910390fd5b610261838383610266565b505050565b5f838152600160208181526040928390208351808501855281546001600160a01b03908116808352929094015490931691830182905292519192909186907f96cd981e2886f10a0f0fdfa65634c1242f211bf9abdbaaf18e199aed945b6ff9906102d39088908890610426565b60405180910390a45050505f90815260016020819052604090912080546001600160a01b03199081168255910180549091169055565b80356001600160a01b038116811461031f575f80fd5b919050565b5f805f805f60a08688031215610338575f80fd5b61034186610309565b945061034f60208701610309565b93506040860135925060608601359150608086013560ff81168114610372575f80fd5b809150509295509295909350565b5f805f60408486031215610392575f80fd5b83359250602084013567ffffffffffffffff808211156103b0575f80fd5b818601915086601f8301126103c3575f80fd5b8135818111156103d1575f80fd5b8760208260051b85010111156103e5575f80fd5b6020830194508093505050509250925092565b5f60208284031215610408575f80fd5b5035919050565b5f6020828403121561041f575f80fd5b5051919050565b602080825281018290525f6001600160fb1b03831115610444575f80fd5b8260051b8085604085013791909101604001939250505056fea2646970667358221220266c6d50994fd4d0a32f5eec857765ac9f5ac5a8285c0ee9c84931c328423f2f64736f6c63430008190033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002584665beff871534118aabae781bc267af142f9
-----Decoded View---------------
Arg [0] : lpnRegistry (address): 0x2584665Beff871534118aAbAE781BC267Af142f9
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002584665beff871534118aabae781bc267af142f9
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
BASE | 48.98% | $1,797.55 | 0.0105 | $18.89 | |
OP | 21.42% | $1,796.3 | 0.0046 | $8.26 | |
LINEA | 6.28% | $1,795.49 | 0.00135 | $2.42 | |
ETH | 5.59% | $1,796.41 | 0.0012 | $2.16 | |
ARB | 4.66% | $1,795.92 | 0.001 | $1.8 | |
BLAST | 4.30% | $1,795.48 | 0.0009242 | $1.66 | |
ZKSYNC | 4.19% | $1,795.49 | 0.0009 | $1.62 | |
SCROLL | 2.33% | $1,795.49 | 0.0005 | $0.897744 | |
POL | 2.00% | $0.220744 | 3.5006 | $0.772735 | |
BSC | 0.24% | $617.95 | 0.00015 | $0.092692 |
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.