Skip to content
Verified contractPartial

tellorsubmit

Address0x809b94f4b9d9615a08f3c8be373fb0bfa1bac770
Balance

0 ETH

 

Transactions

173

 

Compiler

solc 0.8.7

 

Same code

2 more contracts

 

Details

Compiler
solc 0.8.7+commit.e28d00a7
Language
solidity
Optimization
Yes, 20,000 runs
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
15,340,324
Creation transaction
0x440aa237a5…89215c9a26
Main copy (most transactions)
0x8f1aae05…a646e652

tellorsubmit.sol

pragma solidity >=0.6.6;
pragma experimental ABIEncoderV2;



interface IERC20 {
    function balanceOf(address owner) external view returns (uint);
}


interface oracle{

    function submitValue(
        bytes32 _queryId,
        bytes calldata _value,
        uint256 _nonce,
        bytes memory _queryData
    ) external;  


    function getTimeOfLastNewValue() external view returns (uint256);

    function depositStake() external;

}


contract tellorsubmit {
    
    address payable public owner;
    

    constructor() public {
        owner = payable(msg.sender);

    }
    
    
    modifier onlyowner{
        require(msg.sender == owner);
        _;
    }



    receive() external payable {}


    function deposit() payable external{
    }


    function _safeTransfer(address token, address to, uint value) private {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(bytes4(keccak256(bytes('transfer(address,uint256)'))), to, value));
    }
    
    function withdrawtoken(address tokenaddr, uint amount) external onlyowner{
        _safeTransfer(tokenaddr, owner, amount);
    }


    function withdrawethall() external onlyowner {
        payable(msg.sender).transfer(address(this).balance);
    }
    

    function depositStake() external onlyowner{
        oracle(address(0x88dF592F8eb5D7Bd38bFeF7dEb0fBc02cf3778a0)).depositStake();
    }

    function submitoraclevalue(uint256 lastvalue, bytes32 _queryId, bytes calldata _value, uint256 _nonce, bytes memory _queryData) external payable onlyowner{

       uint256 timeOfLastNewValue = oracle(address(0xe8218cACb0a5421BC6409e498d9f8CC8869945ea)).getTimeOfLastNewValue();

       require(timeOfLastNewValue == lastvalue, "fuck");

       oracle(address(0xe8218cACb0a5421BC6409e498d9f8CC8869945ea)).submitValue(_queryId, _value, _nonce, _queryData);

    }


}
Compiler settingsShow
{
  "optimizer": {
    "runs": 20000,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.