Skip to content
Verified contractPartial

BlockDefStorage

Address0x08dbb4cccccf1cfdc4affaeac7632781e67df9fe
Balance

0 ETH

 

Transactions

36

 

Compiler

solc 0.1.5

 

Same code

1 more 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
389,669
Creation transaction
0x794cc57c21…9b3ee99d54

BlockDefStorage.sol

// Submitted by EthereumHistory (ethereumhistory.com)
contract BlockDefStorage
{
    uint8[32] occupiesdone;
    uint8[32] attachestodone;
    bool occupieslocked;
    bool attachestolocked;
    Block[20] blocks;
    struct Block
    {
    	int8[3][8] occupies;
    	int8[3][] attachesto;
    }
    
    function getOccupies(uint8 which) public constant returns (int8[3][8])
    {
    	return blocks[which].occupies;
    }
    
    function getAttachesto(uint8 which) public constant returns (int8[3][])
    {
    	return blocks[which].attachesto;
    }
    
    function initOccupies(uint8 which, int8[3][8] occupies) public 
    {
    	if(occupieslocked)
    		return;
    	blocks[which].occupies = occupies;
    	occupiesdone[which];
    	for(uint8 i = 0; i < 32; i++)
    	{
    		if(occupiesdone[i] == 0)
    			return;
    	}
    	occupieslocked = true;
    }
    
    function initAttachesto(uint8 which, int8[3][] attachesto) public
    {
    	if(attachestolocked)
    		return;
    	blocks[which].attachesto.length = attachesto.length;
    	blocks[which].attachesto = attachesto;
    	attachestodone[which] = 1;
    	for(uint8 i2 = 0; i2 < 32; i2++)
    	{
    		if(attachestodone[i2] == 0)
    			return;
    	}
    	attachestolocked = true;
    }
}
Compiler settingsShow
{
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.