Skip to content

RequestIdLibrary

State Variables

SMART_CONTRACT_SIGNATURE_FLAG

uint256 internal constant SMART_CONTRACT_SIGNATURE_FLAG = 1 << 192;

Functions

from

Creates a RequestId from a client address and a 32-bit index.

function from(address client1, uint32 id) internal pure returns (RequestId);
Parameters
NameTypeDescription
client1addressThe address of the client.
iduint32The 32-bit index.
Returns
NameTypeDescription
<none>RequestIdThe constructed RequestId.

from

Creates a RequestId from a client address, a 32-bit index, and a smart contract signature flag.

function from(address client1, uint32 id, bool isSmartContractSig) internal pure returns (RequestId);
Parameters
NameTypeDescription
client1addressThe address of the client.
iduint32The 32-bit index.
isSmartContractSigboolWhether the request uses a smart contract signature.
Returns
NameTypeDescription
<none>RequestIdThe constructed RequestId.

clientAndIndex

Extracts the client address and index from a RequestId.

function clientAndIndex(RequestId id) internal pure returns (address, uint32);
Parameters
NameTypeDescription
idRequestIdThe RequestId to extract from.
Returns
NameTypeDescription
<none>addressThe client address and the 32-bit index.
<none>uint32

clientIndexAndSignatureType

Extracts the client address and index from a RequestId.

function clientIndexAndSignatureType(RequestId id) internal pure returns (address, uint32, bool);
Parameters
NameTypeDescription
idRequestIdThe RequestId to extract from.
Returns
NameTypeDescription
<none>addressThe client address and the 32-bit index, and true if the signature is a smart contract signature.
<none>uint32
<none>bool

clientAndIsSmartContractSigned

function clientAndIsSmartContractSigned(RequestId id) internal pure returns (address, bool);

isSmartContractSigned

function isSmartContractSigned(RequestId id) internal pure returns (bool);