thehubbleproject / hubble-contracts

Hubble optimistic rollup
https://thehubbleproject.github.io/docs/
MIT License
133 stars 28 forks source link

Not works in other testnet because of COST_ESTIMATOR_ADDRESS #697

Open amit-supraoracles opened 1 year ago

amit-supraoracles commented 1 year ago

Hi Team !! This contract is deployed in Goerli testnet : 0x079d8077C465BD0BF0FC502aD2B846757e415661 hence only woks in that testnet.

To make it work in other network I had to hardcode the precompileGasCost.

Please share the solidity contract that was deployed and used here in BLS.sol

I thought this is BNPairingPrecompileCostEstimator.sol But its a different one. (because the deployment cost and bytecode is different).

jacque006 commented 1 year ago

Hey @amit-supraoracles , apologies for missing this. We may have done a test deploy on Goerli in the past, but you would need to deploy ALL the contracts yourself if you want to use them on a testnet. Because BNPairingPrecompileCostEstimator.sol is deployed via CREATE2, the address can change based on what account is deploying the contracts. If you are not using the same create2 deployer, you would need to update the precompile cost estimator address in BLS.sol to one you deployed.

For this project, I don't think we separated out the precompile deploy but you should be able to write a script to just deploy that, then use the address in BLS.sol.