Skip to content

Commit

Permalink
chore: upgrade fuel erc20 gateway (#326)
Browse files Browse the repository at this point in the history
Closes #325
  • Loading branch information
DefiCake authored Oct 10, 2024
1 parent a54fdcf commit 1f38f7c
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/sweet-chicken-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fuel-bridge/solidity-contracts': patch
---

Updated testnet deployment artifacts
1 change: 1 addition & 0 deletions packages/solidity-contracts/.openzeppelin/sepolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@
"namespaces": {}
},
"allAddresses": [
"0xEBFB69C26067777b262Ab5Da74A47e44bfc78EA4",
"0xf96DD2dA09A67c37CE79671923af1999b3553414",
"0x757F667dd94626677a01829b86675FD53988eFA3",
"0x1D81f89e994fed1b00cE765771535B31B67e3AB9"
Expand Down
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;
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"redeploy_register_committer": 1723733653,
"portal_upgrade_2": 1724078330,
"portal_set_chain_state": 1724078476,
"gateway_redeploy": 1725380413,
"set_asset_issuer_redeploy": 1725380833
"gateway_redeploy": 1725380413,
"set_asset_issuer_redeploy": 1725380833,
"gateway_upgrade": 1727974351
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,25 @@
"name": "Paused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "tokenAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "status",
"type": "bool"
}
],
"name": "RateLimitStatusUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
Expand Down Expand Up @@ -643,6 +662,25 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "rateLimitStatus",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
Expand Down Expand Up @@ -811,6 +849,24 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_token",
"type": "address"
},
{
"internalType": "bool",
"name": "_rateLimitStatus",
"type": "bool"
}
],
"name": "updateRateLimitStatus",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
Expand Down Expand Up @@ -856,6 +912,6 @@
"type": "function"
}
],
"numDeployments": 1,
"implementation": "0x5F9eAEB3b7ec396F01617e9BAd787D0A6f93B7a3"
"numDeployments": 2,
"implementation": "0xEBFB69C26067777b262Ab5Da74A47e44bfc78EA4"
}

0 comments on commit 1f38f7c

Please sign in to comment.