Verified contractPartial
Lists
Address0xbc14c35e0991c2eba3d66d49d5c21d2cf91305c9
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.1.6
- Same code
Only this contract
Details
- Compiler
- solc 0.1.6+commit.d41f8b7c
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 501,827
- Creation transaction
- 0x57597d37d2…58eac79308
Lists.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Lists {
function Lists() {
admin = msg.sender;
entries.length = 1;
}
function get_length(uint entry, uint key) returns (uint) {
return entries[entry][key].length;
}
function get_entry(uint entry, uint key, uint index) returns (uint) {
return entries[entry][key][index];
}
function get_all(uint entry, uint key) returns (uint[]) {
return entries[entry][key];
}
function clear(uint entry, uint key) {
if (msg.sender == admin) {
entries[entry][key].length = 0;
}
}
function delete_entry(uint entry, uint key, uint index) {
if (msg.sender == admin) {
uint[] list = entries[entry][key];
for (uint i = index; i + 1 < list.length; i++) {
list[i] = list[i + 1];
}
list.length--;
}
}
function add(uint entry, uint key, uint value) {
if (msg.sender == admin) {
uint[] list = entries[entry][key];
list[list.length++] = value;
}
}
address public admin;
mapping (uint => uint[])[] entries;
function transfer_ownership(address newAdmin) {
if (msg.sender == admin) {
admin = newAdmin;
}
}
function count() returns (uint) {
return entries.length - 1;
}
function has(uint entry) returns (bool) {
return entry <= count();
}
function new_entry() returns (uint) {
if (msg.sender == admin) {
return entries.length++;
}
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.