InterfaceDestination

Git Source

Functions

passAgentRoot

Attempts to pass a quarantined Agent Merkle Root to a local Light Manager.

Will do nothing, if root optimistic period is not over.

function passAgentRoot() external returns (bool rootPending);

Returns

NameTypeDescription
rootPendingboolWhether there is a pending agent merkle root left

acceptAttestation

Accepts an attestation, which local AgentManager verified to have been signed by an active Notary for this chain.

Attestation is created whenever a Notary-signed snapshot is saved in Summit on Synapse Chain.

  • Saved Attestation could be later used to prove the inclusion of message in the Origin Merkle Tree.
  • Messages coming from chains included in the Attestation's snapshot could be proven.
  • Proof only exists for messages that were sent prior to when the Attestation's snapshot was taken.

Will revert if any of these is true:

  • Called by anyone other than local AgentManager.
  • Attestation payload is not properly formatted.
  • Attestation signer is in Dispute.
  • Attestation's snapshot root has been previously submitted. Note: agentRoot and snapGas have been verified by the local AgentManager.
function acceptAttestation(
    uint32 notaryIndex,
    uint256 sigIndex,
    bytes memory attPayload,
    bytes32 agentRoot,
    ChainGas[] memory snapGas
) external returns (bool wasAccepted);

Parameters

NameTypeDescription
notaryIndexuint32Index of Attestation Notary in Agent Merkle Tree
sigIndexuint256Index of stored Notary signature
attPayloadbytesRaw payload with Attestation data
agentRootbytes32Agent Merkle Root from the Attestation
snapGasChainGas[]Gas data for each chain in the Attestation's snapshot

Returns

NameTypeDescription
wasAcceptedboolWhether the Attestation was accepted

attestationsAmount

Returns the total amount of Notaries attestations that have been accepted.

function attestationsAmount() external view returns (uint256);

getAttestation

Returns a Notary-signed attestation with a given index.

Index refers to the list of all attestations accepted by this contract.

Attestations are created on Synapse Chain whenever a Notary-signed snapshot is accepted by Summit. Will return an empty signature if this contract is deployed on Synapse Chain.

function getAttestation(uint256 index) external view returns (bytes memory attPayload, bytes memory attSignature);

Parameters

NameTypeDescription
indexuint256Attestation index

Returns

NameTypeDescription
attPayloadbytesRaw payload with Attestation data
attSignaturebytesNotary signature for the reported attestation

getGasData

Returns the gas data for a given chain from the latest accepted attestation with that chain.

Will return empty values if there is no data for the domain, or if the notary who provided the data is in dispute.

function getGasData(uint32 domain) external view returns (GasData gasData, uint256 dataMaturity);

Parameters

NameTypeDescription
domainuint32Domain for the chain

Returns

NameTypeDescription
gasDataGasDataGas data for the chain
dataMaturityuint256Gas data age in seconds

destStatus

Returns status of Destination contract as far as snapshot/agent roots are concerned

function destStatus() external view returns (uint40 snapRootTime, uint40 agentRootTime, uint32 notaryIndex);

Returns

NameTypeDescription
snapRootTimeuint40Timestamp when latest snapshot root was accepted
agentRootTimeuint40Timestamp when latest agent root was accepted
notaryIndexuint32Index of Notary who signed the latest agent root

nextAgentRoot

Returns Agent Merkle Root to be passed to LightManager once its optimistic period is over.

function nextAgentRoot() external view returns (bytes32);

lastAttestationNonce

Returns the nonce of the last attestation submitted by a Notary with a given agent index.

Will return zero if the Notary hasn't submitted any attestations yet.

function lastAttestationNonce(uint32 notaryIndex) external view returns (uint32);