Created
November 18, 2020 19:23
-
-
Save WietseWind/14babf8b12a39546ca31ddddeec70ef9 to your computer and use it in GitHub Desktop.
Hooks snippets (dev.to blog) Hooked 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker exec -it xrpld-hooks tail -f log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define OUT_OF_BOUNDS -1 // could not read or write to a pointer to provided by hook | |
#define INTERNAL_ERROR -2 // eg directory is corrupt | |
#define TOO_BIG -3 // something you tried to store was too big | |
#define TOO_SMALL -4 // something you tried to store or provide was too small | |
#define DOESNT_EXIST -5 // something you requested wasn't found | |
#define NO_FREE_SLOTS -6 // when trying to load an object there is a maximum of 255 slots | |
#define INVALID_ARGUMENT -7 // self explanatory | |
#define ALREADY_SET -8 // returned when a one-time parameter was already set by the hook | |
#define PREREQUISITE_NOT_MET -9 // returned if a required param wasn't set before calling | |
#define FEE_TOO_LARGE -10 // returned if the attempted operation would result in an absurd fee | |
#define EMISSION_FAILURE -11 // returned if an emitted tx was not accepted by rippled | |
#define TOO_MANY_NONCES -12 // a hook has a maximum of 256 nonces | |
#define TOO_MANY_EMITTED_TXN -13 // a hook has emitted more than its stated number of emitted txn | |
#define NOT_IMPLEMENTED -14 // an api was called that is reserved for a future version | |
#define INVALID_ACCOUNT -15 // an api expected an account id but got something else | |
#define GUARD_VIOLATION -16 // a guarded loop or function iterated over its maximum | |
#define INVALID_FIELD -17 // the field requested is returning sfInvalid | |
#define PARSE_ERROR -18 // hook asked hookapi to parse something the contents of which was invalid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run the docker container, and call it 'xrpld-hooks' | |
docker run -dit --name xrpld-hooks richardah/xrpld-hooks-tech-preview | |
# Open an interactive shell (bash) in the 'xrpld-hooks' container | |
docker exec -it xrpld-hooks /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment