Rust and Typescript examples for forc-index
Forc.toml
metadata
#1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
forc-index-ts
which simply reads/parsesForc.toml
project.metadata
and then reads the contract ABI and prints out theloggedTypes
json object (which can potentially be used for a proper indexing implementation)forc-index-rust
# > forc index --path ./sample-project/Forc.toml 📖 Reading Forc.toml configuration... ✓ Forc.toml validated successfully 📑 Reading ABI schema... Path: sample-project/out/release/counter-contract-abi.json ✓ ABI schema loaded successfully 📋 Logged Types: [Entry 1] 🔍 Log ID: 17947550689929035683 🔑 Concrete Type ID: f912824325897fa36746f20338e0f7a92f1e39c11bf82d47b971f7a528d7ad81
Linked PRs
Forc.toml
metadata support sway#6728