ERC20LookthroughUpgradable
ERC20Lookthrough is an ERC-20 whose total supply is tied to a function in an external contract
There is no IERC20LookthroughUpgradable since all functions override IERC20 or are private
Functions#
__ERC20Lookthrough_init#
function __ERC20Lookthrough_init( string name, string symbol, address underlyingContractAddress, string underlyingBalanceFunction ) internalThe initialization function i.e., a proxy contract's equivalent of a constructor
Parameters:#
| Name | Type | Description |
|---|---|---|
name | string | Standard ERC-20 name |
symbol | string | Standard ERC-20 symbol |
underlyingContractAddress | address | The underlying contract |
underlyingBalanceFunction | string | The function name of the underlying contract that's called to determine total supply |
totalSupply#
function totalSupply( ) public returns (uint256)ERC20 totalSupply function that references another contract based on _underlyingContractAddress & arbitrary function _underlyingBalanceFunction
balanceOf#
function balanceOf( ) public returns (uint256)ERC-20 balanceOf function that references another contract based on _underlyingContractAddress & arbitrary function _underlyingBalanceFunction
_transfer#
function _transfer( ) internalBased on Open Zeppelin's ERC-20 implementation
_mint#
function _mint( ) internalBased on Open Zeppelin's ERC-20 implementation
_burn#
function _burn( ) internalBased on Open Zeppelin's ERC-20 implementation