-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gas mechanics phase 1 implementation. (#1471)
* Added a new message topic for auto relaying. * WIP. * some stuff. * Working deposits and transfers tree. * Adding missing files. * Progress dump. * removed TransferTree. * Removed transfer tree from proto. * Revert "Removed transfer tree from proto." This reverts commit c85dba1. * Revert "removed TransferTree." This reverts commit ecc84bf. * Adding back removed line. * Working state. Gas not payed due to creator differences. * Working version. * Testing for gas mechanics in the sim tests. * Fix for tests. * Fixed linter issues. * Ran gofumpt. * Fixed more linter issues. * Linter fix. * Fixed in mem test. * Fixed race condition for gas price oracle. * Fix crash. * Changes to when no base fee is applied. * Update for chain validation. * Fix for build.' * Added gas price estimation return. * Seemingly fully working version. * Fixed compilation bug. * Ran gofumpt. * Fix linter issue.' * Resolved PR comments. * Ran gofumpt. * Added gas limit config. * Generate abi bindings. * Version that deploys. * Working version with baseFee == 1 * Adding forgotten file. * Fix for toml test. * Fixed immediate batch block bug. * Added testing contract. * Added default address for gas payments. * Fixes for PR review. * Ran gofumpt. * Stopped test that shouldn't run in GH. * Modified gas limit. * Linter fixes. * Gofumpt. --------- Co-authored-by: StefanIliev545 <[email protected]> Co-authored-by: StefanIliev545 <[email protected]>
- Loading branch information
1 parent
61a5921
commit c4864da
Showing
68 changed files
with
1,199 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
contracts/deployment_scripts/testing/001_gas_testing_deployment.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import {HardhatRuntimeEnvironment} from 'hardhat/types'; | ||
import {DeployFunction} from 'hardhat-deploy/types'; | ||
import { Receipt } from 'hardhat-deploy/dist/types'; | ||
|
||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const l2Network = hre; | ||
const {deployer} = await hre.getNamedAccounts(); | ||
|
||
const gcb = await l2Network.deployments.deploy("GasConsumerBalance", { | ||
from: deployer, | ||
log: true | ||
}) | ||
|
||
|
||
const gasConsumerBalance = await hre.ethers.getContractAt("GasConsumerBalance", gcb.address) | ||
const gasEstimation = await gasConsumerBalance.estimateGas.get_balance({from: deployer}); | ||
|
||
await hre.deployments.execute("GasConsumerBalance", { | ||
from: deployer, | ||
gasLimit: gasEstimation.div(2), | ||
log: true | ||
}, "get_balance"); | ||
}; | ||
|
||
|
||
export default func; | ||
func.tags = ['GasDebug']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.