-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into deficake/181-merkle-utils-port
- Loading branch information
Showing
20 changed files
with
1,322 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@fuel-bridge/solidity-contracts': patch | ||
--- | ||
|
||
Update testnet and devnet contracts |
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
41 changes: 41 additions & 0 deletions
41
packages/solidity-contracts/deploy/devnet/010.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,41 @@ | ||
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 func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { | ||
ethers, | ||
upgrades: { upgradeProxy, erc1967 }, | ||
deployments: { get, save }, | ||
} = hre; | ||
const [deployer] = await ethers.getSigners(); | ||
|
||
const fuelMessagePortal = await get('FuelMessagePortal'); | ||
|
||
const contract = await upgradeProxy( | ||
fuelMessagePortal.address, | ||
new FuelMessagePortalV3(deployer), | ||
{ | ||
unsafeAllow: ['constructor'], | ||
constructorArgs: [MaxUint256], | ||
} | ||
); | ||
const address = await contract.getAddress(); | ||
|
||
const implementation = await erc1967.getImplementationAddress(address); | ||
|
||
console.log('Upgraded FuelMessagePortal at', address); | ||
await save('FuelMessagePortal', { | ||
address, | ||
abi: [...FuelMessagePortalV3.abi], | ||
implementation, | ||
}); | ||
|
||
return true; | ||
}; | ||
|
||
func.tags = ['portal_upgrade']; | ||
func.id = 'portal_upgrade'; | ||
export default func; |
39 changes: 39 additions & 0 deletions
39
packages/solidity-contracts/deploy/devnet/011.state_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,39 @@ | ||
import type { HardhatRuntimeEnvironment } from 'hardhat/types'; | ||
import type { DeployFunction } from 'hardhat-deploy/dist/types'; | ||
|
||
import { FuelChainState__factory as FuelChainState } from '../../typechain'; | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { | ||
ethers, | ||
upgrades: { upgradeProxy, erc1967 }, | ||
deployments: { get, save }, | ||
} = hre; | ||
const [deployer] = await ethers.getSigners(); | ||
|
||
const fuelChainState = await get('FuelChainState'); | ||
|
||
const contract = await upgradeProxy( | ||
fuelChainState.address, | ||
new FuelChainState(deployer), | ||
{ | ||
unsafeAllow: ['constructor'], | ||
} | ||
); | ||
const address = await contract.getAddress(); | ||
|
||
const implementation = await erc1967.getImplementationAddress(address); | ||
|
||
console.log('Upgraded FuelChainState at', address); | ||
await save('FuelChainState', { | ||
address, | ||
abi: [...FuelChainState.abi], | ||
implementation, | ||
}); | ||
|
||
return true; | ||
}; | ||
|
||
func.tags = ['state_upgrade']; | ||
func.id = 'state_upgrade'; | ||
export default func; |
Oops, something went wrong.