ETH Price: $3,420.23 (-0.59%)
Gas: 2 Gwei

Contract

0xed04A060050cc289d91779A8BB3942C3A6589254
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value

There are no matching entries

Please try again later

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To Value
101953572020-06-03 21:47:271490 days ago1591220847  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ChiSpender

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2020-06-03
*/

pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;


/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}


contract IChi is IERC20 {
    function freeUpTo(uint256 value) external returns (uint256 freed);
    function freeFromUpTo(address from, uint256 value) external returns (uint256 freed);
}


contract ChiSpender {
    IChi public constant chi = IChi(0x0000000000004946c0e9F43F4Dee607b0eF1fA1c);

    address public owner = msg.sender;

    function burnChi(uint tokens) external returns(uint256) {
        require(msg.sender == owner, "Access restricted");
        return chi.freeFromUpTo(tx.origin, tokens);
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"burnChi","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"chi","outputs":[{"internalType":"contract IChi","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]

6080604052600080546001600160a01b0319163317905534801561002257600080fd5b5061030f806100326000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806317484c2e146100465780638da5cb5b1461006f578063c92aecc414610084575b600080fd5b61005961005436600461018f565b610099565b6040516100669190610278565b60405180910390f35b610077610158565b604051610066919061022a565b61008c610167565b604051610066919061025a565b600080546001600160a01b031633146100cd5760405162461bcd60e51b81526004016100c490610268565b60405180910390fd5b60405163079d229f60e01b81526d4946c0e9f43f4dee607b0ef1fa1c9063079d229f906101009032908690600401610238565b602060405180830381600087803b15801561011a57600080fd5b505af115801561012e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061015291908101906101b5565b92915050565b6000546001600160a01b031681565b6d4946c0e9f43f4dee607b0ef1fa1c81565b8035610152816102b5565b8051610152816102b5565b6000602082840312156101a157600080fd5b60006101ad8484610179565b949350505050565b6000602082840312156101c757600080fd5b60006101ad8484610184565b6101dc816102a3565b82525050565b6101dc8161028f565b6101dc816102aa565b6000610201601183610286565b701058d8d95cdcc81c995cdd1c9a58dd1959607a1b815260200192915050565b6101dc816102a0565b6020810161015282846101e2565b6040810161024682856101d3565b6102536020830184610221565b9392505050565b6020810161015282846101eb565b60208082528101610152816101f4565b602081016101528284610221565b90815260200190565b60006001600160a01b038216610152565b90565b6000610152825b60006101528261028f565b6102be816102a0565b81146102c957600080fd5b5056fea365627a7a723158207c75b5f54c28199490c5530ba492edfe52fa08a3bddb7e075442b2c41cf0770a6c6578706572696d656e74616cf564736f6c63430005110040

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c806317484c2e146100465780638da5cb5b1461006f578063c92aecc414610084575b600080fd5b61005961005436600461018f565b610099565b6040516100669190610278565b60405180910390f35b610077610158565b604051610066919061022a565b61008c610167565b604051610066919061025a565b600080546001600160a01b031633146100cd5760405162461bcd60e51b81526004016100c490610268565b60405180910390fd5b60405163079d229f60e01b81526d4946c0e9f43f4dee607b0ef1fa1c9063079d229f906101009032908690600401610238565b602060405180830381600087803b15801561011a57600080fd5b505af115801561012e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061015291908101906101b5565b92915050565b6000546001600160a01b031681565b6d4946c0e9f43f4dee607b0ef1fa1c81565b8035610152816102b5565b8051610152816102b5565b6000602082840312156101a157600080fd5b60006101ad8484610179565b949350505050565b6000602082840312156101c757600080fd5b60006101ad8484610184565b6101dc816102a3565b82525050565b6101dc8161028f565b6101dc816102aa565b6000610201601183610286565b701058d8d95cdcc81c995cdd1c9a58dd1959607a1b815260200192915050565b6101dc816102a0565b6020810161015282846101e2565b6040810161024682856101d3565b6102536020830184610221565b9392505050565b6020810161015282846101eb565b60208082528101610152816101f4565b602081016101528284610221565b90815260200190565b60006001600160a01b038216610152565b90565b6000610152825b60006101528261028f565b6102be816102a0565b81146102c957600080fd5b5056fea365627a7a723158207c75b5f54c28199490c5530ba492edfe52fa08a3bddb7e075442b2c41cf0770a6c6578706572696d656e74616cf564736f6c63430005110040

Deployed Bytecode Sourcemap

3056:333:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3056:333:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3209:177;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;3167:33;;;:::i;:::-;;;;;;;;3083:75;;;:::i;:::-;;;;;;;;3209:177;3256:7;3298:5;;-1:-1:-1;;;;;3298:5:0;3284:10;:19;3276:49;;;;-1:-1:-1;;;3276:49:0;;;;;;;;;;;;;;;;;3343:35;;-1:-1:-1;;;3343:35:0;;3115:42;;3343:16;;:35;;3360:9;;3371:6;;3343:35;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3343:35:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3343:35:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;3343:35:0;;;;;;;;;3336:42;3209:177;-1:-1:-1;;3209:177:0:o;3167:33::-;;;-1:-1:-1;;;;;3167:33:0;;:::o;3083:75::-;3115:42;3083:75;:::o;5:130:-1:-;72:20;;97:33;72:20;97:33;;142:134;220:13;;238:33;220:13;238:33;;283:241;;387:2;375:9;366:7;362:23;358:32;355:2;;;403:1;400;393:12;355:2;438:1;455:53;500:7;480:9;455:53;;;445:63;349:175;-1:-1;;;;349:175;531:263;;646:2;634:9;625:7;621:23;617:32;614:2;;;662:1;659;652:12;614:2;697:1;714:64;770:7;750:9;714:64;;801:142;892:45;931:5;892:45;;;887:3;880:58;874:69;;;950:113;1033:24;1051:5;1033:24;;1070:148;1164:48;1206:5;1164:48;;1226:317;;1386:67;1450:2;1445:3;1386:67;;;-1:-1;;;1466:40;;1534:2;1525:12;;1372:171;-1:-1;;1372:171;1551:113;1634:24;1652:5;1634:24;;1671:213;1789:2;1774:18;;1803:71;1778:9;1847:6;1803:71;;1891:340;2045:2;2030:18;;2059:79;2034:9;2111:6;2059:79;;;2149:72;2217:2;2206:9;2202:18;2193:6;2149:72;;;2016:215;;;;;;2238:235;2367:2;2352:18;;2381:82;2356:9;2436:6;2381:82;;2480:407;2671:2;2685:47;;;2656:18;;2746:131;2656:18;2746:131;;2894:213;3012:2;2997:18;;3026:71;3001:9;3070:6;3026:71;;3115:163;3218:19;;;3267:4;3258:14;;3211:67;3286:91;;-1:-1;;;;;3446:54;;3348:24;3429:76;3512:72;3574:5;3557:27;3591:129;;3678:37;3709:5;3727:143;;3817:48;3859:5;3817:48;;4246:117;4315:24;4333:5;4315:24;;;4308:5;4305:35;4295:2;;4354:1;4351;4344:12;4295:2;4289:74;

Swarm Source

bzzr://7c75b5f54c28199490c5530ba492edfe52fa08a3bddb7e075442b2c41cf0770a

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.