Crate api3_common

Source

Re-exports§

pub use util::*;

Modules§

abi
dummy
A collection of default implementations
util

Macros§

ensure

Structs§

Aggregator
The Manager for handling multiple datapoints
DataPoint
The data point struct in the original API3 beacon server contract
RoleDeriver
Contract that implements the AccessControlRegistry role derivation logic

Enums§

Error
StaticRole
Roles that are known at dev time.

Constants§

BYTES32_ZERO

Traits§

AccessControlRegistry
The access control registry interface in the solidity contract
AccessControlRegistryAdminnedWithManager
SignatureManger
Public trait that handles signature verification across different chains
Storage
Generic storage trait. Used for the common processing logic so that each chain could have their own implementation.
TimestampChecker
Public trait that handles timestamp fetching across different chains
Whitelist
Trait that implements temporary and permanent whitelists for multiple services identified with a hash
WhitelistRoles
WhitelistRolesWithManager
WhitelistWithManager
Whitelist contract that is controlled by a manager
Zero
Checks if the address is zero

Functions§

decode_fulfillment_data
Decode the encoded data to the respective data types. Returns the Result of decoding fulfillment data.
derive_beacon_id
Derives the beacon id based on the airnode and templated_id Returns the beacon id
derive_dapi_id
Derives the dAPI ID from the beacon IDs Notice that encode() is used over encode_packed() Returns the derived dapi id
process_beacon_update
Called privately to process the Beacon update. Returns the updated Beacon value.
read_with_data_point_id
Reads the data point with ID Returns tuple containing (DataPoint.value, DataPoint.timestamp).
read_with_name
Reads the data point with name The read data point may belong to a Beacon or dAPI. The reader must be whitelisted for the hash of the data point name. Returns tuple containing (DataPoint.value, DataPoint.timestamp).
reader_can_read_data_point
Returns if a reader can read the data point
set_name
Sets the data point ID the name points to While a data point ID refers to a specific Beacon or dAPI, names provide a more abstract interface for convenience. This means a name that was pointing at a Beacon can be pointed to a dAPI, then another dAPI, etc.
update_dapi_with_beacons
Updates the dAPI that is specified by the beacon IDs. Returns the dAPI ID.
update_dapi_with_signed_data
Updates a dAPI using data signed by the respective Airnodes without requiring a request or subscription. The beacons for which the signature is omitted will be read from the storage. Returns the dAPI ID.

Type Aliases§

Bytes
Bytes32