Skip to content

L1 Execution Cost is hardcoded #6

@gzeoneth

Description

@gzeoneth

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 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions