Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
SVGRenderer
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 10000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 /// @title A contract used to convert multi-part RLE compressed images to SVG /********************************* * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░█████████░░█████████░░░ * * ░░░░░░██░░░████░░██░░░████░░░ * * ░░██████░░░████████░░░████░░░ * * ░░██░░██░░░████░░██░░░████░░░ * * ░░██░░██░░░████░░██░░░████░░░ * * ░░░░░░█████████░░█████████░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * *********************************/ pragma solidity ^0.8.6; import { ISVGRenderer } from './interfaces/ISVGRenderer.sol'; contract SVGRenderer is ISVGRenderer { bytes16 private constant _HEX_SYMBOLS = '0123456789abcdef'; uint256 private constant _INDEX_TO_BYTES3_FACTOR = 3; // prettier-ignore string private constant _SVG_START_TAG = '<svg width="320" height="320" viewBox="0 0 320 320" xmlns="http://www.w3.org/2000/svg" shape-rendering="crispEdges">'; string private constant _SVG_END_TAG = '</svg>'; struct ContentBounds { uint8 top; uint8 right; uint8 bottom; uint8 left; } struct Draw { uint8 length; uint8 colorIndex; } struct DecodedImage { ContentBounds bounds; Draw[] draws; } /** * @notice Given RLE image data and color palette pointers, merge to generate a single SVG image. */ function generateSVG(SVGParams calldata params) external pure override returns (string memory svg) { if (bytes(params.background).length != 0) { // prettier-ignore return string( abi.encodePacked( _SVG_START_TAG, '<rect width="100%" height="100%" fill="#', params.background, '" />', _generateSVGRects(params), _SVG_END_TAG ) ); } return string(abi.encodePacked(_SVG_START_TAG, _generateSVGRects(params), _SVG_END_TAG)); } /** * @notice Given RLE image data and a color palette pointer, merge to generate a partial SVG image. */ function generateSVGPart(Part calldata part) external pure override returns (string memory partialSVG) { Part[] memory parts = new Part[](1); parts[0] = part; return _generateSVGRects(SVGParams({ parts: parts, background: '' })); } /** * @notice Given RLE image data and color palette pointers, merge to generate a partial SVG image. */ function generateSVGParts(Part[] calldata parts) external pure override returns (string memory partialSVG) { return _generateSVGRects(SVGParams({ parts: parts, background: '' })); } /** * @notice Given RLE image parts and color palettes, generate SVG rects. */ // prettier-ignore function _generateSVGRects(SVGParams memory params) private pure returns (string memory svg) { string[33] memory lookup = [ '0', '10', '20', '30', '40', '50', '60', '70', '80', '90', '100', '110', '120', '130', '140', '150', '160', '170', '180', '190', '200', '210', '220', '230', '240', '250', '260', '270', '280', '290', '300', '310', '320' ]; string memory rects; string[] memory cache; for (uint8 p = 0; p < params.parts.length; p++) { cache = new string[](256); // Initialize color cache DecodedImage memory image = _decodeRLEImage(params.parts[p].image); bytes memory palette = params.parts[p].palette; uint256 currentX = image.bounds.left; uint256 currentY = image.bounds.top; uint256 cursor; string[16] memory buffer; string memory part; for (uint256 i = 0; i < image.draws.length; i++) { Draw memory draw = image.draws[i]; uint8 length = _getRectLength(currentX, draw.length, image.bounds.right); while (length > 0) { if (draw.colorIndex != 0) { buffer[cursor] = lookup[length]; // width buffer[cursor + 1] = lookup[currentX]; // x buffer[cursor + 2] = lookup[currentY]; // y buffer[cursor + 3] = _getColor(palette, draw.colorIndex, cache); // color cursor += 4; if (cursor >= 16) { part = string(abi.encodePacked(part, _getChunk(cursor, buffer))); cursor = 0; } } currentX += length; if (currentX == image.bounds.right) { currentX = image.bounds.left; currentY++; } draw.length -= length; length = _getRectLength(currentX, draw.length, image.bounds.right); } } if (cursor != 0) { part = string(abi.encodePacked(part, _getChunk(cursor, buffer))); } rects = string(abi.encodePacked(rects, part)); } return rects; } /** * @notice Given an x-coordinate, draw length, and right bound, return the draw * length for a single SVG rectangle. */ function _getRectLength( uint256 currentX, uint8 drawLength, uint8 rightBound ) private pure returns (uint8) { uint8 remainingPixelsInLine = rightBound - uint8(currentX); return drawLength <= remainingPixelsInLine ? drawLength : remainingPixelsInLine; } /** * @notice Return a string that consists of all rects in the provided `buffer`. */ // prettier-ignore function _getChunk(uint256 cursor, string[16] memory buffer) private pure returns (string memory) { string memory chunk; for (uint256 i = 0; i < cursor; i += 4) { chunk = string( abi.encodePacked( chunk, '<rect width="', buffer[i], '" height="10" x="', buffer[i + 1], '" y="', buffer[i + 2], '" fill="#', buffer[i + 3], '" />' ) ); } return chunk; } /** * @notice Decode a single RLE compressed image into a `DecodedImage`. */ function _decodeRLEImage(bytes memory image) private pure returns (DecodedImage memory) { ContentBounds memory bounds = ContentBounds({ top: uint8(image[1]), right: uint8(image[2]), bottom: uint8(image[3]), left: uint8(image[4]) }); uint256 cursor; Draw[] memory draws = new Draw[]((image.length - 5) / 2); for (uint256 i = 5; i < image.length; i += 2) { draws[cursor] = Draw({ length: uint8(image[i]), colorIndex: uint8(image[i + 1]) }); cursor++; } return DecodedImage({ bounds: bounds, draws: draws }); } /** * @notice Get the target hex color code from the cache. Populate the cache if * the color code does not yet exist. */ function _getColor( bytes memory palette, uint256 index, string[] memory cache ) private pure returns (string memory) { if (bytes(cache[index]).length == 0) { uint256 i = index * _INDEX_TO_BYTES3_FACTOR; cache[index] = _toHexString(abi.encodePacked(palette[i], palette[i + 1], palette[i + 2])); } return cache[index]; } /** * @dev Convert `bytes` to a 6 character ASCII `string` hexadecimal representation. */ function _toHexString(bytes memory b) private pure returns (string memory) { uint24 value = uint24(bytes3(b)); bytes memory buffer = new bytes(6); buffer[5] = _HEX_SYMBOLS[value & 0xf]; buffer[4] = _HEX_SYMBOLS[(value >> 4) & 0xf]; buffer[3] = _HEX_SYMBOLS[(value >> 8) & 0xf]; buffer[2] = _HEX_SYMBOLS[(value >> 12) & 0xf]; buffer[1] = _HEX_SYMBOLS[(value >> 16) & 0xf]; buffer[0] = _HEX_SYMBOLS[(value >> 20) & 0xf]; return string(buffer); } }
// SPDX-License-Identifier: GPL-3.0 /// @title Interface for SVGRenderer /********************************* * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░█████████░░█████████░░░ * * ░░░░░░██░░░████░░██░░░████░░░ * * ░░██████░░░████████░░░████░░░ * * ░░██░░██░░░████░░██░░░████░░░ * * ░░██░░██░░░████░░██░░░████░░░ * * ░░░░░░█████████░░█████████░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * *********************************/ pragma solidity ^0.8.6; interface ISVGRenderer { struct Part { bytes image; bytes palette; } struct SVGParams { Part[] parts; string background; } function generateSVG(SVGParams memory params) external view returns (string memory svg); function generateSVGPart(Part memory part) external view returns (string memory partialSVG); function generateSVGParts(Part[] memory parts) external view returns (string memory partialSVG); }
{ "optimizer": { "enabled": true, "runs": 10000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"components":[{"components":[{"internalType":"bytes","name":"image","type":"bytes"},{"internalType":"bytes","name":"palette","type":"bytes"}],"internalType":"struct ISVGRenderer.Part[]","name":"parts","type":"tuple[]"},{"internalType":"string","name":"background","type":"string"}],"internalType":"struct ISVGRenderer.SVGParams","name":"params","type":"tuple"}],"name":"generateSVG","outputs":[{"internalType":"string","name":"svg","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"image","type":"bytes"},{"internalType":"bytes","name":"palette","type":"bytes"}],"internalType":"struct ISVGRenderer.Part","name":"part","type":"tuple"}],"name":"generateSVGPart","outputs":[{"internalType":"string","name":"partialSVG","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"image","type":"bytes"},{"internalType":"bytes","name":"palette","type":"bytes"}],"internalType":"struct ISVGRenderer.Part[]","name":"parts","type":"tuple[]"}],"name":"generateSVGParts","outputs":[{"internalType":"string","name":"partialSVG","type":"string"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50611e0a806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80635ea01e63146100465780636146ec8e1461006f578063ead0ae8414610082575b600080fd5b61005961005436600461149e565b610095565b604051610066919061150b565b60405180910390f35b61005961007d36600461149e565b6101af565b61005961009036600461155c565b61024d565b60606100a460208301836115d1565b159050610142576040518060a0016040528060748152602001611d61607491396100d160208401846115d1565b6100e26100dd8661186e565b610280565b6040518060400160405280600681526020017f3c2f7376673e000000000000000000000000000000000000000000000000000081525060405160200161012c9594939291906118f9565b6040516020818303038152906040529050919050565b6040518060a0016040528060748152602001611d61607491396101676100dd8461186e565b6040518060400160405280600681526020017f3c2f7376673e000000000000000000000000000000000000000000000000000081525060405160200161012c939291906119c1565b60408051600180825281830190925260609160009190816020015b60408051808201909152606080825260208201528152602001906001900390816101ca5790505090506101fc83611a04565b8160008151811061020f5761020f611a16565b6020026020010181905250610246604051806040016040528083815260200160405180602001604052806000815250815250610280565b9392505050565b6060610246604051806040016040528085859061026a9190611a45565b8152604080516020818101909252600081529101525b6040805161046081018252600161042082019081527f300000000000000000000000000000000000000000000000000000000000000061044083015281528151808301835260028082527f313000000000000000000000000000000000000000000000000000000000000060208381019190915280840192909252835180850185528181527f32300000000000000000000000000000000000000000000000000000000000008184015283850152835180850185528181527f333000000000000000000000000000000000000000000000000000000000000081840152606084810191909152845180860186528281527f3430000000000000000000000000000000000000000000000000000000000000818501526080850152845180860186528281527f35300000000000000000000000000000000000000000000000000000000000008185015260a0850152845180860186528281527f36300000000000000000000000000000000000000000000000000000000000008185015260c0850152845180860186528281527f37300000000000000000000000000000000000000000000000000000000000008185015260e0850152845180860186528281527f383000000000000000000000000000000000000000000000000000000000000081850152610100850152845180860186529182527f3930000000000000000000000000000000000000000000000000000000000000828401526101208401919091528351808501855260038082527f313030000000000000000000000000000000000000000000000000000000000082850152610140850191909152845180860186528181527f313130000000000000000000000000000000000000000000000000000000000081850152610160850152845180860186528181527f313230000000000000000000000000000000000000000000000000000000000081850152610180850152845180860186528181527f3133300000000000000000000000000000000000000000000000000000000000818501526101a0850152845180860186528181527f3134300000000000000000000000000000000000000000000000000000000000818501526101c0850152845180860186528181527f3135300000000000000000000000000000000000000000000000000000000000818501526101e0850152845180860186528181527f313630000000000000000000000000000000000000000000000000000000000081850152610200850152845180860186528181527f313730000000000000000000000000000000000000000000000000000000000081850152610220850152845180860186528181527f313830000000000000000000000000000000000000000000000000000000000081850152610240850152845180860186528181527f313930000000000000000000000000000000000000000000000000000000000081850152610260850152845180860186528181527f323030000000000000000000000000000000000000000000000000000000000081850152610280850152845180860186528181527f3231300000000000000000000000000000000000000000000000000000000000818501526102a0850152845180860186528181527f3232300000000000000000000000000000000000000000000000000000000000818501526102c0850152845180860186528181527f3233300000000000000000000000000000000000000000000000000000000000818501526102e0850152845180860186528181527f323430000000000000000000000000000000000000000000000000000000000081850152610300850152845180860186528181527f323530000000000000000000000000000000000000000000000000000000000081850152610320850152845180860186528181527f323630000000000000000000000000000000000000000000000000000000000081850152610340850152845180860186528181527f323730000000000000000000000000000000000000000000000000000000000081850152610360850152845180860186528181527f323830000000000000000000000000000000000000000000000000000000000081850152610380850152845180860186528181527f3239300000000000000000000000000000000000000000000000000000000000818501526103a0850152845180860186528181527f3330300000000000000000000000000000000000000000000000000000000000818501526103c0850152845180860186528181527f3331300000000000000000000000000000000000000000000000000000000000818501526103e0850152845180860190955284527f333230000000000000000000000000000000000000000000000000000000000091840191909152610400820192909252818060005b85515160ff82161015610c9f5760408051610100808252612020820190925290816020015b606081526020019060019003908161099b57905050915060006109e187600001518360ff16815181106109d0576109d0611a16565b602002602001015160000151610ca9565b9050600087600001518360ff16815181106109fe576109fe611a16565b602090810291909101810151015182516060810151905191925060ff90811691166000610a2961145e565b606060005b876020015151811015610c2c57600088602001518281518110610a5357610a53611a16565b602002602001015190506000610a768883600001518c6000015160200151610eab565b90505b60ff811615610c1757602082015160ff1615610bad578d8160ff1660218110610aa457610aa4611a16565b6020020151858760108110610abb57610abb611a16565b60200201528d8860218110610ad257610ad2611a16565b602002015185610ae3886001611a81565b60108110610af357610af3611a16565b60200201528d8760218110610b0a57610b0a611a16565b602002015185610b1b886002611a81565b60108110610b2b57610b2b611a16565b6020020181905250610b4589836020015160ff168e610ed9565b85610b51886003611a81565b60108110610b6157610b61611a16565b6020020152610b71600487611a81565b955060108610610bad5783610b868787611044565b604051602001610b97929190611a99565b6040516020818303038152906040529350600095505b610bba60ff821689611a81565b8a516020015190985060ff168803610be55789516060015160ff16975086610be181611ac8565b9750505b8082600001818151610bf79190611b00565b60ff1690525081518a5160200151610c10918a91610eab565b9050610a79565b50508080610c2490611ac8565b915050610a2e565b508215610c615780610c3e8484611044565b604051602001610c4f929190611a99565b60405160208183030381529060405290505b8981604051602001610c74929190611a99565b6040516020818303038152906040529950505050505050508080610c9790611b23565b915050610976565b5090949350505050565b6040805160c081018252600091810182815260608083018490526080830184905260a0830193909352815260208101919091526000604051806080016040528084600181518110610cfc57610cfc611a16565b0160209081015160f81c8252855191019085906002908110610d2057610d20611a16565b0160209081015160f81c8252855191019085906003908110610d4457610d44611a16565b0160209081015160f81c8252855191019085906004908110610d6857610d68611a16565b016020015160f81c905283519091506000908190600290610d8b90600590611b42565b610d959190611b59565b67ffffffffffffffff811115610dad57610dad61163d565b604051908082528060200260200182016040528015610df257816020015b6040805180820190915260008082526020820152815260200190600190039081610dcb5790505b50905060055b8551811015610e91576040518060400160405280878381518110610e1e57610e1e611a16565b0160209081015160f81c82520187610e37846001611a81565b81518110610e4757610e47611a16565b016020015160f81c90528251839085908110610e6557610e65611a16565b60200260200101819052508280610e7b90611ac8565b9350610e8a9050600282611a81565b9050610df8565b506040805180820190915292835260208301525092915050565b600080610eb88584611b00565b90508060ff168460ff161115610ece5780610ed0565b835b95945050505050565b6060818381518110610eed57610eed611a16565b602002602001015151600003611021576000610f0a600385611b94565b9050611002858281518110610f2157610f21611a16565b01602001517fff000000000000000000000000000000000000000000000000000000000000001686610f54846001611a81565b81518110610f6457610f64611a16565b01602001517fff000000000000000000000000000000000000000000000000000000000000001687610f97856002611a81565b81518110610fa757610fa7611a16565b016020908101516040517fff000000000000000000000000000000000000000000000000000000000000009485169281019290925291831660218201529116602282015260230160405160208183030381529060405261112b565b83858151811061101457611014611a16565b6020026020010181905250505b81838151811061103357611033611a16565b602002602001015190509392505050565b60608060005b84811015611123578184826010811061106557611065611a16565b602002015185611076846001611a81565b6010811061108657611086611a16565b602002015186611097856002611a81565b601081106110a7576110a7611a16565b6020020151876110b8866003611a81565b601081106110c8576110c8611a16565b60200201516040516020016110e1959493929190611bd1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052915061111c600482611a81565b905061104a565b509392505050565b6060600061113883611d10565b60408051600680825281830190925260e89290921c9250600091906020820181803683370190505090507f3031323334353637383961626364656600000000000000000000000000000000600f83166010811061119757611197611a16565b1a60f81b816005815181106111ae576111ae611a16565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3031323334353637383961626364656600000000000000000000000000000000600f600484901c166010811061121657611216611a16565b1a60f81b8160048151811061122d5761122d611a16565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3031323334353637383961626364656600000000000000000000000000000000600f600884901c166010811061129557611295611a16565b1a60f81b816003815181106112ac576112ac611a16565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3031323334353637383961626364656600000000000000000000000000000000600f600c84901c166010811061131457611314611a16565b1a60f81b8160028151811061132b5761132b611a16565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3031323334353637383961626364656600000000000000000000000000000000601083811c600f1690811061139257611392611a16565b1a60f81b816001815181106113a9576113a9611a16565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3031323334353637383961626364656600000000000000000000000000000000600f601484901c166010811061141157611411611a16565b1a60f81b8160008151811061142857611428611a16565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053509392505050565b6040518061020001604052806010905b606081526020019060019003908161146e5790505090565b60006040828403121561149857600080fd5b50919050565b6000602082840312156114b057600080fd5b813567ffffffffffffffff8111156114c757600080fd5b6114d384828501611486565b949350505050565b60005b838110156114f65781810151838201526020016114de565b83811115611505576000848401525b50505050565b602081526000825180602084015261152a8160408501602087016114db565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000806020838503121561156f57600080fd5b823567ffffffffffffffff8082111561158757600080fd5b818501915085601f83011261159b57600080fd5b8135818111156115aa57600080fd5b8660208260051b85010111156115bf57600080fd5b60209290920196919550909350505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261160657600080fd5b83018035915067ffffffffffffffff82111561162157600080fd5b60200191503681900382131561163657600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561168f5761168f61163d565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156116dc576116dc61163d565b604052919050565b600067ffffffffffffffff8311156116fe576116fe61163d565b61172f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601611695565b905082815283838301111561174357600080fd5b828260208301376000602084830101529392505050565b600082601f83011261176b57600080fd5b610246838335602085016116e4565b60006040828403121561178c57600080fd5b61179461166c565b9050813567ffffffffffffffff808211156117ae57600080fd5b6117ba8583860161175a565b835260208401359150808211156117d057600080fd5b506117dd8482850161175a565b60208301525092915050565b600067ffffffffffffffff808411156118045761180461163d565b8360051b6020611815818301611695565b8681529350908401908084018783111561182e57600080fd5b855b83811015611862578035858111156118485760008081fd5b6118548a828a0161177a565b835250908201908201611830565b50505050509392505050565b60006040823603121561188057600080fd5b61188861166c565b823567ffffffffffffffff808211156118a057600080fd5b9084019036601f8301126118b357600080fd5b6118c2368335602085016117e9565b835260208501359150808211156118d857600080fd5b50830136601f8201126118ea57600080fd5b6117dd368235602084016116e4565b6000865161190b818460208b016114db565b7f3c726563742077696474683d223130302522206865696768743d2231303025229083019081527f2066696c6c3d22230000000000000000000000000000000000000000000000006020820152858760288301377f22202f3e00000000000000000000000000000000000000000000000000000000602891870191820152845161199c81602c8401602089016114db565b84519101906119b281602c8401602088016114db565b01602c01979650505050505050565b600084516119d38184602089016114db565b8451908301906119e78183602089016114db565b84519101906119fa8183602088016114db565b0195945050505050565b6000611a10368361177a565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006102463684846117e9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115611a9457611a94611a52565b500190565b60008351611aab8184602088016114db565b835190830190611abf8183602088016114db565b01949350505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611af957611af9611a52565b5060010190565b600060ff821660ff841680821015611b1a57611b1a611a52565b90039392505050565b600060ff821660ff8103611b3957611b39611a52565b60010192915050565b600082821015611b5457611b54611a52565b500390565b600082611b8f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611bcc57611bcc611a52565b500290565b60008651611be3818460208b016114db565b7f3c726563742077696474683d22000000000000000000000000000000000000009083019081528651611c1d81600d840160208b016114db565b7f22206865696768743d2231302220783d22000000000000000000000000000000600d92909101918201528551611c5b81601e840160208a016114db565b7f2220793d22000000000000000000000000000000000000000000000000000000601e92909101918201528451611c998160238401602089016114db565b7f222066696c6c3d22230000000000000000000000000000000000000000000000602392909101918201528351611cd781602c8401602088016114db565b7f22202f3e00000000000000000000000000000000000000000000000000000000602c9290910191820152603001979650505050505050565b6000815160208301517fffffff000000000000000000000000000000000000000000000000000000000080821693506003831015611d585780818460030360031b1b83161693505b50505091905056fe3c7376672077696474683d2233323022206865696768743d22333230222076696577426f783d2230203020333230203332302220786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667222073686170652d72656e646572696e673d2263726973704564676573223ea2646970667358221220b41ca57fc618cf5693ed303639262217c4d2b04c212be0fe12a5867c2ac5abf364736f6c634300080f0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100415760003560e01c80635ea01e63146100465780636146ec8e1461006f578063ead0ae8414610082575b600080fd5b61005961005436600461149e565b610095565b604051610066919061150b565b60405180910390f35b61005961007d36600461149e565b6101af565b61005961009036600461155c565b61024d565b60606100a460208301836115d1565b159050610142576040518060a0016040528060748152602001611d61607491396100d160208401846115d1565b6100e26100dd8661186e565b610280565b6040518060400160405280600681526020017f3c2f7376673e000000000000000000000000000000000000000000000000000081525060405160200161012c9594939291906118f9565b6040516020818303038152906040529050919050565b6040518060a0016040528060748152602001611d61607491396101676100dd8461186e565b6040518060400160405280600681526020017f3c2f7376673e000000000000000000000000000000000000000000000000000081525060405160200161012c939291906119c1565b60408051600180825281830190925260609160009190816020015b60408051808201909152606080825260208201528152602001906001900390816101ca5790505090506101fc83611a04565b8160008151811061020f5761020f611a16565b6020026020010181905250610246604051806040016040528083815260200160405180602001604052806000815250815250610280565b9392505050565b6060610246604051806040016040528085859061026a9190611a45565b8152604080516020818101909252600081529101525b6040805161046081018252600161042082019081527f300000000000000000000000000000000000000000000000000000000000000061044083015281528151808301835260028082527f313000000000000000000000000000000000000000000000000000000000000060208381019190915280840192909252835180850185528181527f32300000000000000000000000000000000000000000000000000000000000008184015283850152835180850185528181527f333000000000000000000000000000000000000000000000000000000000000081840152606084810191909152845180860186528281527f3430000000000000000000000000000000000000000000000000000000000000818501526080850152845180860186528281527f35300000000000000000000000000000000000000000000000000000000000008185015260a0850152845180860186528281527f36300000000000000000000000000000000000000000000000000000000000008185015260c0850152845180860186528281527f37300000000000000000000000000000000000000000000000000000000000008185015260e0850152845180860186528281527f383000000000000000000000000000000000000000000000000000000000000081850152610100850152845180860186529182527f3930000000000000000000000000000000000000000000000000000000000000828401526101208401919091528351808501855260038082527f313030000000000000000000000000000000000000000000000000000000000082850152610140850191909152845180860186528181527f313130000000000000000000000000000000000000000000000000000000000081850152610160850152845180860186528181527f313230000000000000000000000000000000000000000000000000000000000081850152610180850152845180860186528181527f3133300000000000000000000000000000000000000000000000000000000000818501526101a0850152845180860186528181527f3134300000000000000000000000000000000000000000000000000000000000818501526101c0850152845180860186528181527f3135300000000000000000000000000000000000000000000000000000000000818501526101e0850152845180860186528181527f313630000000000000000000000000000000000000000000000000000000000081850152610200850152845180860186528181527f313730000000000000000000000000000000000000000000000000000000000081850152610220850152845180860186528181527f313830000000000000000000000000000000000000000000000000000000000081850152610240850152845180860186528181527f313930000000000000000000000000000000000000000000000000000000000081850152610260850152845180860186528181527f323030000000000000000000000000000000000000000000000000000000000081850152610280850152845180860186528181527f3231300000000000000000000000000000000000000000000000000000000000818501526102a0850152845180860186528181527f3232300000000000000000000000000000000000000000000000000000000000818501526102c0850152845180860186528181527f3233300000000000000000000000000000000000000000000000000000000000818501526102e0850152845180860186528181527f323430000000000000000000000000000000000000000000000000000000000081850152610300850152845180860186528181527f323530000000000000000000000000000000000000000000000000000000000081850152610320850152845180860186528181527f323630000000000000000000000000000000000000000000000000000000000081850152610340850152845180860186528181527f323730000000000000000000000000000000000000000000000000000000000081850152610360850152845180860186528181527f323830000000000000000000000000000000000000000000000000000000000081850152610380850152845180860186528181527f3239300000000000000000000000000000000000000000000000000000000000818501526103a0850152845180860186528181527f3330300000000000000000000000000000000000000000000000000000000000818501526103c0850152845180860186528181527f3331300000000000000000000000000000000000000000000000000000000000818501526103e0850152845180860190955284527f333230000000000000000000000000000000000000000000000000000000000091840191909152610400820192909252818060005b85515160ff82161015610c9f5760408051610100808252612020820190925290816020015b606081526020019060019003908161099b57905050915060006109e187600001518360ff16815181106109d0576109d0611a16565b602002602001015160000151610ca9565b9050600087600001518360ff16815181106109fe576109fe611a16565b602090810291909101810151015182516060810151905191925060ff90811691166000610a2961145e565b606060005b876020015151811015610c2c57600088602001518281518110610a5357610a53611a16565b602002602001015190506000610a768883600001518c6000015160200151610eab565b90505b60ff811615610c1757602082015160ff1615610bad578d8160ff1660218110610aa457610aa4611a16565b6020020151858760108110610abb57610abb611a16565b60200201528d8860218110610ad257610ad2611a16565b602002015185610ae3886001611a81565b60108110610af357610af3611a16565b60200201528d8760218110610b0a57610b0a611a16565b602002015185610b1b886002611a81565b60108110610b2b57610b2b611a16565b6020020181905250610b4589836020015160ff168e610ed9565b85610b51886003611a81565b60108110610b6157610b61611a16565b6020020152610b71600487611a81565b955060108610610bad5783610b868787611044565b604051602001610b97929190611a99565b6040516020818303038152906040529350600095505b610bba60ff821689611a81565b8a516020015190985060ff168803610be55789516060015160ff16975086610be181611ac8565b9750505b8082600001818151610bf79190611b00565b60ff1690525081518a5160200151610c10918a91610eab565b9050610a79565b50508080610c2490611ac8565b915050610a2e565b508215610c615780610c3e8484611044565b604051602001610c4f929190611a99565b60405160208183030381529060405290505b8981604051602001610c74929190611a99565b6040516020818303038152906040529950505050505050508080610c9790611b23565b915050610976565b5090949350505050565b6040805160c081018252600091810182815260608083018490526080830184905260a0830193909352815260208101919091526000604051806080016040528084600181518110610cfc57610cfc611a16565b0160209081015160f81c8252855191019085906002908110610d2057610d20611a16565b0160209081015160f81c8252855191019085906003908110610d4457610d44611a16565b0160209081015160f81c8252855191019085906004908110610d6857610d68611a16565b016020015160f81c905283519091506000908190600290610d8b90600590611b42565b610d959190611b59565b67ffffffffffffffff811115610dad57610dad61163d565b604051908082528060200260200182016040528015610df257816020015b6040805180820190915260008082526020820152815260200190600190039081610dcb5790505b50905060055b8551811015610e91576040518060400160405280878381518110610e1e57610e1e611a16565b0160209081015160f81c82520187610e37846001611a81565b81518110610e4757610e47611a16565b016020015160f81c90528251839085908110610e6557610e65611a16565b60200260200101819052508280610e7b90611ac8565b9350610e8a9050600282611a81565b9050610df8565b506040805180820190915292835260208301525092915050565b600080610eb88584611b00565b90508060ff168460ff161115610ece5780610ed0565b835b95945050505050565b6060818381518110610eed57610eed611a16565b602002602001015151600003611021576000610f0a600385611b94565b9050611002858281518110610f2157610f21611a16565b01602001517fff000000000000000000000000000000000000000000000000000000000000001686610f54846001611a81565b81518110610f6457610f64611a16565b01602001517fff000000000000000000000000000000000000000000000000000000000000001687610f97856002611a81565b81518110610fa757610fa7611a16565b016020908101516040517fff000000000000000000000000000000000000000000000000000000000000009485169281019290925291831660218201529116602282015260230160405160208183030381529060405261112b565b83858151811061101457611014611a16565b6020026020010181905250505b81838151811061103357611033611a16565b602002602001015190509392505050565b60608060005b84811015611123578184826010811061106557611065611a16565b602002015185611076846001611a81565b6010811061108657611086611a16565b602002015186611097856002611a81565b601081106110a7576110a7611a16565b6020020151876110b8866003611a81565b601081106110c8576110c8611a16565b60200201516040516020016110e1959493929190611bd1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052915061111c600482611a81565b905061104a565b509392505050565b6060600061113883611d10565b60408051600680825281830190925260e89290921c9250600091906020820181803683370190505090507f3031323334353637383961626364656600000000000000000000000000000000600f83166010811061119757611197611a16565b1a60f81b816005815181106111ae576111ae611a16565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3031323334353637383961626364656600000000000000000000000000000000600f600484901c166010811061121657611216611a16565b1a60f81b8160048151811061122d5761122d611a16565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3031323334353637383961626364656600000000000000000000000000000000600f600884901c166010811061129557611295611a16565b1a60f81b816003815181106112ac576112ac611a16565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3031323334353637383961626364656600000000000000000000000000000000600f600c84901c166010811061131457611314611a16565b1a60f81b8160028151811061132b5761132b611a16565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3031323334353637383961626364656600000000000000000000000000000000601083811c600f1690811061139257611392611a16565b1a60f81b816001815181106113a9576113a9611a16565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3031323334353637383961626364656600000000000000000000000000000000600f601484901c166010811061141157611411611a16565b1a60f81b8160008151811061142857611428611a16565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053509392505050565b6040518061020001604052806010905b606081526020019060019003908161146e5790505090565b60006040828403121561149857600080fd5b50919050565b6000602082840312156114b057600080fd5b813567ffffffffffffffff8111156114c757600080fd5b6114d384828501611486565b949350505050565b60005b838110156114f65781810151838201526020016114de565b83811115611505576000848401525b50505050565b602081526000825180602084015261152a8160408501602087016114db565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000806020838503121561156f57600080fd5b823567ffffffffffffffff8082111561158757600080fd5b818501915085601f83011261159b57600080fd5b8135818111156115aa57600080fd5b8660208260051b85010111156115bf57600080fd5b60209290920196919550909350505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261160657600080fd5b83018035915067ffffffffffffffff82111561162157600080fd5b60200191503681900382131561163657600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561168f5761168f61163d565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156116dc576116dc61163d565b604052919050565b600067ffffffffffffffff8311156116fe576116fe61163d565b61172f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601611695565b905082815283838301111561174357600080fd5b828260208301376000602084830101529392505050565b600082601f83011261176b57600080fd5b610246838335602085016116e4565b60006040828403121561178c57600080fd5b61179461166c565b9050813567ffffffffffffffff808211156117ae57600080fd5b6117ba8583860161175a565b835260208401359150808211156117d057600080fd5b506117dd8482850161175a565b60208301525092915050565b600067ffffffffffffffff808411156118045761180461163d565b8360051b6020611815818301611695565b8681529350908401908084018783111561182e57600080fd5b855b83811015611862578035858111156118485760008081fd5b6118548a828a0161177a565b835250908201908201611830565b50505050509392505050565b60006040823603121561188057600080fd5b61188861166c565b823567ffffffffffffffff808211156118a057600080fd5b9084019036601f8301126118b357600080fd5b6118c2368335602085016117e9565b835260208501359150808211156118d857600080fd5b50830136601f8201126118ea57600080fd5b6117dd368235602084016116e4565b6000865161190b818460208b016114db565b7f3c726563742077696474683d223130302522206865696768743d2231303025229083019081527f2066696c6c3d22230000000000000000000000000000000000000000000000006020820152858760288301377f22202f3e00000000000000000000000000000000000000000000000000000000602891870191820152845161199c81602c8401602089016114db565b84519101906119b281602c8401602088016114db565b01602c01979650505050505050565b600084516119d38184602089016114db565b8451908301906119e78183602089016114db565b84519101906119fa8183602088016114db565b0195945050505050565b6000611a10368361177a565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006102463684846117e9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115611a9457611a94611a52565b500190565b60008351611aab8184602088016114db565b835190830190611abf8183602088016114db565b01949350505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611af957611af9611a52565b5060010190565b600060ff821660ff841680821015611b1a57611b1a611a52565b90039392505050565b600060ff821660ff8103611b3957611b39611a52565b60010192915050565b600082821015611b5457611b54611a52565b500390565b600082611b8f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611bcc57611bcc611a52565b500290565b60008651611be3818460208b016114db565b7f3c726563742077696474683d22000000000000000000000000000000000000009083019081528651611c1d81600d840160208b016114db565b7f22206865696768743d2231302220783d22000000000000000000000000000000600d92909101918201528551611c5b81601e840160208a016114db565b7f2220793d22000000000000000000000000000000000000000000000000000000601e92909101918201528451611c998160238401602089016114db565b7f222066696c6c3d22230000000000000000000000000000000000000000000000602392909101918201528351611cd781602c8401602088016114db565b7f22202f3e00000000000000000000000000000000000000000000000000000000602c9290910191820152603001979650505050505050565b6000815160208301517fffffff000000000000000000000000000000000000000000000000000000000080821693506003831015611d585780818460030360031b1b83161693505b50505091905056fe3c7376672077696474683d2233323022206865696768743d22333230222076696577426f783d2230203020333230203332302220786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667222073686170652d72656e646572696e673d2263726973704564676573223ea2646970667358221220b41ca57fc618cf5693ed303639262217c4d2b04c212be0fe12a5867c2ac5abf364736f6c634300080f0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.