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

Updated gas #55

Merged
merged 1 commit into from
Feb 16, 2024
Merged

Updated gas #55

merged 1 commit into from
Feb 16, 2024

Conversation

Megha-Dev-19
Copy link
Collaborator

Resolves #33
Resolves #34

@Megha-Dev-19 Megha-Dev-19 merged commit 4655050 into main Feb 16, 2024
@@ -493,7 +493,7 @@ const handleVote = ({
contractName: daoId,
methodName: isCongressDaoID ? "vote" : "act_proposal",
args: args,
gas: 200000000000000
gas: 270000000000000

Choose a reason for hiding this comment

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

the act_proposal can have max gas attached

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Are you sure.? I m not much aware about the contract side complications with different proposal types, but I would rather have it set a bit less, if it allows almost all of the use cases.

Choose a reason for hiding this comment

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

Most proposals need way less gas. There's no downside in attaching max because you get refund anyway.

That's why it would be best to have an input field for attached gas or maybe also linked to a slider.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Okay I will increase it to 300Tgas. The reason I don’t want to display an input or slider in UI is most people who aren’t aware will get confused, and may be assign too little gas (in hope of saving some), and the txn might fail because of that. We can revisit it later.

@@ -107,9 +107,16 @@ const handleFunctionCall = () => {
});
return;
}
if (state.gas > 300) {

Choose a reason for hiding this comment

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

as mentioned 300 TGas will always fail. It's difficult to give an exact estimate, but this is the gas that gets attached to the cross contract call, so it's always less than 300 TGas. I would reduce the max allowed Gas here to the default 270

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Quick question
Is it necessary it will always be a cross contract call.?

Choose a reason for hiding this comment

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

Yes that's by design of Sputnik DAO contract

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will update it, thanks for the information

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.

Decide how much Gas should be attached to a vote FunctionCall proposal no Gas check
2 participants