LinkedTKN.sol
The token contract for the linked protocol contains the logic for the ERC20 token of the linked assets instance.
Below the overview of all external functions in the token contract. The detailed description of a non ERC20 state change function can be found in the tab of the specific function.
#Linked asset specific functions
function initialize(address proxyAddress) external returns (bool success);
function depositExchange(uint256 value) whenNotPaused external returns (bool);
function devClaim() external returns (bool success);
function ethFee(uint256 amount) owners external returns (bool success);
#ERC20 based functions, note: some functions have adjustments in logic.
function transfer(address recipient, uint256 amount) whenNotPaused external payable returns (bool);
function approve(address spender, uint256 value) whenNotPaused external returns (bool);
function transferFrom(address payable sender, address recipient, uint256 amount) whenNotPaused external payable returns (bool);
function increaseAllowance(address spender, uint256 addedValue) whenNotPaused external returns (bool);
function decreaseAllowance(address spender, uint256 subtractedValue) whenNotPaused external returns (bool);
function mint(address account, uint256 amount) whenNotPaused onlyMinter external returns (bool);
function burn(address account, uint256 amount) whenNotPaused onlyMinter external returns (bool);
#Non state changing functions
function gettotalSupply() public view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(address ownerAddress, address spender) external view returns (uint256);
function balanceOfDev() public view returns (uint256);High overview
The functions in the token contract input a normalized token amount, except for the mint and burn functions. The tokens are normalized based on the tax fee rate. This is done to efficiently deduct the fee of users. The mint and burn function input non-normalized, calculate the normalized amount and mint/burn this amount. This is because the mint and burn function are used to create and remove tokens.
State change functions - Non ERC20
initialize() can only be called once and is used to set the contract addresses of the proxy contract for this linked asset instance.
depositExchange()
devClaim()
ethFee()
State change functions - ERC20
transfer()
approve()
transferFrom()
increaseAllowance()
decreaseAllowance()
mint()
burn()
Non state change functions
gettotalSupply()
balanceOf()
allowance()
balanceOfDev
Last updated
Was this helpful?