-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clarity-repl]
Expose method to construct JSON abi from contract source
#913
Comments
@hugocaillard @lgalabru is there any way that I can hack on something to get this working? such as can I use this https://github.com/stacks-network/stacks-blockchain/blob/master/clarity/src/vm/analysis/contract_interface_builder/mod.rs as a wasm module? |
Hey @aulneau, /* components/clarity-repl/src/lib.rs */
/* ... */
#[cfg(feature = "wasm")]
#[wasm_bindgen]
pub fn get_contract_interface(name: &str) {
let mut session = unsafe {
match WASM_GLOBAL_CONTEXT.session.take() {
Some(session) => session,
None => return (),
}
};
build_contract_interface(session. /* get analysis ... */);
()
} I could try to dig a bit deeper over the weekend or early next week |
@aulneau Is this still needed? |
Yes please |
I marked this issue as fixed with #1151, because it's available in the clarinet-sdk.
More documentation to come soon. @aulneau It might not be exactly what you were looking for so feel free to re-open or reach out to me |
I'm working on an index of clarity contracts, and I want the ability to convert a string representation (standard .clar contents as string) of a contract into a JSON ABI, similar to the results from the stacks-blockchain-api/node.
There are lots of use cases I have planned for it, but generally it's so I'm able to construct different views of a contract or find similarities between many.
The text was updated successfully, but these errors were encountered: