Verified contractPartial
BlockDefStorage
Address0xc81fae1c611e5155df157f606ace3fc6be25ad3f
- Balance
0 ETH
- Transactions
3
- 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,348
- Creation transaction
- 0x2ce8fa48a8…1493a6285c
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 < 8; 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 < 8; 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.