AVAX Price: $23.79 (+0.82%)
Gas: 26 nAVAX
 

Overview

AVAX Balance

Avalanche C-Chain LogoAvalanche C-Chain LogoAvalanche C-Chain Logo0 AVAX

AVAX Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Latest 1 internal transaction

Parent Transaction Hash Block From To
387646582023-12-08 4:48:49277 days ago1702010929  Contract Creation0 AVAX
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VeArtProxy

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
Yes with 800 runs

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

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

contract VeArtProxy is IVeArtProxy {

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

    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": "ve locks, can be used to boost gauge yields, direct token emissions, and earn rewards", "image": "data:image/svg+xml;base64,',
                        Base64.encode(bytes(output)),
                        '"}'
                    )
                )
            )
        );
        output = string(
            abi.encodePacked("data:application/json;base64,", json)
        );
    }
}

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

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

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

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

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 800
  },
  "evmVersion": "paris",
  "viaIR": true,
  "metadata": {
    "bytecodeHash": "none"
  },
  "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"}]

6080806040523461001657610997908161001c8239f35b600080fdfe604060808152600436101561001357600080fd5b60003560e01c63dd9ec1491461002857600080fd5b346104165760803660031901126104165760043590610045610503565b9161004f8161072c565b8251809160209586830161006291610659565b7f746f6b656e200000000000000000000000000000000000000000000000000000815260060161009191610659565b7f3c2f746578743e3c7465787420783d2231302220793d2234302220636c6173738152671e913130b9b2911f60c11b60208201526028010391601f199283810183526100dd90836104a1565b6100e860243561072c565b9184519283918783016100fa91610659565b7f62616c616e63654f6620000000000000000000000000000000000000000000008152600a0161012991610659565b7f3c2f746578743e3c7465787420783d2231302220793d2236302220636c6173738152671e913130b9b2911f60c11b602082015260280103838101835261017090836104a1565b61017b60443561072c565b91845192839187830161018d91610659565b7f6c6f636b65645f656e64200000000000000000000000000000000000000000008152600b016101bc91610659565b7f3c2f746578743e3c7465787420783d2231302220793d2238302220636c6173738152671e913130b9b2911f60c11b602082015260280103838101835261020390836104a1565b61020e60643561072c565b91845192839187830161022091610659565b7f76616c7565200000000000000000000000000000000000000000000000000000815260060161024f91610659565b7f3c2f746578743e3c2f7376673e000000000000000000000000000000000000008152600d0103838101835261028590836104a1565b61028e9061072c565b906102989061088a565b83517f7b226e616d65223a20226c6f636b20230000000000000000000000000000000086820190815290928392916010016102d291610659565b7f222c20226465736372697074696f6e223a20227665206c6f636b732c2063616e81527f206265207573656420746f20626f6f7374206761756765207969656c64732c2060208201527f64697265637420746f6b656e20656d697373696f6e732c20616e64206561726e60408201527f2072657761726473222c2022696d616765223a2022646174613a696d6167652f60608201527f7376672b786d6c3b6261736536342c00000000000000000000000000000000006080820152608f0161039991610659565b61227d60f01b81526002010382810182526103b490826104a1565b6103bd9061088a565b82517f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000094810194855293849190601d016103f691610659565b03908101835261040690836104a1565b5161041281928261043e565b0390f35b600080fd5b60005b83811061042e5750506000910152565b818101518382015260200161041e565b6040916020825261045e815180928160208601526020868601910161041b565b601f01601f1916010190565b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761049c57604052565b61046a565b90601f8019910116810190811067ffffffffffffffff82111761049c57604052565b67ffffffffffffffff811161049c57601f01601f191660200190565b604051906020820182811067ffffffffffffffff82111761049c5760405260008252565b60405190610120820182811067ffffffffffffffff82111761049c5760405260fd82527f7420783d2231302220793d2232302220636c6173733d2262617365223e000000610100837f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323060208201527f30302f73766722207072657365727665417370656374526174696f3d22784d6960408201527f6e594d696e206d656574222076696577426f783d22302030203335302033353060608201527f223e3c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f60808201527f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a2031347060a08201527f783b207d3c2f7374796c653e3c726563742077696474683d223130302522206860c08201527f65696768743d2231303025222066696c6c3d22626c61636b22202f3e3c74657860e08201520152565b9061066c6020928281519485920161041b565b0190565b634e487b7160e01b600052601160045260246000fd5b60001981146106955760010190565b610670565b906106a4826104c3565b6106b160405191826104a1565b82815280926106c2601f19916104c3565b0190602036910137565b60001981019190821161069557565b603001908160301161069557565b906002820180921161069557565b906020820180921161069557565b908151811015610716570160200190565b634e487b7160e01b600052603260045260246000fd5b80156107cc576000818181805b6107b457506107478161069a565b935b6107535750505090565b61075c906106cc565b90600a9061079f6107776107718484066106db565b60ff1690565b60f81b7fff000000000000000000000000000000000000000000000000000000000000001690565b841a6107ab8487610705565b53049081610749565b91506107c1600a91610686565b910480849291610739565b506040516107d981610480565b60018152600360fc1b602082015290565b908160021b917f3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81160361069557565b604051906060820182811067ffffffffffffffff82111761049c57604052604082527f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f6040837f4142434445464748494a4b4c4d4e4f505152535455565758595a61626364656660208201520152565b805190811561097d576108ae6108a96108a2846106e9565b6003900490565b6107ea565b916108c06108bb846106f7565b61069a565b906108c961081a565b92600092602081015b8484811015610936579060049160038091019685010151600180603f81818560121c168c0101518b60089160ff9586918282878b600c1c16860101511690851b01841b92858960061c160101511601901b93168a010151160160e01b8152016108d2565b50935094935050600390068060011461096957600214610957575b50815290565b603d60f81b6000199091015238610951565b50613d3d60f01b6001199091015238610951565b50506109876104df565b9056fea164736f6c6343000816000a

Deployed Bytecode

0x604060808152600436101561001357600080fd5b60003560e01c63dd9ec1491461002857600080fd5b346104165760803660031901126104165760043590610045610503565b9161004f8161072c565b8251809160209586830161006291610659565b7f746f6b656e200000000000000000000000000000000000000000000000000000815260060161009191610659565b7f3c2f746578743e3c7465787420783d2231302220793d2234302220636c6173738152671e913130b9b2911f60c11b60208201526028010391601f199283810183526100dd90836104a1565b6100e860243561072c565b9184519283918783016100fa91610659565b7f62616c616e63654f6620000000000000000000000000000000000000000000008152600a0161012991610659565b7f3c2f746578743e3c7465787420783d2231302220793d2236302220636c6173738152671e913130b9b2911f60c11b602082015260280103838101835261017090836104a1565b61017b60443561072c565b91845192839187830161018d91610659565b7f6c6f636b65645f656e64200000000000000000000000000000000000000000008152600b016101bc91610659565b7f3c2f746578743e3c7465787420783d2231302220793d2238302220636c6173738152671e913130b9b2911f60c11b602082015260280103838101835261020390836104a1565b61020e60643561072c565b91845192839187830161022091610659565b7f76616c7565200000000000000000000000000000000000000000000000000000815260060161024f91610659565b7f3c2f746578743e3c2f7376673e000000000000000000000000000000000000008152600d0103838101835261028590836104a1565b61028e9061072c565b906102989061088a565b83517f7b226e616d65223a20226c6f636b20230000000000000000000000000000000086820190815290928392916010016102d291610659565b7f222c20226465736372697074696f6e223a20227665206c6f636b732c2063616e81527f206265207573656420746f20626f6f7374206761756765207969656c64732c2060208201527f64697265637420746f6b656e20656d697373696f6e732c20616e64206561726e60408201527f2072657761726473222c2022696d616765223a2022646174613a696d6167652f60608201527f7376672b786d6c3b6261736536342c00000000000000000000000000000000006080820152608f0161039991610659565b61227d60f01b81526002010382810182526103b490826104a1565b6103bd9061088a565b82517f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000094810194855293849190601d016103f691610659565b03908101835261040690836104a1565b5161041281928261043e565b0390f35b600080fd5b60005b83811061042e5750506000910152565b818101518382015260200161041e565b6040916020825261045e815180928160208601526020868601910161041b565b601f01601f1916010190565b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761049c57604052565b61046a565b90601f8019910116810190811067ffffffffffffffff82111761049c57604052565b67ffffffffffffffff811161049c57601f01601f191660200190565b604051906020820182811067ffffffffffffffff82111761049c5760405260008252565b60405190610120820182811067ffffffffffffffff82111761049c5760405260fd82527f7420783d2231302220793d2232302220636c6173733d2262617365223e000000610100837f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323060208201527f30302f73766722207072657365727665417370656374526174696f3d22784d6960408201527f6e594d696e206d656574222076696577426f783d22302030203335302033353060608201527f223e3c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f60808201527f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a2031347060a08201527f783b207d3c2f7374796c653e3c726563742077696474683d223130302522206860c08201527f65696768743d2231303025222066696c6c3d22626c61636b22202f3e3c74657860e08201520152565b9061066c6020928281519485920161041b565b0190565b634e487b7160e01b600052601160045260246000fd5b60001981146106955760010190565b610670565b906106a4826104c3565b6106b160405191826104a1565b82815280926106c2601f19916104c3565b0190602036910137565b60001981019190821161069557565b603001908160301161069557565b906002820180921161069557565b906020820180921161069557565b908151811015610716570160200190565b634e487b7160e01b600052603260045260246000fd5b80156107cc576000818181805b6107b457506107478161069a565b935b6107535750505090565b61075c906106cc565b90600a9061079f6107776107718484066106db565b60ff1690565b60f81b7fff000000000000000000000000000000000000000000000000000000000000001690565b841a6107ab8487610705565b53049081610749565b91506107c1600a91610686565b910480849291610739565b506040516107d981610480565b60018152600360fc1b602082015290565b908160021b917f3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81160361069557565b604051906060820182811067ffffffffffffffff82111761049c57604052604082527f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f6040837f4142434445464748494a4b4c4d4e4f505152535455565758595a61626364656660208201520152565b805190811561097d576108ae6108a96108a2846106e9565b6003900490565b6107ea565b916108c06108bb846106f7565b61069a565b906108c961081a565b92600092602081015b8484811015610936579060049160038091019685010151600180603f81818560121c168c0101518b60089160ff9586918282878b600c1c16860101511690851b01841b92858960061c160101511601901b93168a010151160160e01b8152016108d2565b50935094935050600390068060011461096957600214610957575b50815290565b603d60f81b6000199091015238610951565b50613d3d60f01b6001199091015238610951565b50506109876104df565b9056fea164736f6c6343000816000a

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
[ 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.