Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
73629 | 31 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
FlowNFTDescriptor
Compiler Version
v0.8.26+commit.8a97fa7a
ZkSolc Version
v1.5.7
Optimization Enabled:
Yes with Mode z
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.20; import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import { Base64 } from "@openzeppelin/contracts/utils/Base64.sol"; import { IFlowNFTDescriptor } from "./interfaces/IFlowNFTDescriptor.sol"; /// @title FlowNFTDescriptor /// @notice See the documentation in {IFlowNFTDescriptor}. contract FlowNFTDescriptor is IFlowNFTDescriptor { /// @inheritdoc IFlowNFTDescriptor function tokenURI( IERC721Metadata, /* sablierFlow */ uint256 /* streamId */ ) external pure override returns (string memory uri) { // solhint-disable max-line-length,quotes string memory svg = '<svg width="500" height="500" style="background-color: #14161F;" xmlns="http://www.w3.org/2000/svg" viewBox="20 -400 200 1000"><path id="Logo" fill="#fff" fill-opacity="1" d="m133.559,124.034c-.013,2.412-1.059,4.848-2.923,6.402-2.558,1.819-5.168,3.439-7.888,4.996-14.44,8.262-31.047,12.565-47.674,12.569-8.858.036-17.838-1.272-26.328-3.663-9.806-2.766-19.087-7.113-27.562-12.778-13.842-8.025,9.468-28.606,16.153-35.265h0c2.035-1.838,4.252-3.546,6.463-5.224h0c6.429-5.655,16.218-2.835,20.358,4.17,4.143,5.057,8.816,9.649,13.92,13.734h.037c5.736,6.461,15.357-2.253,9.38-8.48,0,0-3.515-3.515-3.515-3.515-11.49-11.478-52.656-52.664-64.837-64.837l.049-.037c-1.725-1.606-2.719-3.847-2.751-6.204h0c-.046-2.375,1.062-4.582,2.726-6.229h0l.185-.148h0c.099-.062,.222-.148,.37-.259h0c2.06-1.362,3.951-2.621,6.044-3.842C57.763-3.473,97.76-2.341,128.637,18.332c16.671,9.946-26.344,54.813-38.651,40.199-6.299-6.096-18.063-17.743-19.668-18.811-6.016-4.047-13.061,4.776-7.752,9.751l68.254,68.371c1.724,1.601,2.714,3.84,2.738,6.192Z" transform="scale(1.5, 1.5)" /></svg>'; string memory json = string.concat( '{"description": "This NFT represents a payment stream in Sablier Flow",', '"external_url": "https://sablier.com",', '"name": "Sablier Flow",', '"image": "data:image/svg+xml;base64,', Base64.encode(bytes(svg)), '"}' ); uri = string.concat("data:application/json;base64,", Base64.encode(bytes(json))); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.20; import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; /// @title IFlowNFTDescriptor /// @notice This contract generates the URI describing the Sablier Flow stream NFTs. interface IFlowNFTDescriptor { /// @notice Produces the URI describing a particular stream NFT. /// /// @dev Currently it returns the Sablier logo as an SVG. In the future, it will return an NFT SVG. /// /// @param sablierFlow The address of the Sablier Flow the stream was created in. /// @param streamId The ID of the stream for which to produce a description. /// /// @return uri The URI of the ERC721-compliant metadata. function tokenURI(IERC721Metadata sablierFlow, uint256 streamId) external view returns (string memory uri); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.2) (utils/Base64.sol) pragma solidity ^0.8.20; /** * @dev Provides a set of functions to operate with Base64 strings. */ library Base64 { /** * @dev Base64 Encoding/Decoding Table */ string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /** * @dev Converts a `bytes` to its Bytes64 `string` representation. */ function encode(bytes memory data) internal pure returns (string memory) { /** * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol */ if (data.length == 0) return ""; // Loads the table into memory string memory table = _TABLE; // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter // and split into 4 numbers of 6 bits. // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up // - `data.length + 2` -> Round up // - `/ 3` -> Number of 3-bytes chunks // - `4 *` -> 4 characters for each chunk string memory result = new string(4 * ((data.length + 2) / 3)); /// @solidity memory-safe-assembly assembly { // Prepare the lookup table (skip the first "length" byte) let tablePtr := add(table, 1) // Prepare result pointer, jump over length let resultPtr := add(result, 0x20) let dataPtr := data let endPtr := add(data, mload(data)) // In some cases, the last iteration will read bytes after the end of the data. We cache the value, and // set it to zero to make sure no dirty bytes are read in that section. let afterPtr := add(endPtr, 0x20) let afterCache := mload(afterPtr) mstore(afterPtr, 0x00) // Run over the input, 3 bytes at a time for { } lt(dataPtr, endPtr) { } { // Advance 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // To write each character, shift the 3 byte (24 bits) chunk // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) // and apply logical AND with 0x3F to bitmask the least significant 6 bits. // Use this as an index into the lookup table, mload an entire word // so the desired character is in the least significant byte, and // mstore8 this least significant byte into the result and continue. mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F)))) resultPtr := add(resultPtr, 1) // Advance } // Reset the value that was cached mstore(afterPtr, afterCache) // When data `bytes` is not exactly 3 bytes long // it is padded with `=` characters at the end switch mod(mload(data), 3) case 1 { mstore8(sub(resultPtr, 1), 0x3d) mstore8(sub(resultPtr, 2), 0x3d) } case 2 { mstore8(sub(resultPtr, 1), 0x3d) } } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.20; import {IERC721} from "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or * {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the address zero. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "mode": "z", "fallback_to_optimizing_for_size": true }, "viaIR": true, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "abi", "metadata" ], "": [ "ast" ] } }, "detectMissingLibraries": false, "forceEVMLA": false, "enableEraVMExtensions": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC721Metadata","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
9c4d535b000000000000000000000000000000000000000000000000000000000000000001000099ae353eeddc12964f3060fabcbe65bc3d0bce76c727fc704e6fef3e5a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x00020000000000020003000000000002000100000001035500000060031002700000005d0030019d0000008004000039000000400040043f0000000100200190000000ae0000c13d0000005d02300197000000040020008c000000b60000413d000000000301043b0000005f03300197000000600030009c000000b60000c13d000000440020008c000000b60000413d0000000002000416000000000002004b000000b60000c13d0000000401100370000000000101043b000000610010009c000000b60000213d000004c001000039000000400010043f0000041c01000039000000800010043f0000006201000041000000a00010043f0000006301000041000000c00010043f0000006401000041000000e00010043f0000006501000041000001000010043f0000006601000041000001200010043f0000006701000041000001400010043f0000006801000041000001600010043f0000006901000041000001800010043f0000006a01000041000001a00010043f0000006b01000041000001c00010043f0000006c01000041000001e00010043f0000006d01000041000002000010043f0000006e01000041000002200010043f0000006f01000041000002400010043f0000007001000041000002600010043f0000007101000041000002800010043f0000007201000041000002a00010043f0000007301000041000002c00010043f0000007401000041000002e00010043f0000007501000041000003000010043f0000007601000041000003200010043f0000007701000041000003400010043f0000007801000041000003600010043f0000007901000041000003800010043f0000007a01000041000003a00010043f0000007b01000041000003c00010043f0000007c01000041000003e00010043f0000007d01000041000004000010043f0000007e01000041000004200010043f0000007f01000041000004400010043f0000008001000041000004600010043f0000008101000041000004800010043f0000008201000041000004a00010043f0000008001000039016f00d70000040f0000008302000041000000400400043d000300000004001d0000008703400039000000000023043500000084020000410000006003400039000000000023043500000085020000410000008d0340003900000000002304350000008602000041000000200340003900000000002304350000008702000041000000c40340003900000000002304350000008802000041000000400340003900000000002304350000008902000041000000670340003900000000002304350000008a02000041000000a40340003900000000002304350000000013010434000100000003001d000000c802400039000200000002001d016f00b80000040f000000010300002900000002013000290000008b020000410000000000210435000000aa0230003900000003010000290000000000210435000000ca02300039016f00c40000040f0000000301000029016f00d70000040f0000008c02000041000000400400043d000300000004001d0000002003400039000200000003001d00000000002304350000000013010434000100000003001d0000003d02400039016f00b80000040f00000001030000290000001d02300039000000030100002900000000002104350000003d02300039016f00c40000040f0000002001000039000000400200043d000100000002001d000000000112043600000003030000290000000003030433000300000003001d000000000031043500000040022000390000000201000029016f00b80000040f00000003010000290000001f01100039000000200200008a000000000121016f000000400210003900000001010000290000000003000019016f01650000040f0000000001000416000000000001004b000000b60000c13d0000002001000039000001000010044300000120000004430000005e01000041000001700001042e000000000100001900000171000104300000000004000019000000000034004b000000c10000813d00000000052400190000000006140019000000000606043300000000006504350000002004400039000000b90000013d00000000012300190000000000010435000000000001042d0000001f02200039000000200300008a000000000232016f0000000001120019000000000021004b000000000200003900000001020040390000008d0010009c000000d10000213d0000000100200190000000d10000c13d000000400010043f000000000001042d0000008e01000041000000000010043f0000004101000039000000040010043f0000008f010000410000017100010430000000400200043d0000000003010433000000000003004b0000014d0000613d000000900020009c0000015b0000213d0000006003200039000000400030043f000000400320003900000091040000410000000000430435000000200320003900000092040000410000000000430435000000400300003900000000003204350000000003010433000000020400008a000000000043004b0000015f0000813d000000930030009c0000015f0000213d0000000203300039000000030330011a00000002043002100000008d0040009c0000015b0000213d0000001f03400039000000200600008a000000000563016f0000003f03500039000000000663016f000000400300043d0000000006630019000000000036004b000000000700003900000001070040390000008d0060009c0000015b0000213d00000001007001900000015b0000c13d000000400060043f0000000004430436000000000005004b0000010c0000613d0000000005540019000000000600003100000001066003670000000007040019000000006806043c0000000007870436000000000057004b000001080000c13d0000000005010433000000000515001900000001062000390000002002500039000000000702043300000000000204350000000008010019000000000058004b0000013f0000813d00000003088000390000000009080433000000120a9002700000003f0aa0018f000000000aa60019000000000a0a0433000000f80aa00210000000000b040433000000940bb00197000000000aab019f0000000000a404350000000c0a9002700000003f0aa0018f000000000aa60019000000000a0a0433000000f80aa00210000000010b400039000000000c0b0433000000940cc00197000000000aac019f0000000000ab0435000000060a9002700000003f0aa0018f000000000aa60019000000000a0a0433000000f80aa00210000000020b400039000000000c0b0433000000940cc00197000000000aac019f0000000000ab04350000003f0990018f00000000099600190000000009090433000000f809900210000000030a400039000000000b0a0433000000940bb0019700000000099b019f00000000009a04350000000404400039000001130000013d00000000007204350000000001010433000000031010011a000000020010008c000001530000613d000000010010008c000001580000c13d000000010140008a0000000002010433000000940220019700000095022001c70000000000210435000000020140008a000001540000013d000000960020009c0000015b0000813d0000002001200039000000400010043f0000000000020435000001590000013d000000010140008a0000000002010433000000940220019700000095022001c7000000000021043500000000020300190000000001020019000000000001042d0000008e01000041000000000010043f0000004101000039000001620000013d0000008e01000041000000000010043f0000001101000039000000040010043f0000008f0100004100000171000104300000005d0010009c0000005d0100804100000040011002100000005d0020009c0000005d020080410000006002200210000000000112019f000000e002300210000000000121019f000001700001042e0000016f00000432000001700001042e00000171000104300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff0000000200000000000000000000000000000040000001000000000000000000ffffffff00000000000000000000000000000000000000000000000000000000e9dc637500000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff3c7376672077696474683d2235303022206865696768743d2235303022207374796c653d226261636b67726f756e642d636f6c6f723a20233134313631463b2220786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667222076696577426f783d223230202d343030203230302031303030223e3c706174682069643d224c6f676f222066696c6c3d2223666666222066696c6c2d6f7061636974793d22312220643d226d3133332e3535392c3132342e303334632d2e3031332c322e3431322d312e3035392c342e3834382d322e3932332c362e3430322d322e3535382c312e3831392d352e3136382c332e3433392d372e3838382c342e3939362d31342e34342c382e3236322d33312e3034372c31322e3536352d34372e3637342c31322e3536392d382e3835382e3033362d31372e3833382d312e3237322d32362e3332382d332e3636332d392e3830362d322e3736362d31392e3038372d372e3131332d32372e3536322d31322e3737382d31332e3834322d382e3032352c392e3436382d32382e3630362c31362e3135332d33352e323635683063322e3033352d312e3833382c342e3235322d332e3534362c362e3436332d352e323234683063362e3432392d352e3635352c31362e3231382d322e3833352c32302e3335382c342e31372c342e3134332c352e3035372c382e3831362c392e3634392c31332e39322c31332e373334682e30333763352e3733362c362e3436312c31352e3335372d322e3235332c392e33382d382e34382c302c302d332e3531352d332e3531352d332e3531352d332e3531352d31312e34392d31312e3437382d35322e3635362d35322e3636342d36342e3833372d36342e3833376c2e3034392d2e303337632d312e3732352d312e3630362d322e3731392d332e3834372d322e3735312d362e3230346830632d2e3034362d322e3337352c312e3036322d342e3538322c322e3732362d362e32323968306c2e3138352d2e3134386830632e3039392d2e3036322c2e3232322d2e3134382c2e33372d2e323539683063322e30362d312e3336322c332e3935312d322e3632312c362e3034342d332e3834324335372e3736332d332e3437332c39372e37362d322e3334312c3132382e3633372c31382e3333326331362e3637312c392e3934362d32362e3334342c35342e3831332d33382e3635312c34302e3139392d362e3239392d362e3039362d31382e3036332d31372e3734332d31392e3636382d31382e3831312d362e3031362d342e3034372d31332e3036312c342e3737362d372e3735322c392e3735316c36382e3235342c36382e33373163312e3732342c312e3630312c322e3731342c332e38342c322e3733382c362e3139325a22207472616e73666f726d3d227363616c6528312e352c20312e352922202f3e3c2f7376673e000000002e636f6d222c000000000000000000000000000000000000000000000000000020466c6f77222c00000000000000000000000000000000000000000000000000226e616d65223a20225361626c69657220466c6f77222c0000000000000000007b226465736372697074696f6e223a202254686973204e4654207265707265736536342c00000000000000000000000000000000000000000000000000000000656e74732061207061796d656e742073747265616d20696e205361626c6965722265787465726e616c5f75726c223a202268747470733a2f2f7361626c69657222696d616765223a2022646174613a696d6167652f7376672b786d6c3b626173227d000000000000000000000000000000000000000000000000000000000000646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000000000000000000000000000000000000000000000000000ffffffffffffffff4e487b71000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff9f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f4142434445464748494a4b4c4d4e4f505152535455565758595a616263646566bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffe00000000000000000000000000000000000000000000000000000000000000000b9ecfd8287488e7c3853d7cdc90f4b43e49d5912f74f3832ab06ef4934389d3c
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.