Build the governance voting on Optimism

I am planning to deploy governance voting on Optimism.

The team has already been researching deployments on zkSync. Still, there are good reasons to use Optimism for governance voting: it builds fairness into governance voting by using a network with very low gas fees. Also, the governance voting mechanism is quite simple, and I think it’s a good way to test our deployment for Optimism.

I’ve pushed the WIP to the optimism branch, but the tests fail, and so is the EVM test, not the OVM (Optimism VM). The cause may be in Hardhat. I have not been able to get the time needed to dig deeper into that error this week. The tests I have tried are as follows.

How to test with EVM:

git clone git@github.com:dev-protocol/vote-governance.git
cd vote-governance
git checkout optimism
yarn
yarn test:contracts:evm

How to test with OVM:

# Terminal window 1
git clone git@github.com:ethereum-optimism/optimism.git
cd optimism
yarn build
cd ops
export COMPOSE_DOCKER_CLI_BUILD=1
export DOCKER_BUILDKIT=1
docker-compose build
# Terminal window 2
git clone git@github.com:dev-protocol/vote-governance.git
cd vote-governance
git checkout optimism
yarn
yarn test:contracts:ovm

I don’t know if the problem is in the way I test with EVM or in the test code. Also, the docker-compose build for testing with OVM took too long, and I had to stop testing; I think it’s important to pass the EVM tests before OVM.

@akira_taniguchi Do you have any insights?

1 Like

I need to study Optimism.

1 Like

I found the simulator: https://optimism.io/gas-comparison
This simulator calculates a gas fee on Optimism from an L1 transaction.

When I tried to calculate with this vote transaction, it was calculated as 3,797 wei. L1 was 55,647 wei.

I am interested in how much this gas fee will be in the case of zkSync :thinking: