-
Notifications
You must be signed in to change notification settings - Fork 52
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: add factory class #534
feat: add factory class #534
Conversation
Niraj-Kamdar
commented
Nov 16, 2021
- closes: Implement Interface_Query_Factory to create Interface_Query from any URI #532
TODO:
#import { Query } into Interface from "interface.eth"
type Query implements Interface_Query {
...
}
class Interface_Query {
static interfaceUri: string = "/ens/interface.eth";
constructor(public uri: string) { }
method(args: Input_method): string {
w3_subinvoke(this.uri, etc);
}
} |
From what I understand, we are going to use class Ethereum_Query {
static uri: string = "/ens/ethereum.eth";
static method(args: Input_method): string {
w3_subinvoke("/ens/ethereum.eth", etc);
}
} But in the case where it is in interfaces array, it will be interface and we will be generating code for this like: class Interface_Query {
static interfaceUri: string = "/ens/interface.eth";
constructor(public uri: string) { }
method(args: Input_method): string {
w3_subinvoke(this.uri, etc);
}
} But doing it like this would require user to implement all the interfaces that he just want to use. Let me know what do you think and whether I get it wrong. |
1a77bb6
to
145afa8
Compare
Made an issue here to describe some future changes we might want to make: #547 |