Skip to content

Solidity API

SpanningERC20

Implementation of the {ISpanningERC20} interface.

constructor

constructor(string name, string symbol, address delegate) public

Creates the instance and assigns required values.

NameTypeDescription
namestring- Desired name for the token
symbolstring- Desired symbol for the token
delegateaddress- Legacy (local) address for the Spanning Delegate

_duringTokenMint

function _duringTokenMint(bytes32 senderAddress, bytes32 receiverAddress, uint256 amount) internal virtual

Function override that hooks into the mint lifecycle

NameTypeDescription
senderAddressbytes32- Unused
receiverAddressbytes32- Address to receive the minted tokens
amountuint256- Amount of token to mint TODO(ENG-145): FIX overflows

_duringTokenBurn

function _duringTokenBurn(bytes32 senderAddress, bytes32 receiverAddress, uint256 amount) internal virtual

Function override that hooks into the burn lifecycle

NameTypeDescription
senderAddressbytes32- Address that the token is burned from
receiverAddressbytes32- Unused
amountuint256- Amount of token to burn

_duringTokenTransfer

function _duringTokenTransfer(bytes32 senderAddress, bytes32 receiverAddress, uint256 amount) internal virtual

Function override that hooks into the transfer lifecycle

NameTypeDescription
senderAddressbytes32- Address initiating the transfer
receiverAddressbytes32- Address to receive the transfer
amountuint256- Amount of token to transfer

_duringTokenApprove

function _duringTokenApprove(bytes32 senderAddress, bytes32 receiverAddress, uint256 amount) internal virtual

Function override that hooks into the approve lifecycle

NameTypeDescription
senderAddressbytes32- Address of the allowance sender
receiverAddressbytes32- Address of the allowance receiver
amountuint256- Amount of allowance to issue