Closed siriusyim closed 5 months ago
Using the following contract code to call VerifRegAPI.getClaims to retrieve the claim(calibnet)
function getReplicaClaimData( uint64 _provider, uint64 _claimId ) external returns (bytes memory) { CommonTypes.FilActorId[] memory claimIds = new CommonTypes.FilActorId[]( 1 ); claimIds[0] = CommonTypes.FilActorId.wrap(_claimId); VerifRegTypes.GetClaimsParams memory params = VerifRegTypes .GetClaimsParams(CommonTypes.FilActorId.wrap(_provider), claimIds); VerifRegTypes.GetClaimsReturn memory claims = VerifRegAPI.getClaims( params ); require(claims.claims.length > 0, "length mast greater than 0"); return claims.claims[0].data; }
the error message is as follows:
cast call --rpc-url $NETWORK_RPC_URL 0xFA1bd72E48b0500337E748215E672675c9D04820 "getReplicaClaimData(uint64,uint64)" 33601 27133 Error: (code: 1, message: message execution failed: exit 33, revert reason: Error(slicing out of range), vm error: message failed with backtrace: 00: f079537 (method 3844450837) -- contract reverted (33) 01: f079537 (method 6) -- contract reverted (33) (RetCode=33), data: None)
merged in https://github.com/filecoin-project/filecoin-solidity/pull/52
Using the following contract code to call VerifRegAPI.getClaims to retrieve the claim(calibnet)
the error message is as follows: