Skip to content

Commit

Permalink
[REG-1395] master merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Armen-Arakelian committed Sep 9, 2024
2 parents bd13a2a + f9fe461 commit f6a33e5
Show file tree
Hide file tree
Showing 24 changed files with 795 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/workflows/contracts_size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: hardhat-contract-sizer-output
include-hidden-files: true
path: cache/.hardhat_contract_sizer_output.json

pr-contracts-size:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.9.28

- Added `L1GasPriceOracle` ABI and addresses for base

## v0.9.27

- Deploy uns to base chain
Expand Down
1 change: 1 addition & 0 deletions artifacts/abi/L1GasPriceOracle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"stateMutability":"nonpayable","type":"constructor","inputs":[]},{"stateMutability":"view","type":"function","inputs":[],"name":"DECIMALS","outputs":[{"name":"","internalType":"uint256","type":"uint256"}]},{"stateMutability":"view","type":"function","inputs":[],"name":"baseFee","outputs":[{"name":"","internalType":"uint256","type":"uint256"}]},{"stateMutability":"pure","type":"function","inputs":[],"name":"decimals","outputs":[{"name":"","internalType":"uint256","type":"uint256"}]},{"stateMutability":"view","type":"function","inputs":[],"name":"gasPrice","outputs":[{"name":"","internalType":"uint256","type":"uint256"}]},{"stateMutability":"view","type":"function","inputs":[{"name":"_data","internalType":"bytes","type":"bytes"}],"name":"getL1Fee","outputs":[{"name":"","internalType":"uint256","type":"uint256"}]},{"stateMutability":"view","type":"function","inputs":[{"name":"_data","internalType":"bytes","type":"bytes"}],"name":"getL1GasUsed","outputs":[{"name":"","internalType":"uint256","type":"uint256"}]},{"stateMutability":"view","type":"function","inputs":[],"name":"l1BaseFee","outputs":[{"name":"","internalType":"uint256","type":"uint256"}]},{"stateMutability":"view","type":"function","inputs":[],"name":"overhead","outputs":[{"name":"","internalType":"uint256","type":"uint256"}]},{"stateMutability":"view","type":"function","inputs":[],"name":"scalar","outputs":[{"name":"","internalType":"uint256","type":"uint256"}]},{"stateMutability":"view","type":"function","inputs":[],"name":"version","outputs":[{"name":"","internalType":"string","type":"string"}]}]
2 changes: 1 addition & 1 deletion dist/hardhat.config.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions dist/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const fs_1 = __importDefault(require("fs"));
const task_names_1 = require("hardhat/builtin-tasks/task-names");
const config_1 = require("hardhat/config");
const lodash_1 = require("lodash");
const contracts_ts_1 = require("@eth-optimism/contracts-ts");
require("@typechain/hardhat");
require("@nomicfoundation/hardhat-ethers");
require("@nomicfoundation/hardhat-verify");
Expand Down Expand Up @@ -48,6 +49,15 @@ const argv = (0, yargs_1.default)().env('').boolean('enableGasReport').boolean('
}
}));
require("hardhat-abi-exporter");
(0, config_1.task)(task_names_1.TASK_COMPILE, 'hook after abi exporting to manually add abis not included as contract', (_, hre, runSuper) => __awaiter(void 0, void 0, void 0, function* () {
yield runSuper();
const { root, flatArtifacts } = hre.config.paths;
const outputDir = path_1.default.resolve(root, flatArtifacts, 'abi');
const abis = [{ contract: 'L1GasPriceOracle', abi: contracts_ts_1.gasPriceOracleABI }];
for (const { contract, abi } of abis) {
fs_1.default.writeFileSync(path_1.default.join(outputDir, `${contract}.json`), JSON.stringify(abi));
}
}));
const settings = {
optimizer: {
enabled: true,
Expand Down
1 change: 1 addition & 0 deletions dist/sandbox/anvil-server.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export declare type AnvilServerOptions = {
chainId: number;
hardfork: string;
gasPrice: number;
baseFeePerGas: number;
gasLimit: number;
mnemonic: string;
hdPath: string;
Expand Down
2 changes: 1 addition & 1 deletion dist/sandbox/anvil-server.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/sandbox/anvil-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const ANVIL_ARGUMENTS_MAP = {
chainId: '--chain-id',
hardfork: '--hardfork',
gasPrice: '--gas-price',
baseFeePerGas: '--block-base-fee-per-gas',
gasLimit: '--gas-limit',
mnemonic: '--mnemonic',
hdPath: '--derivation-path',
Expand Down
1 change: 1 addition & 0 deletions dist/sandbox/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export declare type SandboxNetworkOptions = {
chainId: number;
hardfork: string;
gasPrice: number;
baseFeePerGas: number;
gasLimit: number;
mnemonic: string;
hdPath: string;
Expand Down
2 changes: 1 addition & 1 deletion dist/sandbox/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/sandbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const DEFAULT_SERVER_CONFIG = {
hostIpAddress: '127.0.0.1',
port: 7545,
gasPrice: 20000000000,
baseFeePerGas: 10000000,
gasLimit: 6721975,
defaultBalanceEther: 1000,
totalAccounts: 10,
Expand Down
2 changes: 1 addition & 1 deletion dist/sandbox/state.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ export declare enum UnsContractName {
ZilliqaRecover = "ZilliqaRecover",
Seaport = "Seaport",
SeaportProxyBuyer = "SeaportProxyBuyer",
USDC = "USDC"
USDC = "USDC",
L1GasPriceOracle = "L1GasPriceOracle"
}
export declare enum EnsContractName {
ENSRegistry = "ENSRegistry",
Expand Down
2 changes: 1 addition & 1 deletion dist/src/types.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ var UnsContractName;
UnsContractName["Seaport"] = "Seaport";
UnsContractName["SeaportProxyBuyer"] = "SeaportProxyBuyer";
UnsContractName["USDC"] = "USDC";
UnsContractName["L1GasPriceOracle"] = "L1GasPriceOracle";
})(UnsContractName = exports.UnsContractName || (exports.UnsContractName = {}));
var EnsContractName;
(function (EnsContractName) {
Expand Down
37 changes: 36 additions & 1 deletion dist/uns-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.9",
"version": "0.9.10",
"networks": {
"1": {
"contracts": {
Expand Down Expand Up @@ -132,6 +132,11 @@
"USDC": {
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"deploymentBlock": "0x0"
},
"L1GasPriceOracle": {
"address": "0x0000000000000000000000000000000000000000",
"legacyAddresses": [],
"deploymentBlock": "0x0"
}
}
},
Expand Down Expand Up @@ -260,6 +265,11 @@
"USDC": {
"address": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
"deploymentBlock": "0x0"
},
"L1GasPriceOracle": {
"address": "0x0000000000000000000000000000000000000000",
"legacyAddresses": [],
"deploymentBlock": "0x0"
}
}
},
Expand Down Expand Up @@ -383,6 +393,11 @@
"USDC": {
"address": "0xDa9E1b3e395bFb0A45F03C7F615146B9d896c959",
"deploymentBlock": "0x20"
},
"L1GasPriceOracle": {
"address": "0x0000000000000000000000000000000000000000",
"legacyAddresses": [],
"deploymentBlock": "0x0"
}
}
},
Expand Down Expand Up @@ -507,6 +522,11 @@
"implementation": "0x99d55A02f5d9c76d31C6Ff57cc36A7862D5E1029",
"forwarder": "0x19d40e8b3338669BfC40747F5D5bDb8a14422Fdb",
"legacyAddresses": []
},
"L1GasPriceOracle": {
"address": "0x420000000000000000000000000000000000000F",
"legacyAddresses": [],
"deploymentBlock": "0x0"
}
}
},
Expand Down Expand Up @@ -630,6 +650,11 @@
"USDC": {
"address": "0x6694CfD96d7fD80041062895B49f768081CA96f2",
"deploymentBlock": "0x0"
},
"L1GasPriceOracle": {
"address": "0x0000000000000000000000000000000000000000",
"legacyAddresses": [],
"deploymentBlock": "0x0"
}
}
},
Expand Down Expand Up @@ -753,6 +778,11 @@
"USDC": {
"address": "0x5dEaC602762362FE5f135FA5904351916053cF70",
"deploymentBlock": "0x0"
},
"L1GasPriceOracle": {
"address": "0x420000000000000000000000000000000000000F",
"legacyAddresses": [],
"deploymentBlock": "0x0"
}
}
},
Expand Down Expand Up @@ -881,6 +911,11 @@
"USDC": {
"address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
"deploymentBlock": "0x0"
},
"L1GasPriceOracle": {
"address": "0x0000000000000000000000000000000000000000",
"legacyAddresses": [],
"deploymentBlock": "0x0"
}
}
}
Expand Down
18 changes: 18 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { TASK_COMPILE } from 'hardhat/builtin-tasks/task-names';
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { task } from 'hardhat/config';
import { pickBy } from 'lodash';
import { gasPriceOracleABI } from '@eth-optimism/contracts-ts';

type MintersMap = Record<string, string[]>;

Expand Down Expand Up @@ -86,6 +87,23 @@ task(
// NOTE: Order matters
import 'hardhat-abi-exporter';

task(
TASK_COMPILE,
'hook after abi exporting to manually add abis not included as contract',
async (_, hre: HardhatRuntimeEnvironment, runSuper) => {
await runSuper();

const { root, flatArtifacts } = hre.config.paths;
const outputDir = path.resolve(root, flatArtifacts, 'abi');

const abis = [{ contract: 'L1GasPriceOracle', abi: gasPriceOracleABI }];

for (const { contract, abi } of abis) {
fs.writeFileSync(path.join(outputDir, `${contract}.json`), JSON.stringify(abi));
}
},
);

const settings = {
optimizer: {
enabled: true,
Expand Down
Loading

0 comments on commit f6a33e5

Please sign in to comment.