Skip to content

Solidity API

SpanningERC20Upgradeable

Implementation of the {ISpanningERC20} interface.

__SpanningERC20_init

function __SpanningERC20_init(string name, string symbol, address delegate) internal

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

__SpanningERC20_init_unchained

function __SpanningERC20_init_unchained(string, string, address) internal

_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

_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

__gap

uint256[50] __gap

This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain. See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps We use a standard of 50 storage slots. The amount referenced below is based on: 50 - numberOfClassMemberVariables.