Skip to content

update deployer to support EIP-1559 #1504

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c9536d2
update deployer to support EIP-1559
dbeal-eth Sep 13, 2021
ca81f0a
fixes for the rest of gasPrice refs
dbeal-eth Sep 14, 2021
ec3d4a4
requested fixes
dbeal-eth Sep 14, 2021
868ecd5
Merge remote-tracking branch 'origin/develop' into deployer-eip1559
dbeal-eth Sep 15, 2021
92c56b3
try to fix issues with tests
dbeal-eth Sep 15, 2021
05c4d34
fix dangling getFeeData calls
dbeal-eth Sep 15, 2021
d4a69bf
fix tests for depot gas calculation
dbeal-eth Sep 15, 2021
013b43d
Merge branch 'develop' into deployer-eip1559
Sep 16, 2021
ee176c2
add tx type to explicitly define the fee type to use
dbeal-eth Sep 17, 2021
f247a41
fix test suites
dbeal-eth Sep 17, 2021
1d27944
Merge remote-tracking branch 'origin/develop' into deployer-eip1559
dbeal-eth Sep 20, 2021
00a70ac
syncing deployed directory from develop
dbeal-eth Sep 20, 2021
64b7fb2
Merge remote-tracking branch 'origin/develop' into deployer-eip1559
dbeal-eth Sep 22, 2021
ba135da
use optimism test commit environment variable at this point
dbeal-eth Sep 22, 2021
faaa7b6
small ci fixes
dbeal-eth Sep 22, 2021
75ed6b5
fix connect-bridge to work without gas options
dbeal-eth Sep 22, 2021
55871b9
Merge branch 'develop' into deployer-eip1559
Sep 23, 2021
a6b8f0d
Merge remote-tracking branch 'origin/develop' into deployer-eip1559
dbeal-eth Oct 12, 2021
9ba0973
Merge remote-tracking branch 'origin/develop' into deployer-eip1559
dbeal-eth Oct 12, 2021
dd7657d
update mixinGasOptions to be more confirmant
dbeal-eth Oct 14, 2021
a9bfa4c
fix minor things
dbeal-eth Oct 14, 2021
3120877
undo all circleci changes
dbeal-eth Oct 14, 2021
f212d6d
Merge branch 'develop' into deployer-eip1559
jjgonecrypto Oct 15, 2021
1a57aee
final cleanup
dbeal-eth Oct 15, 2021
a546d3f
Merge branch 'deployer-eip1559' of https://github.com/Synthetixio/syn…
dbeal-eth Oct 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
branches: [master, develop]
paths-ignore:
- node_modules
- '**/*.md'
- '**/*.txt'
- "**/*.md"
- "**/*.txt"
schedule:
- cron: '0 6 * * 3'
- cron: "0 6 * * 3"

jobs:
analyze:
Expand Down
6 changes: 0 additions & 6 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ const {
constants: { inflationStartTimestampInSecs, AST_FILENAME, AST_FOLDER, BUILD_FOLDER },
} = require('.');

const GAS_PRICE = 20e9; // 20 GWEI
const CACHE_FOLDER = 'cache';

module.exports = {
GAS_PRICE,
ovm: {
solcVersion: '0.5.16',
},
Expand Down Expand Up @@ -46,13 +44,9 @@ module.exports = {
defaultNetwork: 'hardhat',
networks: {
hardhat: {
gas: 12e6,
blockGasLimit: 12e6,
allowUnlimitedContractSize: true,
gasPrice: GAS_PRICE,
hardfork: 'london',
initialDate: new Date(inflationStartTimestampInSecs * 1000).toISOString(),
initialBaseFeePerGas: (1e9).toString(), // 1 GWEI
// Note: forking settings are injected at runtime by hardhat/tasks/task-node.js
},
localhost: {
Expand Down
30 changes: 6 additions & 24 deletions hardhat/tasks/task-interact.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,22 @@ task('interact', 'Interact with a deployed Synthetix instance from the command l
.addFlag('useFork', 'Use a local fork')
.addFlag('useOvm', 'Use an Optimism chain')
.addOptionalParam('targetNetwork', 'Target the instance deployed in this network', 'mainnet')
.addOptionalParam('gasPrice', 'Gas price to set when performing transfers', 0, types.int)
.addOptionalParam('gasLimit', 'Max gas to use when signing transactions', 8000000, types.int)
.addOptionalParam('privateKey', 'Private key to use to sign txs')
.addOptionalParam('providerUrl', 'The http provider to use for communicating with the blockchain')
.addOptionalParam('deploymentPath', 'Specify the path to the deployment data directory')
.addOptionalParam('blockTag', 'Specify the block tag to interact at, per ethers.js specification')
.setAction(async (taskArguments, hre) => {
const { useOvm, useFork, deploymentPath, targetNetwork } = taskArguments;
let { providerUrl, gasLimit, gasPrice, privateKey, blockTag } = taskArguments;
let { providerUrl, gasLimit, privateKey, blockTag } = taskArguments;
// ------------------
// Default values per network
// ------------------

const key = `${targetNetwork}${useOvm ? '-ovm' : ''}`;
const defaults = DEFAULTS[key];
providerUrl = providerUrl || defaults.providerUrl;
gasPrice = gasPrice || defaults.gasPrice;
if (useOvm) {
gasPrice = synthetix.constants.OVM_GAS_PRICE_GWEI;
gasLimit = undefined;
}
blockTag = blockTag || 'latest';
Expand Down Expand Up @@ -115,7 +112,6 @@ task('interact', 'Interact with a deployed Synthetix instance from the command l
useOvm,
providerUrl,
network: targetNetwork,
gasPrice,
deploymentFilePath,
wallet,
blockTag,
Expand Down Expand Up @@ -335,7 +331,6 @@ task('interact', 'Interact with a deployed Synthetix instance from the command l
// SEND TX
} else {
const overrides = {
gasPrice: ethers.utils.parseUnits(`${gasPrice}`, 'gwei'),
gasLimit,
};

Expand Down Expand Up @@ -440,41 +435,28 @@ task('interact', 'Interact with a deployed Synthetix instance from the command l
});

const DEFAULTS = {
mainnet: {
gasPrice: 200,
},
mainnet: {},
'mainnet-ovm': {
providerUrl: 'https://mainnet.optimism.io',
gasPrice: 0,
},
kovan: {
gasPrice: 1,
},
kovan: {},
'kovan-ovm': {
providerUrl: 'https://kovan.optimism.io',
gasPrice: 0,
},
local: {
gasPrice: 1,
providerUrl: 'http://localhost:9545',
},
'local-ovm': {
providerUrl: 'http://localhost:8545',
gasPrice: 0,
},
rinkeby: {
gasPrice: 1,
},
ropsten: {
gasPrice: 1,
},
rinkeby: {},
ropsten: {},
};

async function _printHeader({
useOvm,
providerUrl,
network,
gasPrice,
deploymentFilePath,
wallet,
blockTag,
Expand All @@ -491,7 +473,7 @@ async function _printHeader({
)
);
console.log(gray(`> Network: ${network}`));
console.log(gray(`> Gas price: ${gasPrice}`));
console.log(gray(`> Gas price: provider default`));
console.log(gray(`> OVM: ${useOvm}`));
console.log(gray(`> Block tag: ${blockTag}`));
console.log(yellow(`> Target deployment: ${path.dirname(deploymentFilePath)}`));
Expand Down
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ const constants = {
ZERO_ADDRESS: '0x' + '0'.repeat(40),
ZERO_BYTES32: '0x' + '0'.repeat(64),

OVM_GAS_PRICE_GWEI: '0.015',

inflationStartTimestampInSecs: 1551830400, // 2019-03-06T00:00:00Z
};

Expand Down
Loading