Storage Market Actor
Storage market actor is responsible for managing storage and retrieval deals.
The ActorCode for storage market actor is hex"0005" which will be used to call this actor. You also need to specify method number of which method you want to invoke. Please refer the each method for its method number.
AddBalance
function addBalance(CommonTypes.FilAddress memory providerOrClient, uint256 value) internal {}
Deposit the received FIL token, which is received along with this message, into the balance held in escrow address of the provider or client address.
uint AddBalanceMethodNum = 822473126.
Params:
FilAddressAddress - the address of provider or client.uint256value - the amount of FIL token you want to deposit into the balance
Results:
structEmptyValue.
GetBalance
function getBalance(CommonTypes.FilAddress memory addr) internal returns (MarketTypes.GetBalanceReturn memory) {}
Return the escrow balance and locked amount for an address.
uint GetBalanceMethodNum = 726108461.
Params:
FilAddressaddress - the wallet address to request balance.
Results:
structGetBalanceReturnBigIntBalance - the escrow balance for this address.BigIntLocked - the escrow locked amount for this address.
WithdrawBalance
function withdrawBalance(MarketTypes.WithdrawBalanceParams memory params) internal returns (CommonTypes.BigInt memory) {}
Withdraw the specified amount from the balance held in escrow.
uint WithdrawBalanceMethodNum = 2280458852.
Params:
structWithdrawBalanceParamsFilAddressProviderOrClientAddress - the address of provider or client.BigIntTokenAmount - the token amount to withdraw.
Results:
BigIntAmountWithdraw - the token amount withdrawn.
PublishStorageDeals
function publishStorageDeals(MarketTypes.PublishStorageDealsParams memory params) internal returns (MarketTypes.PublishStorageDealsReturn memory) {}
Publish a new set of storage deals which are not yet included in a sector.
uint PublishStorageDealsMethodNum = 2236929350.
Params:
structPublishStorageDealsParamsstruct ClientDealProposal[]Deals - list of deal proposals signed by a client-
struct DealProposalProposalCidPieceCID.uint64PieceSize - the size of the piece.boolVerifiedDeal - if the deal is verified or not.FilAddressClient - the address of the storage client.FilAddressProvider - the address of the storage provider.DealLabelLabel - any label that client choose for the deal.ChainEpochStartEpoch - the chain epoch to start the deal.ChainEpochEndEpoch - the chain epoch to end the deal.BigIntStoragePricePerEpoch - the token amount to pay to provider per epoch.BigIntProviderCollateral - the token amount as collateral paid by the provider.BigIntClientCollateral - the token amount as collateral paid by the client.
-
bytesClientSignature - the signature signed by the client.
-
Results:
structPublishStorageDealsReturnuint64[]IDs - returned storage deal IDs.bytesValidDeals - represent all the valid deals.
GetDealDataCommitment
function getDealDataCommitment(uint64 dealID) internal returns (MarketTypes.GetDealDataCommitmentReturn memory) {}
Return the data commitment and size of a deal proposal.
uint GetDealDataCommitmentMethodNum = 1157985802.
Params:
uint64GetDealDataCommitmentParams - Deal ID.
Results:
structGetDealDataCommitmentReturnbytesData - the data commitment of this deal.uint64Size - the size of this deal.
GetDealClient
function getDealClient(uint64 dealID) internal returns (uint64) {}
Return the client of the deal proposal.
uint GetDealClientMethodNum = 128053329.
Params:
uint64GetDealClientParams - CID of the deal proposal.
Results:
uint64GetDealClientReturn - the wallet address of the client.
GetDealProvider
function getDealProvider(uint64 dealID) internal returns (uint64) {}
Return the provider of a deal proposal.
uint GetDealProviderMethodNum = 935081690.
Params:
uint64GetDealProviderParams - CID of the deal proposal.
Results:
uint64GetDealProviderReturn - the wallet address of the provider.
GetDealLabel
function getDealLabel(uint64 dealID) internal returns (CommonTypes.DealLabel memory) {}
Return the label of a deal proposal.
uint GetDealLabelMethodNum = 46363526.
Params:
uint64GetDealLabelParams - CID of the deal proposal.
Results:
DealLabelGetDealLabelReturn - the label of this deal.
GetDealTerm
function getDealTerm(uint64 dealID) internal returns (MarketTypes.GetDealTermReturn memory) {}
Return the start epoch and duration(in epochs) of a deal proposal.
uint GetDealTermMethodNum = 163777312.
Params:
uint64GetDealTermParams - CID of the deal proposal.
Results:
structGetDealTermReturnChainEpochStart - the chain epoch to start the deal.ChainEpochEnd - the chain epoch to end the deal.
GetDealTotalPrice
function getDealTotalPrice(uint64 dealID) internal returns (CommonTypes.BigInt memory) {}
Return the total price that will be paid from the client to the provider for this deal.
uint GetDealEpochPriceMethodNum = 4287162428.
Params:
uint64GetDealTotalPriceParams - CID of the deal proposal.
Results:
BigIntGetDealTotalPriceReturn - the token amount that will be paid by client to provider.
GetDealClientCollateral
function getDealClientCollateral(uint64 dealID) internal returns (CommonTypes.BigInt memory) {}
Return the client collateral requirement for a deal proposal.
uint GetDealClientCollateralMethodNum = 200567895.
Params:
uint64GetDealClientCollateralParams - CID of the deal proposal.
Results:
BigIntGetDealClientCollateralReturn - the token amount as collateral paid by the client.
GetDealProviderCollateral
function getDealProviderCollateral(uint64 dealID) internal returns (CommonTypes.BigInt memory) {}
Return the provide collateral requirement for a deal proposal.
uint GetDealProviderCollateralMethodNum = 2986712137.
Params:
uint64GetDealProviderCollateralParams - CID of the deal proposal.
Results:
BigIntGetDealProviderCollateralReturn - the token amount as collateral paid by the provider.
GetDealVerified
function getDealVerified(uint64 dealID) internal returns (bool) {}
Return the verified flag for a deal proposal.
uint GetDealVerifiedMethodNum = 2627389465.
Params:
uint64GetDealVerifiedParams - CID of the deal proposal.
Results:
boolGetDealVerifiedReturn - if the deal is verified or not.
GetDealActivation
function getDealActivation(uint64 dealID) internal returns (MarketTypes.GetDealActivationReturn memory) {}
Return the activation state for a deal.
uint GetDealActivationParams = 2567238399.
Params:
uint64GetDealVerifiedParams - CID of the deal proposal.
Results:
structGetDealActivationReturnChainEpochActivated - Epoch at which the deal was activated, or -1.ChainEpochTerminated -Epoch at which the deal was terminated abnormally, or -1.