Skip to content

Solidity API

SpanningERC20Record

Implementation of the {ISpanningERC20} interface.

token_

bytes32 token_

constructor

constructor(string name, string symbol, address delegate, bytes32 token) 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
tokenbytes32- Address for the state-storage of a token contract

updateRecords

function updateRecords() public virtual returns (bool)

_Pulls read-only information relevant to the domain ownership from the appropriate middleware node or domain

Note: This function should be called prior to reading any information through this domain, to ensure data is up to date_

NameTypeDescription
[0]boolbool - Indicates whether the operation succeeded

_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

updateTokenAddress

function updateTokenAddress(bytes32 newTokenAddress) public

Update the contract's token Address.

NameTypeDescription
newTokenAddressbytes32- Desired address for the token contract

getTokenAddress

function getTokenAddress() public view returns (bytes32)
NameTypeDescription
[0]bytes32bytes32 - Address for the state-storage of a token contract