-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: simplify client and builder naming (#234)
* renamed PolywrapClient to Client * renamed PolywrapClientConfig to ClientConfig and PolywrapClientConfigBuilder to ClientConfigBuilder
- Loading branch information
1 parent
7a65d69
commit 3264a1d
Showing
42 changed files
with
185 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,12 +22,12 @@ fn main() { | |
let domain = "vitalik.eth".to_string(); | ||
let ens_uri = uri!("wrapscan.io/polywrap/[email protected]"); | ||
|
||
let mut config = PolywrapClientConfig::new(); | ||
let mut config = ClientConfig::new(); | ||
config | ||
.add(SystemClientConfig::default().into()) | ||
.add(Web3ClientConfig::default().into()); | ||
|
||
let client = PolywrapClient::new(config.build()); | ||
let client = Client::new(config.build()); | ||
|
||
let resolver_address = client.invoke::<String>( | ||
&ens_uri, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ struct ToEthArgs { | |
fn main() { | ||
let ethers_core_uri = uri!("wrapscan.io/polywrap/[email protected]"); | ||
let ethers_util_uri = uri!("wrapscan.io/polywrap/[email protected]"); | ||
let mut config = PolywrapClientConfig::new(); | ||
let mut config = ClientConfig::new(); | ||
config.add(SystemClientConfig::default().into()); | ||
|
||
let mainnet_connection = Connection::new( | ||
|
@@ -50,7 +50,7 @@ fn main() { | |
|
||
config.add_package(uri!("wrapscan.io/polywrap/[email protected]"), package); | ||
|
||
let client = PolywrapClient::new(config.build()); | ||
let client = Client::new(config.build()); | ||
|
||
let balance = client.invoke::<String>( | ||
ðers_core_uri, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,15 +21,15 @@ struct FileArgs { | |
|
||
fn main() { | ||
let uri = uri!("wrapscan.io/polywrap/[email protected]"); | ||
let mut config = PolywrapClientConfig::new(); | ||
let mut config = ClientConfig::new(); | ||
let fs_package = PluginPackage::from(FileSystemPlugin {}); | ||
|
||
config.add_package(uri.clone(), Arc::new(fs_package)); | ||
|
||
let file_path = "./fs-example.txt".to_string(); | ||
let data = "Hello world!"; | ||
|
||
let client = PolywrapClient::new(config.build()); | ||
let client = Client::new(config.build()); | ||
let write_file_result = client.invoke::<bool>( | ||
&uri, | ||
"writeFile", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,12 +37,12 @@ struct PostArgs { | |
|
||
fn main() { | ||
let uri = uri!("wrapscan.io/polywrap/[email protected]"); | ||
let mut config = PolywrapClientConfig::new(); | ||
let mut config = ClientConfig::new(); | ||
let http_package = PluginPackage::from(HttpPlugin {}); | ||
|
||
config.add_package(uri.clone(), Arc::new(http_package)); | ||
|
||
let client = PolywrapClient::new(config.build()); | ||
let client = Client::new(config.build()); | ||
let get_result = client.invoke::<Response>( | ||
&uri, | ||
"get", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,12 +34,12 @@ fn main() { | |
let ipfs_provider = "http://localhost:5001"; | ||
let uri = uri!("wrapscan.io/polywrap/[email protected]"); | ||
|
||
let mut config = PolywrapClientConfig::new(); | ||
let mut config = ClientConfig::new(); | ||
config.add(SystemClientConfig::default().into()); | ||
|
||
let config = config.build(); | ||
|
||
let client = PolywrapClient::new(config); | ||
let client = Client::new(config); | ||
|
||
let file_name = "hello-world.txt"; | ||
let file_data = "Hello World!!!"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,10 +12,10 @@ struct LogMessageArgs { | |
|
||
fn main() { | ||
let wrap_uri = uri!("wrapscan.io/polywrap/[email protected]"); | ||
let mut config = PolywrapClientConfig::new(); | ||
let mut config = ClientConfig::new(); | ||
|
||
config.add(SystemClientConfig::default().into()); | ||
let client = PolywrapClient::new(config.build()); | ||
let client = Client::new(config.build()); | ||
let result = client.invoke::<bool>( | ||
&wrap_uri, | ||
"info", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.