This repository contains base to create a project around predicates.
src
containing the source code of the predicatetypescript_interactions
containing code to make interactions with the predicate in Typescriptrust_interactions
containing code to make interactions with the predicate in Rust
forc build
Download the source code from : https:/FuelLabs/fuel-core
Be careful, maybe the Rust SDK or Fuel SDK are supposed to be used with a certain version, if you encouter versions error in the futur, stop your node, checkout to tag v0.xx.x
.
Launch a node with a consensus key to build a block :
cargo run --bin fuel-core -- --db-type in-memory --consensus-key 9e24cfa071f6c1c4984a17ecf18061a8d0c9c304e7dd7703788bd122bd578650
Go to typescript_interactions
folder.
Install dependencies :
npm i
Run the script that will interact with the predicate :
npm run start
Go to rust_interactions
folder.
Run the script that will interact with the predicate :
PREDICATE_BINARY_PATH=../out/debug/predicate.bin cargo run
Do not hesitate to participate to this template if you think it could be improved.
If you encouter any problem, feel free to open an issue