-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upgrade fuel erc20 gateway (#326)
Closes #325
- Loading branch information
Showing
5 changed files
with
100 additions
and
4 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 | ||
--- | ||
|
||
Updated testnet deployment artifacts |
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
33 changes: 33 additions & 0 deletions
33
packages/solidity-contracts/deploy/testnet/018.erc20_gateway_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,33 @@ | ||
import type { HardhatRuntimeEnvironment } from 'hardhat/types'; | ||
import type { DeployFunction } from 'hardhat-deploy/dist/types'; | ||
|
||
import { FuelERC20GatewayV4__factory as FuelERC20Gateway } from '../../typechain'; | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { | ||
ethers, | ||
upgrades: { upgradeProxy, erc1967 }, | ||
deployments: { get, save }, | ||
} = hre; | ||
const [deployer] = await ethers.getSigners(); | ||
|
||
const { address } = await get('FuelERC20GatewayV4'); | ||
|
||
const contract = await upgradeProxy(address, new FuelERC20Gateway(deployer)); | ||
await contract.waitForDeployment(); | ||
|
||
const implementation = await erc1967.getImplementationAddress(address); | ||
|
||
console.log('Upgraded FuelERC20GatewayV4 to', implementation); | ||
await save('FuelERC20GatewayV4', { | ||
address, | ||
abi: [...FuelERC20Gateway.abi], | ||
implementation, | ||
}); | ||
|
||
return true; | ||
}; | ||
|
||
func.tags = ['gateway_upgrade']; | ||
func.id = 'gateway_upgrade'; | ||
export default func; |
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