Implementation of Keeper's Set methods and associated tests for the following types:
The store path needs to be height + contractAddr + jobId
message Callback {
// contract_address is the address of the contract which is requesting the callback (bech32 encoded).
string contract_address = 1;
// job_id is an identifier the callback requestor can pass in to identify the callback when it happens.
uint64 job_id = 2;
// callback_height is the height at which the callback is executed.
uint64 callback_height = 3;
// fee_split is the breakdown of the fees paid by the contract to reserve the callback
CallbackFeesFeeSplit fee_split = 4;
// reserved_by is the address which reserved the callback (bech32 encoded).
string reserved_by = 5;
}
The Set() should fail when
contract_address does not exist
job id for that contract_address already exists at that callback height
callback height is not in the future
reserved by is not contract/owner
Implementation of Keeper's Get
Two get methods.
lists all the registered callbacks
Lists all callbacks at given height
implementation of Keeper's Delete
Deletes an individual callback. It should fail when
Implementation of Keeper's
Set
methods and associated tests for the following types:The store path needs to be
height + contractAddr + jobId
The Set() should fail when
Implementation of Keeper's
Get
Two get methods.
implementation of Keeper's
Delete
Deletes an individual callback. It should fail when