-
Notifications
You must be signed in to change notification settings - Fork 8
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
Gauntlet inspection command #39
Conversation
342b558
to
84c69da
Compare
packages-ts/gauntlet-terra-contracts/src/commands/contracts/ocr2/inspection/inspect.ts
Outdated
Show resolved
Hide resolved
import { InspectInstruction, InspectionInput, instructionToInspectCommand } from '../../../abstract/inspectionWrapper' | ||
import { getOffchainConfigInput, OffchainConfig } from '../setConfig' | ||
|
||
type Expected = { |
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'd suggest another name here:
type Expected = { | |
type OnChainData = { |
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.
Expected
is also the user input, what the OnChainData
will be checked against.
return { | ||
description, | ||
decimals, | ||
minAnswer: 'INFO NOT AVAILABLE IN CONTRACT', |
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/how are these handled then?
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 they are not exposed in the contract. @archseer is there any way to get these?
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.
Not sure if Solidity exposes these either, but I can add a query for them if needed?
} | ||
} | ||
|
||
const makeOnchainData = (instructionsData: any[]): Expected => { |
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.
It would be more readable (also safer when typed) to name instruction outputs in an object instead of appending them to the array. Please consider for future improvements.
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.
Right, I can fix it in this 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.
I'll open an issue for this, currently no time to do it
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-ts/gauntlet-terra-contracts/src/commands/abstract/inspectionWrapper.ts
Outdated
Show resolved
Hide resolved
3026d3a
to
ca931ae
Compare
ca931ae
to
cfee50b
Compare
cfee50b
to
f356a75
Compare
No description provided.