Contract

0xF00941fd53D1292D093EE0411520a2a545470689

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

-

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

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xF2B3038C...47b4c90D6
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
VeArtProxy

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 100000 runs

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

import { Base64 } from "./libraries/Base64.sol";
import { IVeArtProxy } from "./interfaces/IVeArtProxy.sol";

/// @title VeArtProxy
/// @author Rings Protocol
/// @notice VeArtProxy is a contract for generating SVG images for VeArt NFTs
/// it is a fork of Thena's VeArtProxy contract
contract VeArtProxy is IVeArtProxy {
    /*//////////////////////////////////////////////////////////////
                              CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor() { }

    /*//////////////////////////////////////////////////////////////
                            VIEW FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    /**
     * @notice Returns the SVG image for a given token
     * @param _tokenId The token ID
     * @param _balanceOf The balance of the token
     * @param _locked_end The end of the lock period
     * @param _value The value of the token
     * @return output The SVG image
     */
    function _tokenURI(uint256 _tokenId, uint256 _balanceOf, uint256 _locked_end, uint256 _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": "Rings locks, can be used to boost gauge yields, 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));
    }

    /*//////////////////////////////////////////////////////////////
                            INTERNAL FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    function toString(uint256 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";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }
}

File 2 of 3 : Base64.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

/// [MIT License]
/// @title Base64
/// @notice Provides a function for encoding some bytes in base64
/// @author Brecht Devos <[email protected]>
library Base64 {
    bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    /// @notice Encodes some bytes to the base64 representation
    function encode(bytes memory data) internal pure returns (string memory) {
        uint256 len = data.length;
        if (len == 0) return "";

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((len + 2) / 3);

        // Add some extra buffer at the end
        bytes memory result = new bytes(encodedLen + 32);

        bytes memory table = TABLE;

        assembly {
            let tablePtr := add(table, 1)
            let resultPtr := add(result, 32)

            for { let i := 0 } lt(i, len) { } {
                i := add(i, 3)
                let input := and(mload(add(data, i)), 0xffffff)

                let out := mload(add(tablePtr, and(shr(18, input), 0x3F)))
                out := shl(8, out)
                out := add(out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF))
                out := shl(8, out)
                out := add(out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF))
                out := shl(8, out)
                out := add(out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF))
                out := shl(224, out)

                mstore(resultPtr, out)

                resultPtr := add(resultPtr, 4)
            }

            switch mod(len, 3)
            case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
            case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }

            mstore(result, encodedLen)
        }

        return string(result);
    }
}

File 3 of 3 : IVeArtProxy.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.24;

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

Settings
{
  "remappings": [
    "ds-test/=lib/solmate/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "solmate/=lib/solmate/src/",
    "solady/=lib/solady/src/",
    "src/=src/",
    "test/=test/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 100000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "none",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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"}]

Deployed Bytecode

0x6040608081526004361015610012575f80fd5b5f3560e01c63dd9ec14914610025575f80fd5b346104a95760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104a95760043590610060610604565b9161006a816108b4565b8251809160209586830161007d9161075a565b7f746f6b656e20000000000000000000000000000000000000000000000000000081526006016100ac9161075a565b7f3c2f746578743e3c7465787420783d2231302220793d2234302220636c61737381527f3d2262617365223e000000000000000000000000000000000000000000000000602082015260280103917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092838101835261012b9083610566565b6101366024356108b4565b9184519283918783016101489161075a565b7f62616c616e63654f6620000000000000000000000000000000000000000000008152600a016101779161075a565b7f3c2f746578743e3c7465787420783d2231302220793d2236302220636c61737381527f3d2262617365223e00000000000000000000000000000000000000000000000060208201526028010383810183526101d39083610566565b6101de6044356108b4565b9184519283918783016101f09161075a565b7f6c6f636b65645f656e64200000000000000000000000000000000000000000008152600b0161021f9161075a565b7f3c2f746578743e3c7465787420783d2231302220793d2238302220636c61737381527f3d2262617365223e000000000000000000000000000000000000000000000000602082015260280103838101835261027b9083610566565b6102866064356108b4565b9184519283918783016102989161075a565b7f76616c756520000000000000000000000000000000000000000000000000000081526006016102c79161075a565b7f3c2f746578743e3c2f7376673e000000000000000000000000000000000000008152600d010383810183526102fd9083610566565b610306906108b4565b9061031090610a2b565b83517f7b226e616d65223a20226c6f636b202300000000000000000000000000000000868201908152909283929160100161034a9161075a565b7f222c20226465736372697074696f6e223a202252696e6773206c6f636b732c2081527f63616e206265207573656420746f20626f6f7374206761756765207969656c6460208201527f732c20766f7465206f6e20746f6b656e20656d697373696f6e2c20616e64207260408201527f65636569766520627269626573222c2022696d616765223a2022646174613a6960608201527f6d6167652f7376672b786d6c3b6261736536342c00000000000000000000000060808201526094016104119161075a565b7f227d00000000000000000000000000000000000000000000000000000000000081526002010382810182526104479082610566565b61045090610a2b565b82517f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000094810194855293849190601d016104899161075a565b0390810183526104999083610566565b516104a58192826104ce565b0390f35b5f80fd5b5f5b8381106104be5750505f910152565b81810151838201526020016104af565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6040936020845261051181518092816020880152602088880191016104ad565b0116010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040810190811067ffffffffffffffff82111761056157604052565b610518565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761056157604052565b67ffffffffffffffff811161056157601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b604051906020820182811067ffffffffffffffff821117610561576040525f8252565b60405190610120820182811067ffffffffffffffff8211176105615760405260fd82527f7420783d2231302220793d2232302220636c6173733d2262617365223e000000610100837f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323060208201527f30302f73766722207072657365727665417370656374526174696f3d22784d6960408201527f6e594d696e206d656574222076696577426f783d22302030203335302033353060608201527f223e3c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f60808201527f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a2031347060a08201527f783b207d3c2f7374796c653e3c726563742077696474683d223130302522206860c08201527f65696768743d2231303025222066696c6c3d22626c61636b22202f3e3c74657860e08201520152565b9061076d602092828151948592016104ad565b0190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107cb5760010190565b610771565b906107da826105a7565b6107e76040519182610566565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061081582946105a7565b0190602036910137565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116107cb57565b60300190816030116107cb57565b90600282018092116107cb57565b90602082018092116107cb57565b908151811015610887570160200190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b801561095157805f81805b61093957506108cd816107d0565b925b6108d857505090565b6108e19061081f565b90600a906109246108fc6108f684840661084c565b60ff1690565b60f81b7fff000000000000000000000000000000000000000000000000000000000000001690565b5f1a6109308486610876565b530490816108cf565b9150610946600a9161079e565b9104808392916108bf565b5060405161095e81610545565b600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b908160021b917f3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116036107cb57565b604051906060820182811067ffffffffffffffff82111761056157604052604082527f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f6040837f4142434445464748494a4b4c4d4e4f505152535455565758595a61626364656660208201520152565b8051908115610b8e57610a4f610a4a610a438461085a565b6003900490565b61098b565b91610a61610a5c84610868565b6107d0565b90610a6a6109bb565b925f92602081015b8484811015610ad6579060049160038091019685010151600180603f81818560121c168c0101518b60089160ff9586918282878b600c1c16860101511690851b01841b92858960061c160101511601901b93168a010151160160e01b815201610a72565b509350949350506003900680600114610b4257600214610af7575b50815290565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f3d000000000000000000000000000000000000000000000000000000000000009101525f610af1565b507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f3d3d0000000000000000000000000000000000000000000000000000000000009101525f610af1565b5050610b986105e1565b9056fea164736f6c6343000818000a

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.