Skip to content

Commit

Permalink
OpenRPC examples (MystenLabs#3715)
Browse files Browse the repository at this point in the history
* add examples to openrpc.json

* add more examples to openrpc.json
remove event read api from rpc doc

* add more examples to openrpc.json

* fix clippy
  • Loading branch information
patrickkuo authored Aug 2, 2022
1 parent c4edfd6 commit a851164
Show file tree
Hide file tree
Showing 7 changed files with 1,296 additions and 353 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/sui-open-rpc-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pub fn open_rpc(attr: TokenStream, item: TokenStream) -> TokenStream {
pub struct #open_rpc_name;
impl #open_rpc_name {
pub fn module_doc() -> sui_open_rpc::Module{
let mut builder = sui_open_rpc::RpcModuleDocBuilder::new();
let mut builder = sui_open_rpc::RpcModuleDocBuilder::default();
#(#methods)*
builder.build()
}
Expand Down
3 changes: 3 additions & 0 deletions crates/sui-open-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ edition = "2021"
[dependencies]
schemars = "0.8.10"
serde = "1.0.141"
serde_json = "1.0.82"
workspace-hack = { path = "../workspace-hack"}

[dev-dependencies]
Expand All @@ -26,8 +27,10 @@ sui-json = { path = "../sui-json" }
sui-types = { path = "../sui-types" }
sui-config = { path = "../sui-config" }
test-utils = { path = "../test-utils" }
rand = "0.7.3"

move-package = { git = "https://github.com/move-language/move", rev = "79071528524f08b12e9abb84c1094d8e976aa17a" }
move-core-types = { git = "https://github.com/move-language/move", rev = "79071528524f08b12e9abb84c1094d8e976aa17a", features = ["address20"] }

[[example]]
name = "generate-json-rpc-spec"
Expand Down
Loading

0 comments on commit a851164

Please sign in to comment.