Startpoint Called
Listens for an invocation of a Midpoint-deployed startpoint.
Last updated
Was this helpful?
Listens for an invocation of a Midpoint-deployed startpoint.
Last updated
Was this helpful?
Triggers when a contract invokes the callMidpoint
function on a Midpoint-deployed Startpoint contract.
Startpoint Called is used to trigger a midpoint from on-chain by making a call to the callMidpoint
function in a Midpoint-deployed contract. Startpoint Called is used when creating oracles, data bridges, or any other workflow that begins with a contract on chain 'initiating' the workflow.
Every chain has one Startpoint contract with the following two public functions:
A Startpoint is triggered by invoking a call to the callMidpoint
function and passing the and optionally passing in a packed byte array _data
. The startpoint contract will assign and return a globall unique to the caller. This can be used to associate a response transaction with the originating call.
Startpoints currently support intN
, uintN
, boolean
, address
, and string
Solidity types.
The Startpoint contract expects all of the passed parameters (defined in variables
) to be packed according to the following specification.
Parameters are packed with Solidity's abi.encodePacked()
.
Parameters are ordered according to the order defined in the StartpointCalledSource definition.
Each string is followed by a Null byte, indicated with bytes1(0x00)
No additional values are added to _data
Examples:
A StartpointCalledSource is expecting a single int256
valued called X.
A StartpointCalledSource is expecting two string
values called Y and Z.
A StartpointCalledSource is expecting three variables in the following order: a uint256
called A, a string
called B and a boolean
called C.
A StartpointCalledSource is expecting no variables.
whitelist
: Array of {string, string}. Array of chainId - contractAddress pairs. The Startpoint only listens for invocations to callMidpoint
that come from a whitelisted chainId and contractAddress pair. A single Startpoint Called source may listen for calls from multiple contracts and chains simultaneously.
whitelist.contractAdddress
: Ethereum Address. A valid 40-character Ethereum address prepended with 0x
. Example: 0xEf1c6E67703c7BD7107eed8303Fbe6EC2554BF6B
variables
: Array of {string, string}. Ordered array of variables that are expected to be passed from on-chain when this midpoint is called.
variables.name
: String.The name to be assigned to this variable for use in future tasks.
variables.datatype
: Enum[uintN, intN, boolean, string, address]. The Solidity type expected to be passed from on-chain. example: uint256
Timestamp
Unixtime of execution.
Contract_Address
The contract address that invoked the call to the Startpoint.
Chain_ID
The chain ID where the Startpoint was called.
Block_Number
The block number containing the transaction making the call.
Txn_Hash
The transaction hash of the transaction making the call.
Txn_Origin
The EOA that initiated the transaction that made the call.
TaskDefinition
The complete definition of this task at runtime.
The Startpoint Called source returns each of the variables listed under the variables
field for use in future tasks - in addition to each field specified in extracts
.
This section is incomplete.
This section is incomplete.
See for detailed information on the Startpoint contract and deployed startpoing addresses.
whitelist.chainId
: See .
extracts
: See . Legal values:
Midpoint_ID
See .
Request_ID
See .
excludeLogs
: See . Legal values: