*Before you begin, it is highly recommended that you read the official docs carefully.
This bootstrap template allows you to write XRPL hooks in Rust.
You may need:
-
Examples to view use cases
-
Hooks Testnet where you can create test accounts, view transactions, etc.
This is part of the XRPL Hooks Rust project developed for XRPL Hackathon 2021.
- We need
rustup
if not already installed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source ~/.bashrc
- Add wasm32 target
rustup target add wasm32-unknown-unknown
- We need
nodejs v12
for setting hooks to XRPL
curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
Clone this repo
git clone https://github.com/otov4its/xrpl-hook-template.git
cd xrpl-hook-template/
Make changes in src/lib.rs
Build
./build
The builded wasm hook is contained in the project root directory.
Set hook
nodejs set_hook s*** hook_debug
Check
nodejs pay s*** 1000 r***
Goto -> "Step 0" :)
nodejs set_hook s*** hook
./build_examples
The builded wasm are contained in examples folder.
To set example hook run:
nodejs set_hook s*** examples/HOOKNAME