Add entropy error signatures for easier access and debugging (#1259)

* Add entropy error signatures for easier access and debugging

* Add signatures for ExecutorErrors
This commit is contained in:
Amin Moghaddam 2024-01-30 11:32:48 +01:00 committed by GitHub
parent 58411495a0
commit 16b60d426e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View File

@ -3,19 +3,27 @@ pragma solidity ^0.8.0;
library ExecutorErrors { library ExecutorErrors {
// The provided message is not a valid Wormhole VAA. // The provided message is not a valid Wormhole VAA.
// Signature: 0x2acbe915
error InvalidWormholeVaa(); error InvalidWormholeVaa();
// The message is coming from an emitter that is not authorized to use this contract. // The message is coming from an emitter that is not authorized to use this contract.
// Signature: 0x4c79d142
error UnauthorizedEmitter(); error UnauthorizedEmitter();
// The sequence number of the provided message is before the last executed message. // The sequence number of the provided message is before the last executed message.
// Signature: 0xc75415f9
error MessageOutOfOrder(); error MessageOutOfOrder();
// The call to the provided contract executed without providing its own error. // The call to the provided contract executed without providing its own error.
// Signature: 0xf21e646b
error ExecutionReverted(); error ExecutionReverted();
// The message could not be deserialized into an instruction // The message could not be deserialized into an instruction
// Signature: 0xfbab86cf
error DeserializationError(); error DeserializationError();
// The message is not intended for this contract. // The message is not intended for this contract.
// Signature: 0x63daeb77
error InvalidGovernanceTarget(); error InvalidGovernanceTarget();
// The target address for the contract call is not a contract // The target address for the contract call is not a contract
// Signature: 0xd30c1cb5
error InvalidContractTarget(); error InvalidContractTarget();
// The governance message is not valid // The governance message is not valid
// Signature: 0x4ed848c1
error InvalidMagicValue(); error InvalidMagicValue();
} }

View File

@ -4,24 +4,34 @@ pragma solidity ^0.8.0;
library EntropyErrors { library EntropyErrors {
// An invariant of the contract failed to hold. This error indicates a software logic bug. // An invariant of the contract failed to hold. This error indicates a software logic bug.
// Signature: 0xd82dd966
error AssertionFailure(); error AssertionFailure();
// The provider being registered has already registered // The provider being registered has already registered
// Signature: 0xda041bdf
error ProviderAlreadyRegistered(); error ProviderAlreadyRegistered();
// The requested provider does not exist. // The requested provider does not exist.
// Signature: 0xdf51c431
error NoSuchProvider(); error NoSuchProvider();
// The specified request does not exist. // The specified request does not exist.
// Signature: 0xc4237352
error NoSuchRequest(); error NoSuchRequest();
// The randomness provider is out of commited random numbers. The provider needs to // The randomness provider is out of commited random numbers. The provider needs to
// rotate their on-chain commitment to resolve this error. // rotate their on-chain commitment to resolve this error.
// Signature: 0x3e515085
error OutOfRandomness(); error OutOfRandomness();
// The transaction fee was not sufficient // The transaction fee was not sufficient
// Signature: 0x025dbdd4
error InsufficientFee(); error InsufficientFee();
// Either the user's or the provider's revealed random values did not match their commitment. // Either the user's or the provider's revealed random values did not match their commitment.
// Signature: 0xb8be1a8d
error IncorrectRevelation(); error IncorrectRevelation();
// Governance message is invalid (e.g., deserialization error). // Governance message is invalid (e.g., deserialization error).
// Signature: 0xb463ce7a
error InvalidUpgradeMagic(); error InvalidUpgradeMagic();
// The msg.sender is not allowed to invoke this call. // The msg.sender is not allowed to invoke this call.
// Signature: 0x82b42900
error Unauthorized(); error Unauthorized();
// The blockhash is 0. // The blockhash is 0.
// Signature: 0x92555c0e
error BlockhashUnavailable(); error BlockhashUnavailable();
} }