S Price: $0.409044 (-0.69%)

Contract

0x36C530a35e7F2ea46bf1c3d9d0b12ECe2a8DCBa2

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VeArtProxy

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
Yes with 10000 runs

Other Settings:
paris EvmVersion
File 1 of 3 : VeArtProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.22;

import {Base64} from "@openzeppelin/contracts/utils/Base64.sol";
import {IVeArtProxy} from "./interfaces/IVeArtProxy.sol";

contract VeArtProxy is IVeArtProxy {
    function toString(uint value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT license
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint temp = value;
        uint digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    function _tokenURI(uint _tokenId, uint _balanceOf, uint _locked_end, uint _value) external pure returns (string memory output) {
        output = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"><style>.base { fill: white; font-family: serif; font-size: 14px; }</style><rect width="100%" height="100%" fill="black" /><text x="10" y="20" class="base">';
        output = string(abi.encodePacked(output, "token ", toString(_tokenId), '</text><text x="10" y="40" class="base">'));
        output = string(abi.encodePacked(output, "balanceOf ", toString(_balanceOf), '</text><text x="10" y="60" class="base">'));
        output = string(abi.encodePacked(output, "locked_end ", toString(_locked_end), '</text><text x="10" y="80" class="base">'));
        output = string(abi.encodePacked(output, "value ", toString(_value), '</text></svg>'));

        string memory json = Base64.encode(bytes(string(abi.encodePacked('{"name": "lock #', toString(_tokenId), '", "description": "Archly locks can be used to vote on token emission and receive bribes", "image": "data:image/svg+xml;base64,', Base64.encode(bytes(output)), '"}'))));
        output = string(abi.encodePacked('data:application/json;base64,', json));
    }
}

File 2 of 3 : Base64.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides a set of functions to operate with Base64 strings.
 *
 * _Available since v4.5._
 */
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, 32)

            // Run over the input, 3 bytes at a time
            for {
                let dataPtr := data
                let endPtr := add(data, mload(data))
            } lt(dataPtr, endPtr) {

            } {
                // Advance 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // To write each character, shift the 3 bytes (18 bits) chunk
                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
                // and apply logical AND with 0x3F which is the number of
                // the previous character in the ASCII table prior to the Base64 Table
                // The result is then added to the table to get the character to write,
                // and finally write it in the result pointer but with a left shift
                // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits

                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
            }

            // 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;
    }
}

File 3 of 3 : IVeArtProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.22;

interface IVeArtProxy {
    function _tokenURI(uint _tokenId, uint _balanceOf, uint _locked_end, uint _value) external pure returns (string memory output);
}

Settings
{
  "evmVersion": "paris",
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_balanceOf","type":"uint256"},{"internalType":"uint256","name":"_locked_end","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"_tokenURI","outputs":[{"internalType":"string","name":"output","type":"string"}],"stateMutability":"pure","type":"function"}]

608060405234801561001057600080fd5b50610b75806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063dd9ec14914610030575b600080fd5b61004361003e366004610420565b610059565b6040516100509190610476565b60405180910390f35b606060405180610120016040528060fd8152602001610a0360fd913990508061008186610190565b6040516020016100929291906104c7565b6040516020818303038152906040529050806100ad85610190565b6040516020016100be92919061056f565b6040516020818303038152906040529050806100d984610190565b6040516020016100ea929190610617565b60405160208183030381529060405290508061010583610190565b6040516020016101169291906106bf565b6040516020818303038152906040529050600061016361013587610190565b61013e846102cd565b60405160200161014f929190610741565b6040516020818303038152906040526102cd565b905080604051602001610176919061085e565b604051602081830303815290604052915050949350505050565b6060816000036101d357505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156101fd57806101e7816108d2565b91506101f69050600a83610939565b91506101d7565b60008167ffffffffffffffff8111156102185761021861094d565b6040519080825280601f01601f191660200182016040528015610242576020820181803683370190505b5090505b84156102c55761025760018361097c565b9150610264600a86610995565b61026f9060306109a9565b60f81b818381518110610284576102846109bc565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506102be600a86610939565b9450610246565b949350505050565b606081516000036102ec57505060408051602081019091526000815290565b6000604051806060016040528060408152602001610b00604091399050600060038451600261031b91906109a9565b6103259190610939565b6103309060046109eb565b67ffffffffffffffff8111156103485761034861094d565b6040519080825280601f01601f191660200182016040528015610372576020820181803683370190505b509050600182016020820185865187015b808210156103de576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250610383565b50506003865106600181146103fa576002811461040d57610415565b603d6001830353603d6002830353610415565b603d60018303535b509195945050505050565b6000806000806080858703121561043657600080fd5b5050823594602084013594506040840135936060013592509050565b60005b8381101561046d578181015183820152602001610455565b50506000910152565b6020815260008251806020840152610495816040850160208701610452565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600083516104d9818460208801610452565b7f746f6b656e2000000000000000000000000000000000000000000000000000009083019081528351610513816006840160208801610452565b7f3c2f746578743e3c7465787420783d2231302220793d2234302220636c617373600692909101918201527f3d2262617365223e0000000000000000000000000000000000000000000000006026820152602e01949350505050565b60008351610581818460208801610452565b7f62616c616e63654f66200000000000000000000000000000000000000000000090830190815283516105bb81600a840160208801610452565b7f3c2f746578743e3c7465787420783d2231302220793d2236302220636c617373600a92909101918201527f3d2262617365223e000000000000000000000000000000000000000000000000602a820152603201949350505050565b60008351610629818460208801610452565b7f6c6f636b65645f656e6420000000000000000000000000000000000000000000908301908152835161066381600b840160208801610452565b7f3c2f746578743e3c7465787420783d2231302220793d2238302220636c617373600b92909101918201527f3d2262617365223e000000000000000000000000000000000000000000000000602b820152603301949350505050565b600083516106d1818460208801610452565b7f76616c7565200000000000000000000000000000000000000000000000000000908301908152835161070b816006840160208801610452565b7f3c2f746578743e3c2f7376673e0000000000000000000000000000000000000060069290910191820152601301949350505050565b7f7b226e616d65223a20226c6f636b202300000000000000000000000000000000815260008351610779816010850160208801610452565b7f222c20226465736372697074696f6e223a2022417263686c79206c6f636b73206010918401918201527f63616e206265207573656420746f20766f7465206f6e20746f6b656e20656d6960308201527f7373696f6e20616e64207265636569766520627269626573222c2022696d616760508201527f65223a2022646174613a696d6167652f7376672b786d6c3b6261736536342c006070820152835161082881608f840160208801610452565b7f227d000000000000000000000000000000000000000000000000000000000000608f9290910191820152609101949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161089681601d850160208701610452565b91909101601d0192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610903576109036108a3565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826109485761094861090a565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8181038181111561098f5761098f6108a3565b92915050565b6000826109a4576109a461090a565b500690565b8082018082111561098f5761098f6108a3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b808202811582820484141761098f5761098f6108a356fe3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f73766722207072657365727665417370656374526174696f3d22784d696e594d696e206d656574222076696577426f783d223020302033353020333530223e3c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a20313470783b207d3c2f7374796c653e3c726563742077696474683d223130302522206865696768743d2231303025222066696c6c3d22626c61636b22202f3e3c7465787420783d2231302220793d2232302220636c6173733d2262617365223e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa264697066735822122013042afec25b470123aa0904d42d80072a788adaf1dff7a05a2f90515906019064736f6c63430008160033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063dd9ec14914610030575b600080fd5b61004361003e366004610420565b610059565b6040516100509190610476565b60405180910390f35b606060405180610120016040528060fd8152602001610a0360fd913990508061008186610190565b6040516020016100929291906104c7565b6040516020818303038152906040529050806100ad85610190565b6040516020016100be92919061056f565b6040516020818303038152906040529050806100d984610190565b6040516020016100ea929190610617565b60405160208183030381529060405290508061010583610190565b6040516020016101169291906106bf565b6040516020818303038152906040529050600061016361013587610190565b61013e846102cd565b60405160200161014f929190610741565b6040516020818303038152906040526102cd565b905080604051602001610176919061085e565b604051602081830303815290604052915050949350505050565b6060816000036101d357505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156101fd57806101e7816108d2565b91506101f69050600a83610939565b91506101d7565b60008167ffffffffffffffff8111156102185761021861094d565b6040519080825280601f01601f191660200182016040528015610242576020820181803683370190505b5090505b84156102c55761025760018361097c565b9150610264600a86610995565b61026f9060306109a9565b60f81b818381518110610284576102846109bc565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506102be600a86610939565b9450610246565b949350505050565b606081516000036102ec57505060408051602081019091526000815290565b6000604051806060016040528060408152602001610b00604091399050600060038451600261031b91906109a9565b6103259190610939565b6103309060046109eb565b67ffffffffffffffff8111156103485761034861094d565b6040519080825280601f01601f191660200182016040528015610372576020820181803683370190505b509050600182016020820185865187015b808210156103de576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250610383565b50506003865106600181146103fa576002811461040d57610415565b603d6001830353603d6002830353610415565b603d60018303535b509195945050505050565b6000806000806080858703121561043657600080fd5b5050823594602084013594506040840135936060013592509050565b60005b8381101561046d578181015183820152602001610455565b50506000910152565b6020815260008251806020840152610495816040850160208701610452565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600083516104d9818460208801610452565b7f746f6b656e2000000000000000000000000000000000000000000000000000009083019081528351610513816006840160208801610452565b7f3c2f746578743e3c7465787420783d2231302220793d2234302220636c617373600692909101918201527f3d2262617365223e0000000000000000000000000000000000000000000000006026820152602e01949350505050565b60008351610581818460208801610452565b7f62616c616e63654f66200000000000000000000000000000000000000000000090830190815283516105bb81600a840160208801610452565b7f3c2f746578743e3c7465787420783d2231302220793d2236302220636c617373600a92909101918201527f3d2262617365223e000000000000000000000000000000000000000000000000602a820152603201949350505050565b60008351610629818460208801610452565b7f6c6f636b65645f656e6420000000000000000000000000000000000000000000908301908152835161066381600b840160208801610452565b7f3c2f746578743e3c7465787420783d2231302220793d2238302220636c617373600b92909101918201527f3d2262617365223e000000000000000000000000000000000000000000000000602b820152603301949350505050565b600083516106d1818460208801610452565b7f76616c7565200000000000000000000000000000000000000000000000000000908301908152835161070b816006840160208801610452565b7f3c2f746578743e3c2f7376673e0000000000000000000000000000000000000060069290910191820152601301949350505050565b7f7b226e616d65223a20226c6f636b202300000000000000000000000000000000815260008351610779816010850160208801610452565b7f222c20226465736372697074696f6e223a2022417263686c79206c6f636b73206010918401918201527f63616e206265207573656420746f20766f7465206f6e20746f6b656e20656d6960308201527f7373696f6e20616e64207265636569766520627269626573222c2022696d616760508201527f65223a2022646174613a696d6167652f7376672b786d6c3b6261736536342c006070820152835161082881608f840160208801610452565b7f227d000000000000000000000000000000000000000000000000000000000000608f9290910191820152609101949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161089681601d850160208701610452565b91909101601d0192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610903576109036108a3565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826109485761094861090a565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8181038181111561098f5761098f6108a3565b92915050565b6000826109a4576109a461090a565b500690565b8082018082111561098f5761098f6108a3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b808202811582820484141761098f5761098f6108a356fe3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f73766722207072657365727665417370656374526174696f3d22784d696e594d696e206d656574222076696577426f783d223020302033353020333530223e3c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a20313470783b207d3c2f7374796c653e3c726563742077696474683d223130302522206865696768743d2231303025222066696c6c3d22626c61636b22202f3e3c7465787420783d2231302220793d2232302220636c6173733d2262617365223e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa264697066735822122013042afec25b470123aa0904d42d80072a788adaf1dff7a05a2f90515906019064736f6c63430008160033

Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

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.