Contract 0x358fbc8e5368956c9308b17fa5f054771d365b98

 

Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
Warning: The compiled contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) Solidity Compiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: BanyanIncomeLockPosition
Compiler Version: v0.4.24+commit.e67f0147
Optimization Enabled: Yes
Runs (Optimizer):  200


Contract Source Code
pragma solidity ^0.4.24;

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
    address public owner;


    event OwnershipRenounced(address indexed previousOwner);
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );


    /**
     * @dev The Ownable constructor sets the original `owner` of the contract to the sender
     * account.
     */
    constructor() public {
        owner = msg.sender;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }

    /**
     * @dev Allows the current owner to relinquish control of the contract.
     * @notice Renouncing to ownership will leave the contract without an owner.
     * It will not be possible to call the functions with the `onlyOwner`
     * modifier anymore.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipRenounced(owner);
        owner = address(0);
    }

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param _newOwner The address to transfer ownership to.
     */
    function transferOwnership(address _newOwner) public onlyOwner {
        _transferOwnership(_newOwner);
    }

    /**
     * @dev Transfers control of the contract to a newOwner.
     * @param _newOwner The address to transfer ownership to.
     */
    function _transferOwnership(address _newOwner) internal {
        require(_newOwner != address(0));
        emit OwnershipTransferred(owner, _newOwner);
        owner = _newOwner;
    }
}


contract BanyanIncomeLockPosition is Ownable {

    // unlock block height 
    uint64 public unlockBlock = 8372051;
    // BBN token address   
    address public tokenAddress = 0x35a69642857083BA2F30bfaB735dacC7F0bac969;

    bytes4 public transferMethodId = bytes4(keccak256("transfer(address,uint256)"));

    function takeToken(address targetAddress, uint256 amount)
    public
    unlocked
    onlyOwner
    returns (bool)
    {
        return tokenAddress.call(transferMethodId, targetAddress, amount);
    }

    modifier unlocked() {
        require(block.number >= unlockBlock, "Not unlock yet.");
        _;
    }
}

Contract ABI
[{"constant":true,"inputs":[],"name":"transferMethodId","outputs":[{"name":"","type":"bytes4"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"targetAddress","type":"address"},{"name":"amount","type":"uint256"}],"name":"takeToken","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"unlockBlock","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"}],"name":"OwnershipRenounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

Contract Creation Code
6080604081905260008054600180547f7472616e7366657228616464726573732c75696e74323536290000000000000090945277a9059cbb000000000000000000000000000000000000000060a060020a63ffffffff0219600160a060020a03199586167335a69642857083ba2f30bfab735dacc7f0bac9691716179055767fbf53000000000000000000000000000000000000000060a060020a60e060020a031990911617919091163317905561045e806100bc6000396000f3006080604052600436106100695763ffffffff60e060020a6000350416631e1a48cf811461006e578063715018a6146100b85780638da5cb5b146100cf5780639d76ea5814610100578063afd0f90614610115578063ea35df161461014d578063f2fde38b1461017f575b600080fd5b34801561007a57600080fd5b506100836101a0565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b3480156100c457600080fd5b506100cd6101c4565b005b3480156100db57600080fd5b506100e4610230565b60408051600160a060020a039092168252519081900360200190f35b34801561010c57600080fd5b506100e461023f565b34801561012157600080fd5b50610139600160a060020a036004351660243561024e565b604080519115158252519081900360200190f35b34801561015957600080fd5b5061016261036a565b6040805167ffffffffffffffff9092168252519081900360200190f35b34801561018b57600080fd5b506100cd600160a060020a0360043516610392565b60015474010000000000000000000000000000000000000000900460e060020a0281565b600054600160a060020a031633146101db57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031681565b600154600160a060020a031681565b6000805474010000000000000000000000000000000000000000900467ffffffffffffffff164310156102e257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4e6f7420756e6c6f636b207965742e0000000000000000000000000000000000604482015290519081900360640190fd5b600054600160a060020a031633146102f957600080fd5b6001546040805163ffffffff60e060020a7401000000000000000000000000000000000000000085048102819004918216028252600160a060020a0387811660048401526024830187905292519290931692916044808301926000929190829003018183875af19695505050505050565b60005474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b600054600160a060020a031633146103a957600080fd5b6103b2816103b5565b50565b600160a060020a03811615156103ca57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820acbeb786a097d323df9c9a9e0913cfc63451cfd945236cf3e0a2707298b7009d0029


   Swarm Source:
bzzr://acbeb786a097d323df9c9a9e0913cfc63451cfd945236cf3e0a2707298b7009d
Block Age transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.