-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: start a Rust library for querying CNS #76
Conversation
test_client: Principal, | ||
} | ||
|
||
fn cns_setup() -> CnsSetup { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor nit, but why not make this an init
function on the CnsSetup
struct? Also, maybe it could be called CnsFixture
, which I think slightly describes the intention better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Loosen the requirements on dependencies' versions. Co-authored-by: Nathan Mc Grath <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, PTAL.
canisters/test-client/Cargo.toml
Outdated
include = ["src", "Cargo.toml"] | ||
homepage = "https://github.com/dfinity/cns#readme" | ||
repository = "https://github.com/dfinity/cns" | ||
keywords = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, not really, copy-paste thing... removed now.
test_client: Principal, | ||
} | ||
|
||
fn cns_setup() -> CnsSetup { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
pic.add_cycles(test_client, INIT_CYCLES); | ||
println!(" cns_root CID: {}", cns_root); | ||
println!(" tld_operator CID: {}", tld_operator); | ||
println!(" test_client CID: {}", test_client); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, intentional -- they don't cost much, and are useful when looking at logs of potentially failing tests.
Add a Rust
cns_client
-library, for using CNS from Rust, and add the corresponding tests.Also, update the existing CNS canisters to require a dot after the TLD (to comply with the spec).