-
Notifications
You must be signed in to change notification settings - Fork 3
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: improve logging #16
Conversation
Didn't finish, because I'm blocked on not being able to make calls from ZetaChain: #17 |
Ready for review, @skosito |
packages/localnet/src/index.ts
Outdated
|
||
const FUNGIBLE_MODULE_ADDRESS = "0x735b14BB79463307AAcBED86DAf3322B1e6226aB"; | ||
|
||
const log = (chain: "EVM" | "ZetaChain", ...messages: any[]) => { |
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.
nit, but messages can be string[] most likely?
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.
packages/localnet/src/index.ts
Outdated
); | ||
}); | ||
} catch (e: any) { | ||
log("ZetaChain", ansis.red`Error executing onCrossChainCall: ${e}`); |
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.
nit, but logErr wrapper around this might be more convenient, up to you
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.
Nicer output to make it easier for developer to distinguish actions happening on EVM vs ZetaChain.
Using Ansis not Chalk for colors, because Chalk doesn't support TS.