Requests

As mentioned in the Overview, Strategists must write their own code for interacting with Steward leveraging the protobuf definitions. The main request type in the Steward API is ScheduleRequest, which is used to pass call data parameters to Steward which will then be built into the actualy contract call data. The request proto defintion can be found here.

Definition

// Defined in steward/proto/steward/v4/steward.proto

// Represents a scheduled function call to a particular Cellar
message ScheduleRequest {
    // The ID (currently simply an Ethereum address) of the target Cellar
    string cellar_id = 1;
    // The Sommelier block height at which to schedule the contract call
    uint64 block_height = 2;
    // The data from which the desired contract function will be encoded
    oneof call_data {
        AaveV2Stablecoin aave_v2_stablecoin = 3;
        CellarV1 cellar_v1 = 4;
        CellarV2 cellar_v2 = 5;
        CellarV2_2 cellar_v2_2 = 6;
        CellarV2_5 cellar_v2_5 = 7;
    }
    // The ID of the chain on which the target Cellar resides
    uint64 chain_id = 8;
    // The unix timestamp deadline for the contract call to be executed.
    // Ignored for Ethereum Cellars.
    uint64 deadline = 9;
}

Fields

  • block_height: The Sommelier block height at which a bridge transaction will be created. This is when the bridging process begins, not when the EVM transaction is executed. There is an inherent delay between the time of this height and actualy transaction execution on the target contract.

  • call_data: The payload of contract call parameters. A detailed reference of the CellarV2_5 type and its function definitions can be found in the Cellar Functions section.

  • cellar_id: The ID of the target Cellar, which is its EVM address. The address does not need to be checksummed (EIP-55) as the chain ID will provide target chain information.

  • chain_id: For non-Ethereum Cellars only. The EVM ID of the chain where the target Cellar resides. The default is 1, which is Ethereum Mainnet. Axelar provides a reference for other Mainnet chain IDs here.

  • deadline: For non-Ethereum Cellars only. This is the unix timestamp deadline for the contract call to be executed by Axelar. If Axelar fails to relay the transaction before the deadline it will not be executed. This field will be ignored for Ethereum Cellars.

Last updated