Verified contractPartial
BlockDefStorage
Address0x57cdd5582a02e53e833ea4592ec8296110e5f884
- Balance
0 ETH
- Transactions
2
- Compiler
solc 0.1.5
- Same code
Only this contract
Details
- Compiler
- solc 0.1.5+commit.23865e39
- Language
- solidity
- Optimization
- Yes, 200 runs
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 398,386
- Creation transaction
- 0x1764a58547…16ab8b488f
BlockDefStorage.sol
// Submitted by EthereumHistory (ethereumhistory.com)
contract BlockDefStorage
{
bool locked;
Block[32] blocks;
struct Block
{
int8[24] occupies; // [x0,y0,z0,x1,y1,z1...,x7,y7,z7]
int8[] attachesto; // [x0,y0,z0,x1,y1,z1...] // first one that is 0,0,0 is the end
}
function getOccupies(uint8 which) public constant returns (int8[24])
{
return blocks[which].occupies;
}
function getAttachesto(uint8 which) public constant returns (int8[])
{
return blocks[which].attachesto;
}
function getLocked() public constant returns (bool)
{
return locked;
}
function setLocked()
{
locked = true;
}
function initOccupies(uint8 which, int8[3][8] occupies) public
{
if(locked) // lockout
return;
uint counter = 0;
for(uint8 index = 0; index < 8; index++)
{
for(uint8 subindex = 0; subindex < 3; subindex++)
{
blocks[which].occupies[counter] = occupies[index][subindex];
counter++;
}
}
}
function initAttachesto(uint8 which, int8[3][] attachesto) public
{
if(locked) // lockout
return;
blocks[which].attachesto.length = attachesto.length * 3;
uint counter = 0;
for(uint8 index = 0; index < attachesto.length; index++)
{
for(uint8 subindex = 0; subindex < 3; subindex++)
{
blocks[which].attachesto[counter] = attachesto[index][subindex];
counter++;
}
}
}
}
Compiler settingsShow
{
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.