PantosHub ABI
The Pantos Hub ABI is a JSON representation of the PantosHub
smart contract's interface, containing the functions and events necessary to register tokens and service nodes, and to submit cross-chain token transfers.
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 Hub ABI.
Functions
pause
Pauses the Pantos Hub.
The function can only be called by the pauser role and only if the contract is not paused.
unpause
Unpauses the Pantos Hub.
The function can only be called by the super critical ops role and only if the contract is paused.
setPantosForwarder
Sets the Pantos Forwarder contract address.
The function can only be called by the super critical ops role and only if the contract is paused.
Parameters
pantosForwarder
address
The address of the Pantos Forwarder contract.
setPantosToken
Set the Pantos Token contract address.
The function can only be called by the super critical ops role and only if the contract is paused.
Parameters
pantosToken
address
The address of the Pantos Token contract.
setPrimaryValidatorNode
Update the primary validator node.
The function can only be called by the super critical ops role and only if the contract is paused.
Parameters
primaryValidatorNodeAddress
address
The address of the primary validator node.
registerBlockchain
Used by the super critical ops role to register a new blockchain.
The function can only be called by the super critical ops role.
Parameters
blockchainId
uint256
The ID of the new blockchain.
name
string
The name of the new blockchain.
validatorFeeFactor
uint256
The validator fee factor of the new blockchain.
unregisterBlockchain
Used by the super critical ops role to unregister a blockchain.
Parameters
blockchainId
uint256
The id of the blockchain to be unregistered.
updateBlockchainName
Used by the medium critical ops role to update the name of a registered blockchain.
The function can only be called by the medium critical ops role and if the contract is paused.
Parameters
blockchainId
uint256
The id of the blockchain to be updated.
name
string
The new name of the blockchain.
initiateValidatorFeeFactorUpdate
Initiate an update of a validator fee factor.
The function can only be called by the medium critical ops role.
Parameters
blockchainId
uint256
The ID of the blockchain the validator fee factor is updated for.
newValidatorFeeFactor
uint256
The new validator fee factor.
executeValidatorFeeFactorUpdate
Execute an update of a validator fee factor.
The function can only be called when the time delay after an initiated update has elapsed.
Parameters
blockchainId
uint256
The ID of the blockchain the validator fee factor is updated for.
initiateUnbondingPeriodServiceNodeDepositUpdate
Initiate an update of the unbonding period for service node deposits.
The function can only be called by the medium critical ops role.
Parameters
newUnbondingPeriodServiceNodeDeposit
uint256
The new unbonding period (in seconds) for service node deposits.
executeUnbondingPeriodServiceNodeDepositUpdate
Execute an update of the unbonding period for service node deposits.
The function can only be called when the time delay after an initiated update has elapsed.
initiateMinimumServiceNodeDepositUpdate
Initiate an update of the minimum service node deposit.
The function can only be called by the medium critical ops role.
Parameters
newMinimumServiceNodeDeposit
uint256
The new minimum service node deposit.
executeMinimumServiceNodeDepositUpdate
Execute an update of the minimum service node deposit.
The function can only be called when the time delay after an initiated update has elapsed.
initiateParameterUpdateDelayUpdate
Initiate an update of the parameter update delay.
The function can only be called by the medium critical ops role.
Parameters
newParameterUpdateDelay
uint256
The new parameter update delay.
executeParameterUpdateDelayUpdate
Execute an update of the parameter update delay.
The function can only be called when the time delay after an initiated update has elapsed.
registerToken
Allows a user to register a token with the Pantos Hub. The user is required to be the owner of the token contract.
Parameters
token
address
The address of the token contract.
unregisterToken
Allows a user to unregister a token with the Pantos Hub. The user is required to be the owner of the token contract.
Parameters
token
address
The address of the token contract.
registerExternalToken
Allows a user to register an external token with the Pantos Hub. The external token is a token contract on another blockchain.
The owner of a token residing on the current blockchain can register an external token with the Pantos Hub. The external token is a token contract on another blockchain. The external token is required to be deployed on the blockchain with the given id. The external token is required to be registered with the Pantos Hub on the blockchain with the given id.
Parameters
token
address
The address of the token contract on the current blockchain.
blockchainId
uint256
The id of the blockchain on which the external token is deployed.
externalToken
string
The address of the token contract on the external blockchain.
unregisterExternalToken
Allows a user to unregister an external token from the Pantos Hub on the current blockchain. The external token is a token contract on another blockchain. Unregistering an external token from the Pantos Hub makes it impossible to transfer tokens between the current blockchain and the blockchain on which the external token is deployed.
The owner of a token residing on the current blockchain can unregister an external token from the Pantos Hub. The external token is a token contract on another blockchain. The external token is required to be deployed on the blockchain with the given id. The external token is required to be registered with the Pantos Hub on the blockchain with the given id. Unregistering an external token from the Pantos Hub makes it impossible to transfer tokens between the current blockchain and the blockchain on which the external token is deployed.
Parameters
token
address
The address of the token contract on the current blockchain.
blockchainId
uint256
The id of the blockchain on which the external token is deployed.
registerServiceNode
Used by a service node or its withdrawal address to register a service node at the Pantos Hub.
The function is only callable by a service node itself or its withdrawal address. The service node is required to provide a URL under which it is reachable. The service node is required to provide a deposit in PAN in order to register. The deposit is required to be at least the minimum service node deposit. The service node is required to provide a withdrawal address where the deposit will be returned after the unregistration and the elapse of the unbonding period. The service node is required to be registered at the Pantos Hub in order to be able to transfer tokens between blockchains. If the service node was unregistered, this function can be called only if the deposit has already been withdrawn. If the service node intends to register again after an uregistration but the deposit has not been withdrawn, use the cancelServiceNodeUnregistration function.
Parameters
serviceNodeAddress
address
The registered service node address.
url
string
The URL under which the service node is reachable.
deposit
uint256
The provided deposit in PAN.
withdrawalAddress
address
The address where the deposit will be returned to after the service node has been unregistered.
unregisterServiceNode
Used by a service node or its withdrawal address to unregister a service node from the Pantos Hub.
The function is only callable by a service node itself or its withdrawal address. The service node is required to be registered in the Pantos Hub in order to be able to transfer tokens between blockchains. Unregistering a service node from the Pantos Hub makes it impossible to transfer tokens between blockchains using the service node. The deposit of the service node can be withdrawn after the elapse of the unbonding period by calling the withdrawServiceNodeDeposit function at the PantosHub.
Parameters
serviceNodeAddress
address
The address of the service node which is unregistered.
withdrawServiceNodeDeposit
Used by a service node or its withdrawal address to withdraw the deposit from the Pantos Hub.
The function is only callable by a service node itself or its withdrawal address. The deposit can be withdrawn only if the unbonding period has elapsed. The unbonding period is the minimum time that must pass between the unregistration of the service node and the withdrawal of the deposit.
Parameters
serviceNodeAddress
address
The address of the service node which wants to withdraw its deposit.
cancelServiceNodeUnregistration
Used by a service node or its withdrawal address to cancel the unregistration from the PantosHub.
The function is only callable by a service node itself or its withdrawal address. A service node might need to have its unregistration cancelled if a new registration is required before the unbondoing period would elapse.
Parameters
serviceNodeAddress
address
The address of the service node to cancel the unregistration for.
increaseServiceNodeDeposit
Increase a service node's deposit at the Pantos Hub.
The function is only callable by an active service node itself or the account of its withdrawal address.
Parameters
serviceNodeAddress
address
The address of the service node which will have its deposit increased.
deposit
uint256
The amount that will be added to the current deposit of the service node.
decreaseServiceNodeDeposit
Decrease a service node's deposit at the Pantos Hub.
The function is only callable by an active service node itself or the account of its withdrawal address.
Parameters
serviceNodeAddress
address
The address of the service node which will have its deposit decreased.
deposit
uint256
The amount that will be subtracted from the current deposit of the service node.
updateServiceNodeUrl
Used by a service node to update its url in the Pantos Hub.
The function is only callable by a service node itself. The service node is required to provide a new unique url under which it is reachable.
Parameters
url
string
The new url as string.
getPantosForwarder
Returns the address of the Pantos Forwarder contract.
Returns
<none>
address
The address of the Pantos Forwarder contract.
getPantosToken
Returns the address of the Pantos Token contract.
Returns
<none>
address
The address of the Pantos Token contract.
getPrimaryValidatorNode
Returns
<none>
address
The address of the primary validator node.
getNumberBlockchains
Returns the number of blockchains registered with the Pantos Hub.
Returns
<none>
uint256
The number as uint of blockchains registered with the Pantos Hub.
getNumberActiveBlockchains
Returns the number of active blockchains registered with the Pantos Hub.
Returns
<none>
uint256
The number as uint of active blockchains registered with the Pantos Hub.
getCurrentBlockchainId
Returns the blockchain id of the current blockchain.
Returns
<none>
uint256
The blockchain id as unit of the current blockchain.
getBlockchainRecord
Returns a blockchain record for a given blockchain id.
More information about the blockchain record can be found at PantosTypes-BlockchainRecord.
Parameters
blockchainId
uint256
The id of the blockchain.
Returns
<none>
PantosTypes.BlockchainRecord
The blockchain record for the given blockchain id.
getCurrentMinimumServiceNodeDeposit
Returns
<none>
uint256
The current minimum required deposit to register a service node at the Pantos Hub.
getMinimumServiceNodeDeposit
Returns
<none>
PantosTypes.UpdatableUint256
All data related to the minimum required deposit to register a service node at the Pantos Hub.
getCurrentUnbondingPeriodServiceNodeDeposit
Returns
<none>
uint256
The current unbonding period (in seconds) for service node deposits.
getUnbondingPeriodServiceNodeDeposit
Returns
<none>
PantosTypes.UpdatableUint256
All data related to the unbonding period (in seconds) for service node deposits.
getTokens
Returns a list of all tokens registered in the Pantos Hub which are also deployed on the same blockchain as this Pantos Hub.
Returns
<none>
address[]
A list of addresses of tokens registered in the Pantos Hub.
getTokenRecord
Returns a token record for a given token address.
More information about the TokenRecord data structure can be found at PantosTypes-TokenRecord.
Parameters
token
address
The address of a registered token for which a token record is requested.
Returns
<none>
PantosTypes.TokenRecord
A TokenRecord data structure.
getExternalTokenRecord
Returns a external token record for a external token under the given token address and blockchain id.
More information about the ExternalTokenRecord data structure can be found PantosTypes-ExternalTokenRecord.
Parameters
token
address
The address of the token registered in the Pantos Hub and being deployed on the same chain as the Pantos Hub.
blockchainId
uint256
The blockchain id of a different blockchain on which the external token is deployed too.
Returns
<none>
PantosTypes.ExternalTokenRecord
A ExternalTokenRecord data structure.
getServiceNodes
Returns a list of registered service nodes.
Returns
<none>
address[]
A list of addresses of registered services nodes.
getServiceNodeRecord
Returns a service node record for a given service node address.
More information about the ServiceNodeRecord data structure can be found at PantosTypes-ServiceNodeRecord.
Parameters
serviceNode
address
The address of a registered service node.
Returns
<none>
PantosTypes.ServiceNodeRecord
A ServiceNodeRecord data structure.
getCurrentValidatorFeeFactor
Parameters
blockchainId
uint256
The ID of the blockchain to get the validator fee factor for.
Returns
<none>
uint256
The current validator fee factor for the given blockchain.
getValidatorFeeFactor
Parameters
blockchainId
uint256
The ID of the blockchain to get the validator fee factor for.
Returns
<none>
PantosTypes.UpdatableUint256
All data related to the validator fee factor for the given blockchain.
getCurrentParameterUpdateDelay
Returns
<none>
uint256
The current time delay for updating Pantos Hub parameters.
getParameterUpdateDelay
Returns
<none>
PantosTypes.UpdatableUint256
All data related to the time delay for updating Pantos Hub parameters.
isServiceNodeInTheUnbondingPeriod
Takes the service node address and returns whether the service node is in the unbonding period or not.
Parameters
serviceNodeAddress
address
The service node address to be checked.
Returns
<none>
bool
True if the service node is in the unbonding period, false otherwise.
isValidValidatorNodeNonce
Check if a given nonce is a valid (i.e. not yet used) validator node nonce.
Parameters
nonce
uint256
The nonce to be checked.
Returns
<none>
bool
True if the nonce is valid.
paused
Returns true if the contract is paused, and false otherwise.
transfer
Transfers token between from a sender to a recipient on the current blockchain. This function can only be called by an active service node
The function is only callable by an active service node. The transfer request is required to be valid and signed by the sender of the tokens. More information about the TransferRequest data structure can be found at PantosTypes-TransferRequest
Parameters
request
PantosTypes.TransferRequest
The TransferRequest data structure containing the transfer request on the current blockchain
signature
bytes
Signature over the transfer request from the sender
Returns
<none>
uint256
The id of the transfer
transferFrom
Sender initiates a token transfer from the current blockchain to a recipient on another blockchain. This function can only be called by an active service node
The function is only callable by an active service node. The transfer request is required to be valid and signed by the sender of the tokens. The senders tokens are burnt on the current blockchain. More information about the TransferFromRequest data structure can be found at PantosTypes-TransferFromRequest
Parameters
request
PantosTypes.TransferFromRequest
The TransferFromRequest data structure containing the transfer request across blockchains
signature
bytes
Signature over the transfer request from the sender
Returns
<none>
uint256
The id of the transfer
transferTo
Second step of a cross-blockchain token transfer. The function is called by the Pantos Validator on the destination blockchain and the tokens are minted into the recipients wallet.
The function is only callable by the Pantos Validator on the destination blockchain. The transfer request is required to be valid and signed by the Pantos Validator. The tokens are minted into the recipients address on the destination blockchain. More information about the TransferToRequest data structure can be found at PantosTypes-TransferToRequest.
Parameters
request
PantosTypes.TransferToRequest
The TransferToRequest data structure containing the transfer request across blockchains.
signerAddresses
address[]
The addresses of the validator nodes that signed the transfer (must be ordered from the lowest to the highest address).
signatures
bytes[]
The signatures of the validator nodes (each signature must be in the same array position as the corresponding signer address).
Returns
<none>
uint256
The ID of the transfer.
isValidSenderNonce
Takes a sender address and a nonce and returns whether the nonce is valid for the sender or not
Parameters
sender
address
The address of the sender
nonce
uint256
The nonce to be checked
Returns
<none>
bool
True if the nonce is valid, false otherwise
verifyTransfer
Verifies if a TransferRequest data structure is valid or not
The function reverts if the TransferRequest data structure is not valid
Parameters
request
PantosTypes.TransferRequest
The TransferRequest data structure to be checked
signature
bytes
The signature over the TransferRequest data structure
verifyTransferFrom
Verifies if a TransferFromRequest data structure is valid or not
The function reverts if the TransferFromRequest data structure is not valid
Parameters
request
PantosTypes.TransferFromRequest
The TransferFromRequest data structure to be checked
signature
bytes
The signature over the TransferFromRequest data
verifyTransferTo
Verifies if a TransferToRequest data structure is valid or not.
The function reverts if the TransferToRequest data structure is not valid.
Parameters
request
PantosTypes.TransferToRequest
The TransferToRequest data structure to be checked.
signerAddresses
address[]
The addresses of the validator nodes that signed the transfer (must be ordered from the lowest to the highest address).
signatures
bytes[]
The signatures of the validator nodes (each signature must be in the same array position as the corresponding signer address).
getNextTransferId
This function returns a transfer id to be used in next transfer.
Events
Paused
Unpaused
PantosForwarderSet
PantosTokenSet
PrimaryValidatorNodeUpdated
Event that is emitted when the primary validator node is updated.
Parameters
primaryValidatorNodeAddress
address
The address of the primary validator node.
BlockchainRegistered
Event that is emitted when a new blockchain is registered.
Parameters
blockchainId
uint256
The ID of the new blockchain.
validatorFeeFactor
uint256
The validator fee factor of the new blockchain.
BlockchainUnregistered
Event that is emitted when an already registered blockchain is unregistered.
Parameters
blockchainId
uint256
The id of the blockchain.
BlockchainNameUpdated
TokenRegistered
TokenUnregistered
ExternalTokenRegistered
ExternalTokenUnregistered
ServiceNodeRegistered
Event that is emitted when a new service node is registered.
Parameters
serviceNode
address
The address of the new service node.
ServiceNodeUnregistered
Event that is emitted when a registered service node is unregistered.
Parameters
serviceNode
address
The address of the registered service node.
ServiceNodeUrlUpdated
Event that is emitted when a registered service node url is updated.
Parameters
serviceNode
address
The address of the registered service node.
UnbondingPeriodServiceNodeDepositUpdateInitiated
Event that is emitted when an update of the unbonding period for service node deposits is initiated.
Parameters
newUnbondingPeriodServiceNodeDeposit
uint256
The new unbonding period (in seconds) for service node deposits.
earliestUpdateTime
uint256
The earliest time when the update can be executed.
UnbondingPeriodServiceNodeDepositUpdateExecuted
Event that is emitted when an update of the unbonding period for service node deposits is executed.
Parameters
newUnbondingPeriodServiceNodeDeposit
uint256
The new unbonding period (in seconds) for service node deposits.
MinimumServiceNodeDepositUpdateInitiated
Event that is emitted when an update of the minimum service node deposit is initiated.
Parameters
newMinimumServiceNodeDeposit
uint256
The new minimum service node deposit.
earliestUpdateTime
uint256
The earliest time when the update can be executed.
MinimumServiceNodeDepositUpdateExecuted
Event that is emitted when an update of the minimum service node deposit is executed.
Parameters
newMinimumServiceNodeDeposit
uint256
The new minimum service node deposit.
ValidatorFeeFactorUpdateInitiated
Event that is emitted when an update of a validator fee factor is initiated.
Parameters
blockchainId
uint256
The ID of the blockchain the validator fee factor is updated for.
newValidatorFeeFactor
uint256
The new validator fee factor.
earliestUpdateTime
uint256
The earliest time when the update can be executed.
ValidatorFeeFactorUpdateExecuted
Event that is emitted when an update of a validator fee factor is executed.
Parameters
blockchainId
uint256
The ID of the blockchain the validator fee factor is updated for.
newValidatorFeeFactor
uint256
The new validator fee factor.
ParameterUpdateDelayUpdateInitiated
Event that is emitted when an update of the parameter update delay is initiated.
Parameters
newParameterUpdateDelay
uint256
The new parameter update delay.
earliestUpdateTime
uint256
The earliest time when the update can be executed.
ParameterUpdateDelayUpdateExecuted
Event that is emitted when an update of the parameter update delay is executed.
Parameters
newParameterUpdateDelay
uint256
The new parameter update delay.
TransferSucceeded
Event that is emitted when a Pantos single-chain token transfer succeeded.
Parameters
transferId
uint256
The unique Pantos transfer ID on the blockchain.
request
PantosTypes.TransferRequest
The transfer request.
signature
bytes
The sender's signature.
TransferFailed
Event that is emitted when a Pantos single-chain token transfer failed.
Parameters
transferId
uint256
The unique Pantos transfer ID on the blockchain.
request
PantosTypes.TransferRequest
The transfer request.
signature
bytes
The sender's signature.
tokenData
bytes32
Optional PANDAS token data (may contain an error message).
TransferFromSucceeded
Event that is emitted when a Pantos cross-chain token transfer succeeded on the source blockchain.
Parameters
sourceTransferId
uint256
The unique Pantos transfer ID on the source blockchain.
request
PantosTypes.TransferFromRequest
The transfer request.
signature
bytes
The sender's signature.
TransferFromFailed
Event that is emitted when a Pantos cross-chain token transfer failed on the source blockchain.
Parameters
sourceTransferId
uint256
The unique Pantos transfer ID on the source blockchain.
request
PantosTypes.TransferFromRequest
The transfer request.
signature
bytes
The sender's signature.
sourceTokenData
bytes32
Optional PANDAS token data (may contain an error message).
TransferToSucceeded
Event that is emitted when a Pantos cross-chain token transfer succeeded on the destination blockchain.
Parameters
destinationTransferId
uint256
The unique Pantos transfer ID on the destination blockchain.
request
PantosTypes.TransferToRequest
The transfer request.
signerAddresses
address[]
The addresses of the validator nodes that signed the transfer.
signatures
bytes[]
The signatures of the validator nodes (each signature is in the same array position as the corresponding signer address).
ABI
Last updated