PantosToken ABI
The Pantos Token ABI is a JSON representation of the PantosToken
smart contract's interface, containing the functions and events necessary for interacting with cross-chain tokens.
The ABI acts as an interface between the contract's bytecode and the outside world. Here's a breakdown of the important elements in the Pantos Token ABI.
Functions
pantosTransfer
Called by the Pantos Forwarder to transfer tokens on a blockchain.
The function is only callable by a trusted Pantos Forwarder contract and thefore can't be invoked by a user. The function is used to transfer tokens on a blockchain between the sender and recipient. Revert if anything prevents the transfer from happening.
Parameters
sender
address
The address of the sender of the tokens.
recipient
address
The address of the recipient of the tokens.
amount
uint256
The amount of tokens to mint.
pantosTransferFrom
Called by the Pantos Forwarder to debit tokens on the source blockchain during a cross-chain transfer.
The function is only callable by a trusted Pantos Forwarder contract and thefore can't be invoked by a user. The function is used to burn tokens on the source blockchain to initiate a cross-chain transfer. Revert if anything prevents the transfer from happening.
Parameters
sender
address
The address of the sender of the tokens.
amount
uint256
The amount of tokens to send/burn.
pantosTransferTo
Called by the Pantos Forwarder to mint tokens on the destination blockchain during a cross-chain transfer.
The function is only callable by a trusted Pantos Forwarder contract and thefore can't be invoked by a user. The function is used to mint tokens on the destination blockchain to finish a cross-chain transfer. Revert if anything prevents the transfer from happening.
Parameters
recipient
address
The address of the recipient of the tokens.
amount
uint256
The amount of tokens to mint.
getPantosForwarder
Returns the address of the Pantos Forwarder contract.
Returns
<none>
address
Address of the Pantos Forwarder.
totalSupply
Returns the value of tokens in existence.
balanceOf
Returns the value of tokens owned by account
.
transfer
Moves a value
amount of tokens from the caller's account to to
. Returns a boolean value indicating whether the operation succeeded. Emits a Transfer event.
allowance
Returns the remaining number of tokens that spender
will be allowed to spend on behalf of owner
through transferFrom. This is zero by default. This value changes when {approve} or {transferFrom} are called.
approve
Sets a value
amount of tokens as the allowance of spender
over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an Approval event.
transferFrom
Moves a value
amount of tokens from from
to to
using the allowance mechanism. value
is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a Transfer event.
decimals
Returns
<none>
uint8
The token decimals.
symbol
Returns
<none>
string
The token symbol.
name
Returns
<none>
string
The token name.
getOwner
Returns
<none>
address
The token owner.
supportsInterface
Returns true if this contract implements the interface defined by interfaceId
. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.
Events
PantosForwarderSet
PantosForwarderUnset
Transfer
Emitted when value
tokens are moved from one account (from
) to another (to
). Note that value
may be zero.
Approval
Emitted when the allowance of a spender
for an owner
is set by a call to approve. value
is the new allowance.
ABI
Last updated