Skip to content

Commit 60d6ccb

Browse files
committed
fix(FVMRewards): import EXIT_SUCCESS from fvm-solidity instead of redefining
Assisted-by: Claude:claude-sonnet-4-6
1 parent 904a142 commit 60d6ccb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/lib/FVMRewards.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {CALL_ACTOR_BY_ID} from "fvm-solidity/FVMPrecompiles.sol";
55
import {REWARD_ACTOR_ID} from "fvm-solidity/FVMActors.sol";
66
import {NO_FLAGS} from "fvm-solidity/FVMFlags.sol";
77
import {CBOR_CODEC} from "fvm-solidity/FVMCodec.sol";
8+
import {EXIT_SUCCESS} from "fvm-solidity/FVMErrors.sol";
89

910
import {
1011
REGISTER_STREAM,
@@ -45,8 +46,8 @@ library FVMRewards {
4546
/// length; a mismatch has no encoding.
4647
error ArrayLengthMismatch(uint256 ids, uint256 records);
4748

48-
int256 internal constant EXIT_SUCCESS = 0;
49-
/// @dev Returned when the precompile itself fails, distinguishing that from any actor code.
49+
/// @dev Sentinel for the unexpected case where the syscall reverts or returns fewer than 32
50+
/// bytes. Kept at -1 to match `fvm-solidity`'s behavior.
5051
int256 internal constant EXIT_PRECOMPILE_FAILED = -1;
5152

5253
uint256 private constant ENVELOPE_HEAD = 0xe0;

0 commit comments

Comments
 (0)