-
Notifications
You must be signed in to change notification settings - Fork 75
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
chore: remove ETH caps #362
Open
DefiCake
wants to merge
6
commits into
v1.0
Choose a base branch
from
deploy/update-caps
base: v1.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a6c0696
chore: add deploy scripts for deposit caps removal
DefiCake faca92f
feat: update deploy scripts
DefiCake 28b8413
chore: add deployment artifacts
DefiCake dc40f9a
chore: add multisig proposal artifact
DefiCake 0f4922e
chore: add changeset
DefiCake 512ab90
fix: add edge cases to verifyDeployment script
DefiCake File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@fuel-bridge/solidity-contracts': patch | ||
--- | ||
|
||
Removed mainnet deposit caps |
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
53 changes: 53 additions & 0 deletions
53
packages/solidity-contracts/deploy/mainnet/020.portal_upgrade.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,53 @@ | ||
import { password } from '@inquirer/prompts'; | ||
import type { TransactionResponse } from 'ethers'; | ||
import { MaxUint256 } from 'ethers'; | ||
import type { HardhatRuntimeEnvironment } from 'hardhat/types'; | ||
import type { DeployFunction } from 'hardhat-deploy/dist/types'; | ||
|
||
import { FuelMessagePortalV3__factory as FuelMessagePortalV3 } from '../../typechain'; | ||
|
||
const RATE_LIMIT_DURATION = 3600 * 24 * 7; | ||
|
||
const ETH_DEPOSIT_CAP = MaxUint256; | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { | ||
ethers, | ||
upgrades: { prepareUpgrade }, | ||
deployments: { get, save }, | ||
} = hre; | ||
|
||
const privateKey = await password({ message: 'Enter private key' }); | ||
const deployer = new ethers.Wallet(privateKey, ethers.provider); | ||
|
||
const { address } = await get('FuelMessagePortal'); | ||
|
||
const constructorArgs = [ETH_DEPOSIT_CAP.toString(), RATE_LIMIT_DURATION]; | ||
|
||
const tx = (await prepareUpgrade(address, new FuelMessagePortalV3(deployer), { | ||
constructorArgs, | ||
getTxResponse: true, | ||
})) as TransactionResponse; | ||
const receipt = await tx.wait(); | ||
|
||
const implementation = receipt?.contractAddress; | ||
|
||
if (!implementation) { | ||
throw new Error('No contract in receipt'); | ||
} | ||
|
||
console.log('Proposed FuelMessagePortal upgrade to', implementation); | ||
await save('FuelMessagePortal', { | ||
address, | ||
abi: [...FuelMessagePortalV3.abi], | ||
implementation, | ||
transactionHash: tx.hash, | ||
linkedData: { factory: 'FuelMessagePortalV3', constructorArgs }, | ||
}); | ||
|
||
return true; | ||
}; | ||
|
||
func.tags = ['20_upgrade_portal']; | ||
func.id = '20_upgrade_portal'; | ||
export default func; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - we can fetch the
RATE_LIMIT_DURATION
from theconstants
file