*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
rustupif 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 v12for setting hooks to XRPL
curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejsClone this repo
git clone https://github.com/otov4its/xrpl-hook-template.git
cd xrpl-hook-template/Make changes in src/lib.rs
Build
./buildThe builded wasm hook is contained in the project root directory.
Set hook
nodejs set_hook s*** hook_debugCheck
nodejs pay s*** 1000 r***Goto -> "Step 0" :)
nodejs set_hook s*** hook./build_examplesThe builded wasm are contained in examples folder.
To set example hook run:
nodejs set_hook s*** examples/HOOKNAME