-
Notifications
You must be signed in to change notification settings - Fork 470
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
ENS documentation #587
ENS documentation #587
Conversation
I added tests with wasm-bindgen-test and by using a browser. It works great and the tests are actually useful. I removed the example as I can't find a way to make it work. edit: I'm not sure how to disable the automated testing for tests/web.rs |
tests/web.rs
Outdated
@@ -0,0 +1,161 @@ | |||
use wasm_bindgen::*; |
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.
Why do these test need to be run in wasm_bindgen
environment? Can't we use a mock transport?
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.
AFAIK with mock transport we can't know if the interface works with the contract in the wild. Testing against the real contract allow us to know if it changed.
The down side is that it can't be automated.
The best would be to deploy the contract to ganache then do the tests. I'll see what I can do tomorrow.
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.
I tried my best but maybe I should just scrap the test suite for ENS. I can't deploy the contracts, I don't understand what testing with mock transport would do since writing the response and the request will always succeed and I don't know how to automate the browser testing.
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 a lot, looks pretty good!
@@ -19,6 +19,8 @@ pub enum Error { | |||
/// An error during deployment. | |||
#[display(fmt = "Deployment error: {}", _0)] | |||
Deployment(crate::contract::deploy::Error), | |||
/// Contract does not support this interface. | |||
InterfaceUnsupported, |
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.
Seems unused?
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.
When check_interface_support return false its emitted.
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.
Can you point me to a line when it's emitted? I can't see this in that PR.
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.
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Hi,
I'm trying to deploy ENS contracts as an example but I'm having errors.
rust-web3/src/confirm.rs
Line 88 in 81c41ae
I'm not sure why the receipt it empty.
I will adding tests for most ENS functionality too.