Crates.io | symbiotic-rs |
lib.rs | symbiotic-rs |
version | 0.1.0 |
source | src |
created_at | 2024-10-26 09:10:16.83969 |
updated_at | 2024-10-26 09:10:16.83969 |
description | Rust bindings for the Symbiotic Protocol smart contracts |
homepage | |
repository | |
max_upload_size | |
id | 1423670 |
size | 312,883 |
This repository contains Rust bindings for the Symbiotic Protocol smart contracts. These bindings allow for easy interaction with the Symbiotic Protocol from Rust applications.
alloy-sol-types
serde
Add this to your Cargo.toml
:
symbiotic-rs = { version = "0.1.0" }
To add new contracts to the Rust bindings, follow these steps:
Add the contract import to contracts/src/Utility.sol
:
import "path/to/NewContract.sol";
Add the JSON file for the new contract to the list in the test_forge_build_and_json_extraction
test in src/lib.rs
:
let json_files = vec![
// ... existing files ...
"NewContract.sol/NewContract.json",
];
Run the test to generate the JSON files:
cargo test test_forge_build_and_json_extraction
Add the new contract to the generate_sol_types!
macro in src/lib.rs
:
generate_sol_types!(
// ... existing contracts ...
NewContract, "json/NewContract.json",
);
These steps will ensure that the new contract is properly imported, its JSON artifact is copied to the correct location, and it's exposed in the Rust bindings for use in your project.