filecoin-solidity
filecoin-solidity copied to clipboard
getDealActivation(dealID) will revert the contract if the deal is expired
getDealActivation(dealID)
will revert the contract if the deal is expired.
This is the comment above the function:
/// @notice Fetches activation state for a deal.
/// @notice This will be available from when the proposal is published until an undefined period after the deal finishes (either normally or by termination).
/// @return USR_NOT_FOUND if the deal doesn't exist (yet), or EX_DEAL_EXPIRED if the deal has been removed from state.
By this, I'm assuming that I can get a return value when the deal expired, including that scenario when the start epoch past before the sealing was done.
This is the return type of the function:
struct GetDealActivationReturn {
int64 activated;
int64 terminated;
}
I don't know how this function would signal if the deal expired. If it is not the intended behavior that it is signaling that the deal expired, then I don't know how I should check first whether the deal is expired or not, so the smart contract call does not fail.
:link: zboto Link