Skip to content
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

Merged
merged 5 commits into from
Feb 10, 2022
Merged

Gauntlet inspection command #39

merged 5 commits into from
Feb 10, 2022

Conversation

RodrigoAD
Copy link
Member

@RodrigoAD RodrigoAD commented Jan 20, 2022

No description provided.

Base automatically changed from gauntlet-main-commands to main January 24, 2022 10:34
import { InspectInstruction, InspectionInput, instructionToInspectCommand } from '../../../abstract/inspectionWrapper'
import { getOffchainConfigInput, OffchainConfig } from '../setConfig'

type Expected = {
Copy link
Collaborator

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:

Suggested change
type Expected = {
type OnChainData = {

Copy link
Member Author

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',
Copy link
Collaborator

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?

Copy link
Member Author

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?

Copy link
Collaborator

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 => {
Copy link
Collaborator

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.

Copy link
Member Author

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

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#86

krebernisak
krebernisak previously approved these changes Feb 7, 2022
@RodrigoAD RodrigoAD merged commit cbb0587 into main Feb 10, 2022
@RodrigoAD RodrigoAD deleted the gauntlet-inspection-command branch February 10, 2022 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants