Skip to content

Commit f2a4838

Browse files
authoredApr 5, 2024··
Deployment of new devnet (#157)
1 parent 69d4039 commit f2a4838

16 files changed

+949
-4
lines changed
 

‎.changeset/clean-houses-think.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@fuel-bridge/solidity-contracts': patch
3+
---
4+
5+
Deployment of new devnet

‎packages/solidity-contracts/.openzeppelin/sepolia.json

+20
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,26 @@
8080
"address": "0x180506B8828094862d94C121307a21ad4Ab8c6DE",
8181
"txHash": "0x425bab23103fadbd7a40eeb6268cb1e26c13a31356f9a112885c27a85b5c41ab",
8282
"kind": "uups"
83+
},
84+
{
85+
"address": "0xE4685bE2cF255dd5E9acEb37a86389e5EE7346a8",
86+
"txHash": "0x84e2c085977eeeb4019d3a57a1066047603822c4a5e0eeb9bfdd5510cf65a386",
87+
"kind": "uups"
88+
},
89+
{
90+
"address": "0x0880932521f0E3a90d56bC96fD49c0c98CFCf4A7",
91+
"txHash": "0x542c3deaee466fce122de5eb44632e9228ca893c01e0b81996e9124b232e513b",
92+
"kind": "uups"
93+
},
94+
{
95+
"address": "0x01eb5b6122E1f65eaF4566093C2431aa0c0eaCd5",
96+
"txHash": "0xfab802a21606f268e7479cd0f0b58b3eb474436b522a55aa7ee0a0df87f8db8e",
97+
"kind": "uups"
98+
},
99+
{
100+
"address": "0x83114982BDe057a8907F8a081225C7d301898aDd",
101+
"txHash": "0x94d778dc8284824f38d3aacd8172ab9a1880d686365ae3e26e8425e16d858184",
102+
"kind": "uups"
83103
}
84104
],
85105
"impls": {

‎packages/solidity-contracts/DEPLOYMENTS.MD

+8-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ FuelERC20GatewayV2 at 0x749E27d070E2F4a3D6CED522a0D4BDCB37fA95ba
1818
FuelERC721GatewayV2 at 0xc17a3694B01238308Fd1140E2F13928ff6564f84
1919
```
2020

21-
22-
23-
24-
21+
22+
## Devnet
23+
24+
```
25+
FuelChainState at 0x0880932521f0E3a90d56bC96fD49c0c98CFCf4A7
26+
FuelMessagePortal at 0x01eb5b6122E1f65eaF4566093C2431aa0c0eaCd5
27+
FuelERC20GatewayV2 at 0x83114982BDe057a8907F8a081225C7d301898aDd
28+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import type { HardhatRuntimeEnvironment } from 'hardhat/types';
2+
import type { DeployFunction } from 'hardhat-deploy/dist/types';
3+
4+
import { FuelChainState__factory as FuelChainState } from '../../typechain';
5+
6+
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
7+
const {
8+
ethers,
9+
upgrades: { deployProxy, erc1967 },
10+
deployments: { save },
11+
} = hre;
12+
const [deployer] = await ethers.getSigners();
13+
14+
const contract = await deployProxy(new FuelChainState(deployer), [], {
15+
initializer: 'initialize',
16+
});
17+
await contract.waitForDeployment();
18+
const address = await contract.getAddress();
19+
const implementation = await erc1967.getImplementationAddress(address);
20+
21+
console.log('Deployed FuelChainState at', address);
22+
await save('FuelChainState', {
23+
address,
24+
abi: [],
25+
implementation,
26+
});
27+
28+
return true;
29+
};
30+
31+
func.tags = ['state', 'chain-state', 'chain_state', 'FuelChainState'];
32+
func.id = 'chain_state';
33+
export default func;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { MaxUint256 } from 'ethers';
2+
import type { HardhatRuntimeEnvironment } from 'hardhat/types';
3+
import type { DeployFunction } from 'hardhat-deploy/dist/types';
4+
5+
import { FuelMessagePortalV3__factory as FuelMessagePortal } from '../../typechain';
6+
7+
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
8+
const {
9+
ethers,
10+
upgrades: { deployProxy, erc1967 },
11+
deployments: { get, save },
12+
} = hre;
13+
const [deployer] = await ethers.getSigners();
14+
15+
const { address: fuelChainState } = await get('FuelChainState');
16+
17+
const contract = await deployProxy(
18+
new FuelMessagePortal(deployer),
19+
[fuelChainState],
20+
{
21+
initializer: 'initialize',
22+
constructorArgs: [MaxUint256],
23+
}
24+
);
25+
await contract.waitForDeployment();
26+
27+
const address = await contract.getAddress();
28+
const implementation = await erc1967.getImplementationAddress(address);
29+
30+
console.log('Deployed FuelMessagePortal at', address);
31+
await save('FuelMessagePortal', {
32+
address,
33+
abi: [],
34+
implementation,
35+
});
36+
37+
return true;
38+
};
39+
40+
func.tags = ['portal', 'message_portal', 'FuelMessagePortal'];
41+
func.id = 'fuel_message_portal';
42+
export default func;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import type { HardhatRuntimeEnvironment } from 'hardhat/types';
2+
import type { DeployFunction } from 'hardhat-deploy/dist/types';
3+
4+
import { FuelERC20GatewayV2__factory as FuelERC20GatewayV2 } from '../../typechain';
5+
6+
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
7+
const {
8+
ethers,
9+
upgrades: { deployProxy, erc1967 },
10+
deployments: { get, save },
11+
} = hre;
12+
const [deployer] = await ethers.getSigners();
13+
14+
const fuelMessagePortal = await get('FuelMessagePortal');
15+
16+
const contract = await deployProxy(
17+
new FuelERC20GatewayV2(deployer),
18+
[fuelMessagePortal.address],
19+
{
20+
initializer: 'initialize',
21+
}
22+
);
23+
await contract.waitForDeployment();
24+
25+
const address = await contract.getAddress();
26+
const implementation = await erc1967.getImplementationAddress(address);
27+
28+
console.log('Deployed FuelERC20GatewayV2 at', address);
29+
await save('FuelERC20GatewayV2', {
30+
address,
31+
abi: [],
32+
implementation,
33+
});
34+
35+
return true;
36+
};
37+
38+
func.tags = ['erc20', 'erc20_gateway', 'FuelERC20GatewayV2'];
39+
func.id = 'fuel_erc20_gateway_v2';
40+
export default func;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import type { HardhatRuntimeEnvironment } from 'hardhat/types';
2+
import type { DeployFunction } from 'hardhat-deploy/dist/types';
3+
4+
/**
5+
* @description Deployed for testing purposes
6+
*/
7+
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
8+
const {
9+
ethers,
10+
deployments: { deploy },
11+
} = hre;
12+
13+
const [deployer] = await ethers.getSigners();
14+
15+
await deploy('Token', { from: deployer.address, log: true });
16+
17+
return true;
18+
};
19+
20+
func.tags = ['token'];
21+
func.id = 'token';
22+
export default func;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import type { HardhatRuntimeEnvironment } from 'hardhat/types';
2+
import type { DeployFunction } from 'hardhat-deploy/dist/types';
3+
4+
import { FuelChainState__factory } from '../../typechain';
5+
6+
const COMMITTER_ADDRESS = '0xd12663Fc8Dad968946EF7c715742B5f3814b618a';
7+
8+
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
9+
const { ethers, deployments } = hre;
10+
const [deployer] = await ethers.getSigners();
11+
12+
const { address } = await deployments.get('FuelChainState');
13+
14+
const fuelChainState = FuelChainState__factory.connect(address, deployer);
15+
const COMMITTER_ROLE = await fuelChainState.COMMITTER_ROLE();
16+
17+
await fuelChainState
18+
.grantRole(COMMITTER_ROLE, COMMITTER_ADDRESS)
19+
.then((tx) => tx.wait());
20+
21+
console.log('Granted role COMMITTER_ROLE to', COMMITTER_ADDRESS);
22+
23+
return true;
24+
};
25+
26+
func.tags = ['portal', 'message_portal', 'FuelMessagePortal'];
27+
func.id = 'fuel_message_portal';
28+
export default func;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
11155111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"chain_state": 1712146933,
3+
"fuel_message_portal": 1712147077,
4+
"fuel_erc20_gateway_v2": 1712147101,
5+
"token": 1712147115
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"address": "0x0880932521f0E3a90d56bC96fD49c0c98CFCf4A7",
3+
"abi": [],
4+
"numDeployments": 1,
5+
"implementation": "0x1eF82F91979B8bdbaF700801E66A8fA260e7CA01"
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"address": "0x83114982BDe057a8907F8a081225C7d301898aDd",
3+
"abi": [],
4+
"numDeployments": 1,
5+
"implementation": "0x04dAEee4C4253f861eAe84503d4a518b3475b696"
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"address": "0x01eb5b6122E1f65eaF4566093C2431aa0c0eaCd5",
3+
"abi": [],
4+
"numDeployments": 1,
5+
"implementation": "0x800567f454c125A9Dd54D53c3a5A0277a601bf9a"
6+
}

0 commit comments

Comments
 (0)
Please sign in to comment.