Solidity API
ISpanningERC20Interface of ERC20 in the Spanning Protocol
balanceOffunction balanceOf(bytes32 account) external view returns (uint256)
Copy Returns the amount of tokens owned by an account.
Name Type Description account bytes32 - Address to be queried
Name Type Description [0] uint256 uint256 - Token value for an account
transferfunction transfer(bytes32 receiverAddress, uint256 amount) external returns (bool)
Copy Moves tokens from the caller's account to another account.
Name Type Description receiverAddress bytes32 - Address to receive the transfer amount uint256 - Amount to transfer
Name Type Description [0] bool bool - Indicates whether the operation succeeded
allowancefunction allowance(bytes32 senderAddress, bytes32 receiverAddress) external view returns (uint256)
Copy Gets the number of authorized tokens in the allowance pair. Note: This value can change when {approve} or {transferFrom} are called Note: The result is zero when an entry does not exist in the map
Name Type Description senderAddress bytes32 - Address of the allowance sender receiverAddress bytes32 - Address of the allowance receiver
Name Type Description [0] uint256 uint256 - Number of tokens in the allowance pair
approvefunction approve(bytes32 receiverAddress, uint256 amount) external returns (bool)
Copy Sets an allowance for a pair of addresses (sender and receiver). Note: There can be race conditions due to ordering. See more: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
Name Type Description receiverAddress bytes32 - Address of the allowance receiver amount uint256 - Amount of allowance to issue
Name Type Description [0] bool bool - Indicates whether the operation succeeded
transferFromfunction transferFrom(bytes32 senderAddress, bytes32 receiverAddress, uint256 amount) external returns (bool)
Copy Transfers tokens from from sender to receiver. Note: This uses the allowance mechanism to transfer tokens.
Name Type Description senderAddress bytes32 - Address of the allowance sender receiverAddress bytes32 - Address of the allowance receiver amount uint256 - Amount of allowance to issue
Name Type Description [0] bool bool - Indicates whether the operation succeeded
updateRecordsfunction updateRecords() external returns (bool)
Copy _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_
Name Type Description [0] bool bool - Indicates whether the operation succeeded
Events
Transferevent Transfer(bytes32 senderAddress, bytes32 receiverAddress, uint256 amount)
Copy Emitted tokens are transferred. Note that amount
may be zero.
Name Type Description senderAddress bytes32 - Address initiating the transfer receiverAddress bytes32 - Address receiving the transfer amount uint256 - Amount to transfer
Approvalevent Approval(bytes32 senderAddress, bytes32 receiverAddress, uint256 amount)
Copy Emitted when an allowance pair changes.
Name Type Description senderAddress bytes32 - Address of the allowance sender receiverAddress bytes32 - Address of the allowance receiver amount uint256 - Amount to approve