Skip to content
Verified contractExact

Cornholio

Address0x4ae979ec00e08ba7350d9f12777528cf4f84109c
Balance

0 ETH

 

Transactions

401

 

Compiler

solc 0.4.19

 

Same code

Only this contract

 

Details

Compiler
solc 0.4.19+commit.c4cbbb05
Language
solidity
Optimization
Yes, 200 runs
License
Not stated
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
5,076,612
Creation transaction
0x6b3b19802d…4417427337

Cornholio.sol

pragma solidity ^0.4.19;

interface CornFarm
{
    function buyObject(address _beneficiary) public payable;
}

interface Corn
{
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
}

contract Cornholio
{
    address public farmer = 0x231F702070aACdbde867B323996A96Fed8aDCA10;
    
    function sowCorn(address soil, uint8 seeds) external
    {
        for(uint8 i = 0; i < seeds; ++i)
        {
            CornFarm(soil).buyObject(this);
        }
    }
    
    function reap(address corn) external
    {
        Corn(corn).transfer(farmer, Corn(corn).balanceOf(this));
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.