Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 70 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Register | 17147060 | 499 days ago | IN | 0 ETH | 0.00534252 | ||||
Register | 15663615 | 707 days ago | IN | 0 ETH | 0.00094807 | ||||
Register | 15648782 | 709 days ago | IN | 0 ETH | 0.00351498 | ||||
Register | 15648774 | 709 days ago | IN | 0 ETH | 0.00256922 | ||||
Register | 15648761 | 709 days ago | IN | 0 ETH | 0.00290018 | ||||
Register | 15648757 | 709 days ago | IN | 0 ETH | 0.00302767 | ||||
Register | 15648730 | 709 days ago | IN | 0 ETH | 0.00263701 | ||||
Register | 15648724 | 709 days ago | IN | 0 ETH | 0.00276508 | ||||
Register | 15648719 | 709 days ago | IN | 0 ETH | 0.00290446 | ||||
Register | 15648701 | 709 days ago | IN | 0 ETH | 0.00266088 | ||||
Register | 15628157 | 712 days ago | IN | 0 ETH | 0.00137585 | ||||
Register | 14966580 | 817 days ago | IN | 0 ETH | 0.01216174 | ||||
Register | 14881280 | 831 days ago | IN | 0 ETH | 0.01376171 | ||||
Register | 14004837 | 968 days ago | IN | 0 ETH | 0.05196746 | ||||
Register | 14004709 | 968 days ago | IN | 0 ETH | 0.04800204 | ||||
Register | 13841872 | 993 days ago | IN | 0 ETH | 0.0070494 | ||||
Register | 13560804 | 1038 days ago | IN | 0 ETH | 0.01512519 | ||||
Register | 13360058 | 1069 days ago | IN | 0 ETH | 0.01776034 | ||||
Register | 13202817 | 1094 days ago | IN | 0 ETH | 0.01270682 | ||||
Register | 13140574 | 1103 days ago | IN | 0 ETH | 0.0305376 | ||||
Register | 13130162 | 1105 days ago | IN | 0 ETH | 0.02096575 | ||||
Register | 13122849 | 1106 days ago | IN | 0 ETH | 0.00335434 | ||||
Register | 13122830 | 1106 days ago | IN | 0 ETH | 0.00368609 | ||||
Register | 13095957 | 1110 days ago | IN | 0 ETH | 0.01950317 | ||||
Register | 13095798 | 1110 days ago | IN | 0 ETH | 0.01899315 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Avatars
Compiler Version
v0.4.9+commit.364da425
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2017-03-15 */ pragma solidity ^0.4.3; contract Avatars { uint avatarsCount = 0; struct Avatar { uint id; /** * Avatar's owner. */ address owner; /** * First byte is gender, 1 / 0 for male / female. * Then every byte describe choosen avatar part. * The order is : backs, clothes, ears, eyebrows, eyesfront, eyesiris, faceshape, glasses, hair, mouth, nose, beard, mustache. */ bytes32 shapes; /** * Each 3 bytes describe color for 5 first shapes. */ bytes32 colorsPrimary; /** * Each 3 bytes describe color for 8 last shapes. */ bytes32 colorsSecondary; /** * Each byte describes up/down position for every shape. * High nibble depicts the sign of number, 1 - up, 0 - down. * Low nibble shows number of steps to move the shape in selected direction. * */ bytes32 positions; } mapping(bytes32 => Avatar) avatars; /** * Stores an avatar on the blockchain. * Throws if avatar with such shapes combination is already exists. * * @param shapes - hex string, depicts gender and combinations of shapes. * @param colorsPrimary - hex string, colors of the first 5 shapes. * @param colorsSecondary - hex string, colors of the last 8 shapes. * @param positions - hex string, up/down positions of all shapes * * @return Hash of the avatar. */ function register(string shapes, string colorsPrimary, string colorsSecondary, string positions) returns (bytes32 avatarHash) { bytes32 shapesBytes = strToBytes(shapes); bytes32 colorsPrimaryBytes = strToBytes(colorsPrimary); bytes32 colorsSecondaryBytes = strToBytes(colorsSecondary); bytes32 positionsBytes = strToBytes(positions); // unique by shapes composition bytes32 hash = sha3(shapes); Avatar memory existingAvatar = avatars[hash]; if (existingAvatar.id != 0) throw; Avatar memory avatar = Avatar(++avatarsCount, msg.sender, shapesBytes, colorsPrimaryBytes, colorsSecondaryBytes, positionsBytes); avatars[hash] = avatar; return hash; } /** * Returns an avatar by it's hash. * Throws if avatar is not exists. */ function get(bytes32 avatarHash) constant returns (bytes32 shapes, bytes32 colorsPrimary, bytes32 colorsSecondary, bytes32 positions) { Avatar memory avatar = getAvatar(avatarHash); shapes = avatar.shapes; colorsPrimary = avatar.colorsPrimary; colorsSecondary = avatar.colorsSecondary; positions = avatar.positions; } /** * Returns an avatar owner address by avatar's hash. * Throws if avatar is not exists. */ function getOwner(bytes32 avatarHash) constant returns (address) { Avatar memory avatar = getAvatar(avatarHash); return avatar.owner; } /** * Returns if avatar of the given hash exists. */ function isExists(bytes32 avatarHash) constant returns (bool) { Avatar memory avatar = avatars[avatarHash]; if (avatar.id == 0) return false; return true; } /** * Returns an avatar by it's hash. * Throws if avatar is not exists. */ function getAvatar(bytes32 avatarHash) private constant returns (Avatar) { Avatar memory avatar = avatars[avatarHash]; if (avatar.id == 0) throw; return avatar; } /** * @dev Low level function. * Converts string to bytes32 array. * Throws if string length is more than 32 bytes * * @param str string * @return bytes32 representation of str */ function strToBytes(string str) constant private returns (bytes32 ret) { // var g = bytes(str).length; // if (bytes(str).length > 32) throw; assembly { ret := mload(add(str, 32)) } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[{"name":"shapes","type":"string"},{"name":"colorsPrimary","type":"string"},{"name":"colorsSecondary","type":"string"},{"name":"positions","type":"string"}],"name":"register","outputs":[{"name":"avatarHash","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"avatarHash","type":"bytes32"}],"name":"isExists","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"avatarHash","type":"bytes32"}],"name":"get","outputs":[{"name":"shapes","type":"bytes32"},{"name":"colorsPrimary","type":"bytes32"},{"name":"colorsSecondary","type":"bytes32"},{"name":"positions","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"avatarHash","type":"bytes32"}],"name":"getOwner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"}]
Contract Creation Code
60606040526000600055341561001157fe5b5b610584806100216000396000f300606060405263ffffffff60e060020a6000350416630e24c52c81146100425780638a881e0e146101615780638eaa6ac014610188578063deb931a2146101c1575bfe5b341561004a57fe5b61014f600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375050604080516020601f89358b0180359182018390048302840183019094528083529799988101979196509182019450925082915084018382808284375050604080516020601f89358b0180359182018390048302840183019094528083529799988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979998810197919650918201945092508291508401838280828437509496506101f095505050505050565b60408051918252519081900360200190f35b341561016957fe5b6101746004356103ae565b604080519115158252519081900360200190f35b341561019057fe5b61019b600435610431565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34156101c957fe5b6101d4600435610471565b60408051600160a060020a039092168252519081900360200190f35b600060006000600060006000610204610523565b61020c610523565b6102158c610494565b96506102208b610494565b955061022b8a610494565b945061023689610494565b93508b6040518082805190602001908083835b602083106102685780518252601f199092019160209182019101610249565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600081815260018084529086902060c085018752805480865291810154600160a060020a031693850193909352600283015495840195909552600382015460608401526004820154608084015260059091015460a083015297509550501591506102fa905057610000565b506040805160c081018252600080546001908101808355835233600160a060020a0390811660208086019182528587018d8152606087018d8152608088018d815260a089018d81528c89529387905298909620875181559251948301805473ffffffffffffffffffffffffffffffffffffffff191695909416949094179092559151600283015591516003820155925160048401555160059092019190915591965086915b50505050505050949350505050565b60006103b8610523565b50600082815260016020818152604092839020835160c081018552815480825293820154600160a060020a031692810192909252600281015493820193909352600383015460608201526004830154608082015260059092015460a08301521515610426576000915061042b565b600191505b50919050565b6000600060006000610441610523565b61044a8661049f565b90508060400151945080606001519350806080015192508060a0015191505b509193509193565b600061047b610523565b6104848361049f565b9050806020015191505b50919050565b60208101515b919050565b6104a7610523565b6104af610523565b50600082815260016020818152604092839020835160c081018552815480825293820154600160a060020a031692810192909252600281015493820193909352600383015460608201526004830154608082015260059092015460a0830152151561051957610000565b8091505b50919050565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a0810191909152905600a165627a7a7230582031a5d757f81f0bf1c0dda3691a8f2d1bc7b86cf2fecc9b9a418e31f6aed61f150029
Deployed Bytecode
0x606060405263ffffffff60e060020a6000350416630e24c52c81146100425780638a881e0e146101615780638eaa6ac014610188578063deb931a2146101c1575bfe5b341561004a57fe5b61014f600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375050604080516020601f89358b0180359182018390048302840183019094528083529799988101979196509182019450925082915084018382808284375050604080516020601f89358b0180359182018390048302840183019094528083529799988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979998810197919650918201945092508291508401838280828437509496506101f095505050505050565b60408051918252519081900360200190f35b341561016957fe5b6101746004356103ae565b604080519115158252519081900360200190f35b341561019057fe5b61019b600435610431565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34156101c957fe5b6101d4600435610471565b60408051600160a060020a039092168252519081900360200190f35b600060006000600060006000610204610523565b61020c610523565b6102158c610494565b96506102208b610494565b955061022b8a610494565b945061023689610494565b93508b6040518082805190602001908083835b602083106102685780518252601f199092019160209182019101610249565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600081815260018084529086902060c085018752805480865291810154600160a060020a031693850193909352600283015495840195909552600382015460608401526004820154608084015260059091015460a083015297509550501591506102fa905057610000565b506040805160c081018252600080546001908101808355835233600160a060020a0390811660208086019182528587018d8152606087018d8152608088018d815260a089018d81528c89529387905298909620875181559251948301805473ffffffffffffffffffffffffffffffffffffffff191695909416949094179092559151600283015591516003820155925160048401555160059092019190915591965086915b50505050505050949350505050565b60006103b8610523565b50600082815260016020818152604092839020835160c081018552815480825293820154600160a060020a031692810192909252600281015493820193909352600383015460608201526004830154608082015260059092015460a08301521515610426576000915061042b565b600191505b50919050565b6000600060006000610441610523565b61044a8661049f565b90508060400151945080606001519350806080015192508060a0015191505b509193509193565b600061047b610523565b6104848361049f565b9050806020015191505b50919050565b60208101515b919050565b6104a7610523565b6104af610523565b50600082815260016020818152604092839020835160c081018552815480825293820154600160a060020a031692810192909252600281015493820193909352600383015460608201526004830154608082015260059092015460a0830152151561051957610000565b8091505b50919050565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a0810191909152905600a165627a7a7230582031a5d757f81f0bf1c0dda3691a8f2d1bc7b86cf2fecc9b9a418e31f6aed61f150029
Swarm Source
bzzr://31a5d757f81f0bf1c0dda3691a8f2d1bc7b86cf2fecc9b9a418e31f6aed61f15
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.