Skip to content
forked from yearn/itoken

yToken wrappers for automated investment strategy tokenization

License

Notifications You must be signed in to change notification settings

adrianvalentim/itoken

This branch is up to date with yearn/itoken:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

275683f · Mar 14, 2020

History

79 Commits
Mar 14, 2020
Mar 14, 2020
Feb 19, 2020
Jan 25, 2020
Jan 25, 2020
Jan 26, 2020
Feb 1, 2020
Jan 26, 2020
Feb 19, 2020
Jan 25, 2020
Feb 19, 2020
Jan 25, 2020

Repository files navigation

Documentation

iearn.finance

Smart Contract Interface

Contract ABI Address
iEther JSON 0x9Dde7cdd09dbed542fC422d18d89A589fA9fD4C0

iToken Interface

{% tabs %} {% tab title="IIEther.sol" %}

// Solidity Interface

interface IIEther {
  // Invest ETH
  function invest() external payable;
  function calcPoolValueInETH() external view returns (uint);
  function getPricePerFullShare() external view returns (uint);
  // Redeem any invested tokens from the pool
  function redeem(uint256 _shares) external;
}

{% endtab %} {% endtabs %}

ERC20 Token Interface

{% tabs %} {% tab title="TokenInterface.sol" %}

// https://theethereum.wiki/w/index.php/ERC20_Token_Standard
contract ERC20Interface {
    function totalSupply() public view returns (uint);
    function balanceOf(address tokenOwner) public view returns (uint balance);
    function allowance(address tokenOwner, address spender) public view returns (uint remaining);
    function transfer(address to, uint tokens) public returns (bool success);
    function approve(address spender, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint tokens) public returns (bool success);
    // optional
    function name() external view returns (string);
    function symbol() external view returns (string);
    function decimals() external view returns (string);

    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}

{% endtab %}

{% endtabs %}

About

yToken wrappers for automated investment strategy tokenization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%