Contract Overview
Latest 2 from a total of 2 transactions
Txn Hash |
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|
a0481ec0197582e14634d07dc44ba89df5469231f3fb37da648f7eeac2596e9d | 29214309 | one month ago | io16r46nx6t5vd7v2u0gxs4tv5ex2g3dea50h7yxd | IN | Contract: StatusUpdate | 0 IOTX | 0.063116 | |
c6ad2c9cc4f925ab661fa75ec39d740caba7a243ee946147e4f28a9817066335 | 29214307 | one month ago | io16r46nx6t5vd7v2u0gxs4tv5ex2g3dea50h7yxd | IN | Contract: StatusUpdate | 0 IOTX | 0.092802 |
Contract Name:
StatusUpdate
Compiler Version
v0.8.13+commit.abaa5c0e
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; contract StatusUpdate { uint256 constant MAX_CHARACTER_AMOUNT = 165; mapping(address => string) public statuses; event StatusUpdated(address indexed user, string newStatus, uint256 timestamp); /// @notice Sets the status for the caller to `_status`. /// @param _status The new status to set, must not exceed MAX_CHARACTER_AMOUNT. function setStatus(string memory _status) public { require(bytes(_status).length <= MAX_CHARACTER_AMOUNT, "Status is too long"); statuses[msg.sender] = _status; emit StatusUpdated(msg.sender, _status, block.timestamp); } /// @notice Retrieves the status for a given user. /// @param _user The address of the user whose status to retrieve. /// @return The status of the user, or "No status set" if none is found. function getStatus(address _user) public view returns (string memory) { string memory status = statuses[_user]; if (bytes(status).length == 0) { return "No status set"; } else { return status; } } }
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"string","name":"newStatus","type":"string"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"StatusUpdated","type":"event"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getStatus","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_status","type":"string"}],"name":"setStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"statuses","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50600436106100415760003560e01c806330ccebb5146100465780637d2211d614610076578063af11c1f014610092575b600080fd5b610060600480360381019061005b9190610480565b6100c2565b60405161006d9190610546565b60405180910390f35b610090600480360381019061008b919061069d565b6101e0565b005b6100ac60048036038101906100a79190610480565b6102cb565b6040516100b99190610546565b60405180910390f35b606060008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805461010f90610715565b80601f016020809104026020016040519081016040528092919081815260200182805461013b90610715565b80156101885780601f1061015d57610100808354040283529160200191610188565b820191906000526020600020905b81548152906001019060200180831161016b57829003601f168201915b5050505050905060008151036101d6576040518060400160405280600d81526020017f4e6f2073746174757320736574000000000000000000000000000000000000008152509150506101db565b809150505b919050565b60a581511115610225576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161021c90610792565b60405180910390fd5b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020908051906020019061027792919061036b565b503373ffffffffffffffffffffffffffffffffffffffff167fe34cbd33ad07d4c250de679ecb334eeaf389274e3aa46a896b9261db79e2c15c82426040516102c09291906107cb565b60405180910390a250565b600060205280600052604060002060009150905080546102ea90610715565b80601f016020809104026020016040519081016040528092919081815260200182805461031690610715565b80156103635780601f1061033857610100808354040283529160200191610363565b820191906000526020600020905b81548152906001019060200180831161034657829003601f168201915b505050505081565b82805461037790610715565b90600052602060002090601f01602090048101928261039957600085556103e0565b82601f106103b257805160ff19168380011785556103e0565b828001600101855582156103e0579182015b828111156103df5782518255916020019190600101906103c4565b5b5090506103ed91906103f1565b5090565b5b8082111561040a5760008160009055506001016103f2565b5090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061044d82610422565b9050919050565b61045d81610442565b811461046857600080fd5b50565b60008135905061047a81610454565b92915050565b60006020828403121561049657610495610418565b5b60006104a48482850161046b565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156104e75780820151818401526020810190506104cc565b838111156104f6576000848401525b50505050565b6000601f19601f8301169050919050565b6000610518826104ad565b61052281856104b8565b93506105328185602086016104c9565b61053b816104fc565b840191505092915050565b60006020820190508181036000830152610560818461050d565b905092915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105aa826104fc565b810181811067ffffffffffffffff821117156105c9576105c8610572565b5b80604052505050565b60006105dc61040e565b90506105e882826105a1565b919050565b600067ffffffffffffffff82111561060857610607610572565b5b610611826104fc565b9050602081019050919050565b82818337600083830152505050565b600061064061063b846105ed565b6105d2565b90508281526020810184848401111561065c5761065b61056d565b5b61066784828561061e565b509392505050565b600082601f83011261068457610683610568565b5b813561069484826020860161062d565b91505092915050565b6000602082840312156106b3576106b2610418565b5b600082013567ffffffffffffffff8111156106d1576106d061041d565b5b6106dd8482850161066f565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061072d57607f821691505b6020821081036107405761073f6106e6565b5b50919050565b7f53746174757320697320746f6f206c6f6e670000000000000000000000000000600082015250565b600061077c6012836104b8565b915061078782610746565b602082019050919050565b600060208201905081810360008301526107ab8161076f565b9050919050565b6000819050919050565b6107c5816107b2565b82525050565b600060408201905081810360008301526107e5818561050d565b90506107f460208301846107bc565b939250505056fea26469706673582212200c7562d628df99aac1181ed167853dcb64463b397341fe9d20244acaa859e14b64736f6c634300080d0033
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for
interesting conversations.