Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

feat: update to beta-5 #198

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1b5769e
feat: run node l1-chain and fuel-core
LuizAsFight Nov 29, 2023
549f889
chore
LuizAsFight Dec 1, 2023
57685ad
feat: update to eth
LuizAsFight Dec 4, 2023
1a1739d
fix: upgrade to WIP pr fuel-brige (beta-5)
LuizAsFight Dec 5, 2023
590eb68
fix: use ts sdk next versions
LuizAsFight Dec 8, 2023
dd6e9e2
fix: use correct wallet / bridge
LuizAsFight Dec 15, 2023
45485d6
fix: use new PR from ts-SDK
LuizAsFight Dec 18, 2023
9bc748a
Merge branch 'main' of github.com:FuelLabs/fuels-portal into lf/feat/…
LuizAsFight Dec 18, 2023
36b5c35
chore: update dependency
LuizAsFight Dec 19, 2023
53da5d1
chore: use sdk next
LuizAsFight Dec 20, 2023
bca4bd4
feat: beta-5
LuizAsFight Jan 10, 2024
0395473
fix: infra from fuel-bridge + new env files
LuizAsFight Jan 11, 2024
55abe4e
fix: use right fuel token
LuizAsFight Jan 15, 2024
b264f4b
fix: use right evn on prod
LuizAsFight Jan 15, 2024
3a645b2
fix: use new fuel-ui
LuizAsFight Jan 15, 2024
2da606b
chore
LuizAsFight Jan 16, 2024
347f012
fix: version wallet
LuizAsFight Jan 16, 2024
47012f9
fix: wallet version
LuizAsFight Jan 16, 2024
6333092
fix: lockfile
LuizAsFight Jan 16, 2024
b88323f
fiz: walelt version
LuizAsFight Jan 16, 2024
0be6aff
Merge branch 'main' of github.com:FuelLabs/fuels-portal into lf/feat/…
LuizAsFight Jan 17, 2024
e97127b
fix: node versions
LuizAsFight Jan 17, 2024
0fd9412
fix: dockerfile
LuizAsFight Jan 17, 2024
a5238cd
fix: wallet version e2e
LuizAsFight Jan 17, 2024
e8975cc
feat: versions
LuizAsFight Jan 18, 2024
2c1579c
feat: add debug mode to fuel-core
LuizAsFight Jan 18, 2024
377bb46
fix: error checking
LuizAsFight Jan 18, 2024
fd7e094
fix: wallet version
LuizAsFight Jan 19, 2024
3ea4d3c
Merge branch 'main' of github.com:FuelLabs/fuels-portal into lf/feat/…
LuizAsFight Jan 19, 2024
286c23c
chore: update fuel-bridge version
LuizAsFight Jan 22, 2024
f3ef7a1
Merge branch 'main' of github.com:FuelLabs/fuels-portal into lf/feat/…
LuizAsFight Jan 23, 2024
406d697
Merge branch 'beta-5' into lf/feat/beta-5
luizstacio Jan 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.14.1
18.18.0
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"prettier.prettierPath": "./node_modules/prettier",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"[sway]": {
"editor.defaultFormatter": "FuelLabs.sway-vscode-plugin"
Expand Down
2 changes: 1 addition & 1 deletion docker/block-committer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/fuellabs/fuel-block-committer:v0.1.0
FROM ghcr.io/fuellabs/fuel-block-committer:sha-3422c94

ARG ETHEREUM_WALLET_KEY=""
ARG COMMIT_INTERVAL=1
Expand Down
16 changes: 14 additions & 2 deletions docker/erc20-deployer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ ADD ./deployer /erc20-deployer/deployer
# Run install inside the depdencies
WORKDIR /erc20-deployer/deployer

# Install Git
RUN apk update && apk add --no-cache git

RUN npm i -g pnpm

# build the ethereum contracts and environment
RUN npm install
RUN pnpm install

# expose env variables
ENV L1_CHAIN_HTTP="${L1_CHAIN_HTTP}"
Expand All @@ -21,4 +26,11 @@ ENV PK_ETH_WALLET="${PK_ETH_WALLET}"
EXPOSE ${PORT}

# copy over script and run
CMD ["npm", "start"]
CMD ["pnpm", "start"]


# L1_CHAIN_HTTP=http://localhost:8545 \
# FUEL_GRAPHQL_ENDPOINT=http://localhost:4000/graphql \
# DEPLOYMENTS_HTTP=http://localhost:8080 \
# PK_ETH_WALLET=59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d \
# pnpm start
5 changes: 2 additions & 3 deletions docker/erc20-deployer/deployer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
"start": "ts-node ./src/index.ts"
},
"dependencies": {
"@fuel-bridge/solidity-contracts": "0.3.0",
"@fuel-bridge/test-utils": "0.3.0",
"@fuel-bridge/test-utils": "next",
"ethers": "5.7.2",
"fuels": "0.63.0"
"fuels": "0.71.1"
},
"devDependencies": {
"ts-node": "^10.9.1"
Expand Down
2 changes: 1 addition & 1 deletion docker/fuel-core/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/fuellabs/fuel-core:v0.20.7
FROM ghcr.io/fuellabs/fuel-core:v0.22.0

ARG FUEL_IP=0.0.0.0
ARG FUEL_PORT=4001
Expand Down
42 changes: 27 additions & 15 deletions docker/fuel-core/chainConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"signing_key": "0xc8e615a4089466174459ef19cfd257d2e17adfabff3b8f219dbb5fb4eca87c50"
}
},
"block_gas_limit": 100000000,
"block_gas_limit": 5000000000,
"initial_state": {
"coins": [
{
Expand Down Expand Up @@ -110,19 +110,31 @@
}
]
},
"transaction_parameters": {
"contract_max_size": 16777216,
"max_inputs": 255,
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 1000000,
"max_script_length": 1048576,
"max_script_data_length": 1048576,
"max_static_contracts": 255,
"max_storage_slots": 255,
"max_predicate_length": 1048576,
"max_predicate_data_length": 1048576,
"gas_price_factor": 1000000,
"max_gas_per_predicate": 1000000
"consensus_parameters": {
"tx_params": {
"max_inputs": 255,
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 10000000,
"max_size": 17825792
},
"predicate_params": {
"max_predicate_length": 1048576,
"max_predicate_data_length": 1048576,
"max_gas_per_predicate": 10000000,
"max_message_data_length": 1048576
},
"script_params": {
"max_script_length": 1048576,
"max_script_data_length": 1048576
},
"contract_params": {
"contract_max_size": 16777216,
"max_storage_slots": 255
},
"fee_params": {
"gas_price_factor": 92,
"gas_per_byte": 4
}
}
}
8 changes: 5 additions & 3 deletions docker/fuel-core/fuel_core.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
set -euo

RETRIES=${RETRIES:-60}
RETRIES=${RETRIES:-160}
JSON='{"jsonrpc":"2.0","id":0,"method":"net_version","params":[]}'
FUEL_DB_PATH=./mnt/db/

Expand Down Expand Up @@ -56,8 +56,10 @@ exec /root/fuel-core run \
--db-type in-memory \
--utxo-validation \
--vm-backtrace \
--enable-relayer \
--relayer $L1_CHAIN_HTTP \
--relayer-v2-listening-contracts $FUEL_MESSAGE_PORTAL_CONTRACT_ADDRESS \
--relayer-da-finalization 0 \
--poa-interval-period 1s \
--chain ./chainConfig.json
--min-gas-price 1 \
--chain ./chainConfig.json \
--debug
8 changes: 4 additions & 4 deletions docker/l1-chain/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ====== Build Image ======
FROM node:16-alpine AS BUILD_IMAGE
FROM node:18-alpine AS BUILD_IMAGE

# dependencies
RUN apk --no-cache add git
Expand All @@ -9,7 +9,7 @@ RUN npm i -g pnpm
WORKDIR /l1chain

# clone the contracts repo
RUN git clone --depth 1 --branch v0.3.0 https://github.com/FuelLabs/fuel-bridge.git /tmp/fuel-bridge
RUN git clone --depth 1 --branch main https://github.com/FuelLabs/fuel-bridge.git /tmp/fuel-bridge
RUN mv /tmp/fuel-bridge/packages/solidity-contracts /l1chain/portal-contracts

# copy over the fuel chain and replace consts values
Expand All @@ -21,14 +21,14 @@ RUN pnpm install
# replace the fuel chain consts values and change contract code
RUN pnpm ts-node scripts/replaceFuelChainConsts.ts
# run contract compile with the new consts
RUN pnpm run build
RUN pnpm compile

# remove build dependencies
# RUN pnpm prune --prod
COPY ./hardhat/hardhat.config.ts .

# ====== Final Image ======
FROM node:16-alpine
FROM node:18-alpine

ARG L1_IP=0.0.0.0
ARG L1_PORT=8545
Expand Down
6 changes: 6 additions & 0 deletions docker/l1-chain/Placeholder.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

/// @dev The only purpose of this contract is to be copied during the Dockerfile build
/// so that hardhat downloads the compiler and it gets cached
contract Placeholder {}
2 changes: 1 addition & 1 deletion docker/l1-chain/l1_chain.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
set -euo

RETRIES=${RETRIES:-20}
RETRIES=${RETRIES:-120}
JSON='{"jsonrpc":"2.0","id":0,"method":"net_version","params":[]}'
L1_CHAIN_HTTP="http://127.0.0.1:$L1_PORT"

Expand Down
2 changes: 1 addition & 1 deletion packages/app/.env.production
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VITE_ETH_CHAIN=sepolia
VITE_FUEL_CHAIN=fuelBeta4
VITE_FUEL_CHAIN=fuelBeta5
VITE_FUEL_VERSION=0.20.7
VITE_IS_PUBLIC_PREVIEW=true
VITE_WALLET_INSTALL=https://chrome.google.com/webstore/detail/fuel-wallet/dldjpboieedgcmpkchcjcbijingjcgok
Expand Down
49 changes: 40 additions & 9 deletions packages/app/load.envs.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,30 @@ function getBridgeTokenContracts() {
return body;
}

if (process.env.VITE_ETH_CHAIN === 'sepolia') {
const ETH_ERC20 = '0xC6387efAD0F184a90B34f397C3d6Fd63135ef790';

if (
process.env.VITE_ETH_CHAIN === 'sepolia' &&
process.env.VITE_FUEL_CHAIN === 'fuelBeta5Dev'
) {
return {
ETH_ERC20,
FUEL_TokenContract:
'0x7d3e3721d96108b71e187aa17c3330ac400637a2649490f4b3d964cbf1b8943e',
};
}

if (
process.env.VITE_ETH_CHAIN === 'sepolia' &&
process.env.VITE_FUEL_CHAIN === 'fuelBeta5'
) {
return {
ETH_ERC20: '0xC6387efAD0F184a90B34f397C3d6Fd63135ef790',
ETH_ERC20,
FUEL_TokenContract:
'0x70334f1a53724b25ebc733777224c86abd46995243831b3668936ce5beaef66d',
'0x84233a3696f4ca759e7f07348f33efa98e1dc1fe65bc1cc5ea693a1368b0f9e9',
};
}

return {};
}

Expand All @@ -57,13 +74,27 @@ function getBridgeSolidityContracts() {
return body;
}

// sepolia config is got from: https://github.com/FuelLabs/fuel-bridge/blob/main/packages/portal-contracts/deployments/deployments.sepolia.json
if (process.env.VITE_ETH_CHAIN === 'sepolia') {
if (
process.env.VITE_ETH_CHAIN === 'sepolia' &&
process.env.VITE_FUEL_CHAIN === 'fuelBeta5Dev'
) {
return {
FuelChainState: '0xb65850FB7eA866f8730Ce713657ed965407F6472',
FuelMessagePortal: '0xBf340BAC79c301B264E2a5dEa51b7F61eb3e666A',
FuelERC20Gateway: '0x749E27d070E2F4a3D6CED522a0D4BDCB37fA95ba',
FuelERC721Gateway: '0x4aC11e55652b4e13Fc8dB6F42bB26793605d03B8',
};
}

if (
process.env.VITE_ETH_CHAIN === 'sepolia' &&
process.env.VITE_FUEL_CHAIN === 'fuelBeta5'
) {
return {
FuelChainState: '0xbe7aB12653e705642eb42EF375fd0d35Cfc45b03',
FuelMessagePortal: '0x03f2901Db5723639978deBed3aBA66d4EA03aF73',
FuelERC20Gateway: '0x07cf0FF4fdD5d73C4ea5E96bb2cFaa324A348269',
FuelERC721Gateway: '0x88Fb3447a32cF50B9f50c7a5695cbE78b1C236B1',
FuelChainState: '0x395B125343ADebCcB05dd70e117774E3AB08a8a7',
FuelMessagePortal: '0x557c5cE22F877d975C2cB13D0a961a182d740fD5',
FuelERC20Gateway: '0xE52af7c9A2F6b243CEE9F0C423E06BAb6E5c6E3b',
FuelERC721Gateway: '0xc094fC648101920B1C37C733AF022942eF4042D3',
};
}
}
Expand Down
23 changes: 10 additions & 13 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"xstate:typegen": "xstate typegen 'src/**/*.ts?(x)'"
},
"dependencies": {
"@fuel-bridge/fungible-token": "0.3.0",
"@fuel-bridge/message-predicates": "0.3.0",
"@fuel-bridge/solidity-contracts": "0.3.0",
"@fuel-ts/utils": "0.63.0",
"@fuel-ui/css": "0.21.1",
"@fuel-ui/react": "0.21.1",
"@fuel-wallet/react": "0.13.7",
"@fuel-wallet/sdk": "0.13.7",
"@fuel-bridge/fungible-token": "next",
"@fuel-bridge/message-predicates": "next",
"@fuel-bridge/solidity-contracts": "next",
"@fuel-ts/utils": "0.71.1",
"@fuel-ui/css": "0.23.0",
"@fuel-ui/react": "0.23.0",
"@fuel-wallet/react": "0.14.3",
"@fuel-wallet/sdk": "0.14.3",
"@fuels/assets": "0.1.0",
"@fuels/react-xstore": "0.0.8",
"@hookform/resolvers": "^3.1.1",
Expand All @@ -31,10 +31,7 @@
"date-fns": "^2.30.0",
"dexie": "^3.2.4",
"framer-motion": "^10.12.16",
"fuels": "0.63.0",
"graphql": "16.2.0",
"graphql-request": "^6.1.0",
"graphql-tag": "^2.12.6",
"fuels": "0.71.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0",
Expand All @@ -46,7 +43,7 @@
"yup": "^1.2.0"
},
"devDependencies": {
"@fuel-wallet/playwright-utils": "0.13.10",
"@fuel-wallet/playwright-utils": "0.14.3",
"@storybook/addon-a11y": "^7.2.2",
"@storybook/addon-actions": "^7.2.2",
"@storybook/addon-essentials": "^7.2.2",
Expand Down
1 change: 1 addition & 0 deletions packages/app/playwright/e2e/Bridge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ test.describe('Bridge', () => {
});

await test.step('Change to account 1 should show loading and transactions', async () => {
await page.waitForTimeout(2000);
await fuelWalletTestHelper.switchAccount('Account 1');
const loading = getByAriaLabel(page, 'Loading Bridge Transactions');
await loading.innerText();
Expand Down
2 changes: 1 addition & 1 deletion packages/app/playwright/e2e/fixtures/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const test = base.extend<{
// required for synpress
global.expect = expect;
// download fuel wallet
const fuelPathExtension = await downloadFuel('0.13.3');
const fuelPathExtension = await downloadFuel('0.14.3');
// download metamask
const metamaskPath = await prepareMetamask(
process.env.META_MASK_VERSION || '10.25.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const AccountConnectionInput = ({
{!account?.address ? (
showConnect && (
<Button
onPress={onConnect}
onClick={onConnect}
isLoading={isConnecting}
css={styles.connectButton}
size="xs"
Expand All @@ -69,7 +69,7 @@ export const AccountConnectionInput = ({
<Button
size="xs"
variant="link"
onPress={onDisconnect}
onClick={onDisconnect}
css={styles.disconnectButton}
rightIcon="X"
iconSize={13}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const AccountSwitchDialog = ({
variant="link"
icon={<Icon icon="X" color="gray8" />}
aria-label="Close unlock window"
onPress={onClose}
onClick={onClose}
/>
</Dialog.Heading>
<Dialog.Description css={styles.description}>
Expand Down Expand Up @@ -65,12 +65,12 @@ export const AccountSwitchDialog = ({
<Dialog.Footer css={styles.footer}>
<Box.Stack css={styles.stack}>
{onConnect && (
<Button onPress={onConnect} css={styles.button}>
<Button onClick={onConnect} css={styles.button}>
Connect Account
</Button>
)}
{onDisconnect && (
<Button onPress={onDisconnect} css={styles.button}>
<Button onClick={onDisconnect} css={styles.button}>
Disconnect Wallet
</Button>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const OnPress = () => {
<CardList css={styles.storybook}>
<AssetCard
asset={assetList[0]}
onPress={() => {
onClick={() => {
// eslint-disable-next-line no-console
console.log('press');
}}
Expand Down
Loading
Loading