From 34c997c3c8139fd79acb0737187f84c71a237508 Mon Sep 17 00:00:00 2001 From: Aditya Arora Date: Tue, 3 Dec 2024 07:54:39 -0500 Subject: [PATCH 1/3] chore(entropy)-add-error-page --- pages/entropy/error-codes.mdx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 pages/entropy/error-codes.mdx diff --git a/pages/entropy/error-codes.mdx b/pages/entropy/error-codes.mdx new file mode 100644 index 00000000..54e11a6a --- /dev/null +++ b/pages/entropy/error-codes.mdx @@ -0,0 +1,21 @@ +# Error Codes + +The following table contains the errors used in the Pyth Network's Entropy [EVM contracts](https://github.com/pyth-network/pyth-crosschain/blob/d290f4ec47a73636cf77711f5f68c3455bb8a8ca/target_chains/ethereum/contracts/contracts/entropy/Entropy.sol). +This information is derived from [EntropyErrors.sol](https://github.com/pyth-network/pyth-crosschain/blob/d290f4ec47a73636cf77711f5f68c3455bb8a8ca/target_chains/ethereum/entropy_sdk/solidity/EntropyErrors.sol) +in the Pyth EntropySDK and can be used to decode error codes programmatically. + +| Error Codes | Error | Error Description | +| ----------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | +| 0xd82dd966 | AssertionFailure() | Contract invariant failed. | +| 0xda041bdf | ProviderAlreadyRegistered() | Provider already registered. | +| 0xdf51c431 | NoSuchProvider() | Requested Provider does not exist. | +| 0xc4237352 | NoSuchRequest() | Request does not exist. | +| 0x3e515085 | OutOfRandomness() | Provider is our of committed random numbers. | +| 0x025dbdd4 | InsufficientFee() | Transaction fee insufficient. | +| 0xb8be1a8d | IncorrectRevelation() | Revelation does not match commitment. | +| 0xb463ce7a | InvalidUpgradeMagic() | Governance message is invalid. | +| 0x82b42900 | Unauthorized() | `msg.sender` is not allowed to invoke this method. | +| 0x92555c0e | BlockhashUnavailable() | Blockhash is 0. | +| 0x50f0dc92 | InvalidRevealCall() | Invalid reveal call method. If a request was made using `requestWithCallback`, request should be fulfilled using `revealWithCallback`else if a request was made using `request`, request should be fulfilled using `reveal` | | +| 0xb28d9c76 | LastRevealedTooOld() | Last random number revealed is too old. | +| 0x5e5b3f1b | UpdateTooOld() | More recent commitment already revealed on-chain. | From 6533bfd27dadf038ca96edd4ed27efafc011ae49 Mon Sep 17 00:00:00 2001 From: Aditya Arora Date: Tue, 3 Dec 2024 07:57:24 -0500 Subject: [PATCH 2/3] indexing --- pages/entropy/_meta.json | 1 + pages/entropy/error-codes.mdx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pages/entropy/_meta.json b/pages/entropy/_meta.json index f4917851..24fba283 100644 --- a/pages/entropy/_meta.json +++ b/pages/entropy/_meta.json @@ -38,6 +38,7 @@ "href": "https://fortuna.dourolabs.app/docs/", "newWindow": true }, + "error-codes": "Error Codes", "examples": "Example Applications", "-- Understanding Entropy": { diff --git a/pages/entropy/error-codes.mdx b/pages/entropy/error-codes.mdx index 54e11a6a..72da42fd 100644 --- a/pages/entropy/error-codes.mdx +++ b/pages/entropy/error-codes.mdx @@ -5,7 +5,7 @@ This information is derived from [EntropyErrors.sol](https://github.com/pyth-net in the Pyth EntropySDK and can be used to decode error codes programmatically. | Error Codes | Error | Error Description | -| ----------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | +| ----------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 0xd82dd966 | AssertionFailure() | Contract invariant failed. | | 0xda041bdf | ProviderAlreadyRegistered() | Provider already registered. | | 0xdf51c431 | NoSuchProvider() | Requested Provider does not exist. | @@ -16,6 +16,6 @@ in the Pyth EntropySDK and can be used to decode error codes programmatically. | 0xb463ce7a | InvalidUpgradeMagic() | Governance message is invalid. | | 0x82b42900 | Unauthorized() | `msg.sender` is not allowed to invoke this method. | | 0x92555c0e | BlockhashUnavailable() | Blockhash is 0. | -| 0x50f0dc92 | InvalidRevealCall() | Invalid reveal call method. If a request was made using `requestWithCallback`, request should be fulfilled using `revealWithCallback`else if a request was made using `request`, request should be fulfilled using `reveal` | | +| 0x50f0dc92 | InvalidRevealCall() | Invalid reveal call method. If a request was made using `requestWithCallback`, request should be fulfilled using `revealWithCallback`else if a request was made using `request`, request should be fulfilled using `reveal` | | 0xb28d9c76 | LastRevealedTooOld() | Last random number revealed is too old. | | 0x5e5b3f1b | UpdateTooOld() | More recent commitment already revealed on-chain. | From 4e881573ea5f7543ccfa3801155ac95db18ce0d4 Mon Sep 17 00:00:00 2001 From: Aditya Arora Date: Tue, 3 Dec 2024 08:51:24 -0500 Subject: [PATCH 3/3] changes --- pages/entropy/error-codes.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/entropy/error-codes.mdx b/pages/entropy/error-codes.mdx index 72da42fd..90439ced 100644 --- a/pages/entropy/error-codes.mdx +++ b/pages/entropy/error-codes.mdx @@ -9,13 +9,13 @@ in the Pyth EntropySDK and can be used to decode error codes programmatically. | 0xd82dd966 | AssertionFailure() | Contract invariant failed. | | 0xda041bdf | ProviderAlreadyRegistered() | Provider already registered. | | 0xdf51c431 | NoSuchProvider() | Requested Provider does not exist. | -| 0xc4237352 | NoSuchRequest() | Request does not exist. | -| 0x3e515085 | OutOfRandomness() | Provider is our of committed random numbers. | -| 0x025dbdd4 | InsufficientFee() | Transaction fee insufficient. | +| 0xc4237352 | NoSuchRequest() | Request does not exist or the request has been fulfilled. | +| 0x3e515085 | OutOfRandomness() | Provider is out of committed random numbers. | +| 0x025dbdd4 | InsufficientFee() | Request fee is insufficient. | | 0xb8be1a8d | IncorrectRevelation() | Revelation does not match commitment. | | 0xb463ce7a | InvalidUpgradeMagic() | Governance message is invalid. | | 0x82b42900 | Unauthorized() | `msg.sender` is not allowed to invoke this method. | -| 0x92555c0e | BlockhashUnavailable() | Blockhash is 0. | +| 0x92555c0e | BlockhashUnavailable() | Blockhash is unavailable. | | 0x50f0dc92 | InvalidRevealCall() | Invalid reveal call method. If a request was made using `requestWithCallback`, request should be fulfilled using `revealWithCallback`else if a request was made using `request`, request should be fulfilled using `reveal` | | 0xb28d9c76 | LastRevealedTooOld() | Last random number revealed is too old. | | 0x5e5b3f1b | UpdateTooOld() | More recent commitment already revealed on-chain. |