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

L1 Execution Cost is hardcoded #6

Open
gzeoneth opened this issue May 3, 2023 · 0 comments
Open

L1 Execution Cost is hardcoded #6

gzeoneth opened this issue May 3, 2023 · 0 comments

Comments

@gzeoneth
Copy link
Collaborator

gzeoneth commented May 3, 2023

value: "1000000000000000", // retryable submission cost TODO: don't hardcode this

It is because we know that the execution will always need some eth for submission cost, but we can also do it like

// Simulation failed, try again by setting value to the difference between total call values and governor ETH balance.
const governorEthBalance = await provider.getBalance(governor.address)
const newValue = totalValue.sub(governorEthBalance).toString()
simulationPayload.value = newValue
simulationPayload.state_objects![from].balance = newValue
sim = await sendSimulation(simulationPayload)
if (sim.simulation.status) return { sim, proposal: formattedProposal, latestBlock }

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

No branches or pull requests

1 participant