-
Notifications
You must be signed in to change notification settings - Fork 19
state mutability fix #272
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
base: master
Are you sure you want to change the base?
state mutability fix #272
Conversation
| const params = params_ === undefined ? [] : params_; | ||
|
|
||
| logger.success("Waiting for confirmation..."); | ||
| const useContract: useContractType = { |
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.
Do not use variable name useContract as this name is generally used as a hook.
|
|
||
| const settingsGasLimit = (await getConfiguration().get("gasLimit")) as number; | ||
|
|
||
| const value = |
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 we create the input JSON for payable functions create the JSON with a value field. We should get all the necessary parameters from the input `JSON. Also optionally keep this input.
|
|
||
| export const MutableFunctionCall = async ( | ||
| context: ExtensionContext, | ||
| state: string, |
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.
state param should be renamed to stateMutability.
| getSignedContract, | ||
| } from "../networks"; | ||
|
|
||
| export const MutableFunctionCall = async ( |
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.
function names should always start with a smallcap letter.
| value: found.value, | ||
| }); | ||
| } | ||
| const params_ = abiItem.inputs?.map((e: any) => e.value); |
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 think the params should be read inside the mutable & immutable call functions as now the params will contain the payable value.
No description provided.