Skip to content

Commit

Permalink
feat: upgrade fuel-core (#939)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizAsFight authored Oct 20, 2023
1 parent f683bae commit 9939298
Show file tree
Hide file tree
Showing 24 changed files with 264 additions and 60 deletions.
5 changes: 5 additions & 0 deletions .changeset/grumpy-turkeys-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'fuels-wallet': patch
---

fix: password input showing incorrect error feedback
5 changes: 5 additions & 0 deletions .changeset/slow-buckets-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'fuels-wallet': patch
---

feat: upgrade fuel-core
4 changes: 2 additions & 2 deletions .github/setup-forc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: 'Setup Forc'
inputs:
rust-version:
description: "Rust version"
default: 1.71.1
default: 1.73.0
forc-version:
description: "Forc version"
default: 0.46.0
fuel-core-version:
description: "Fuel core version"
default: 0.20.4
default: 0.20.7

runs:
using: 'composite'
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.4
FROM ghcr.io/fuellabs/fuel-core:v0.20.7

ENV MIN_GAS_PRICE="${MIN_GAS_PRICE}"
ENV CONSENSUS_KEY="${CONSENSUS_KEY}"
Expand Down
150 changes: 145 additions & 5 deletions docker/fuel-core/chainConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,157 @@
"max_inputs": 255,
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 100000000,
"max_gas_per_tx": 10000000,
"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,
"max_gas_per_predicate": 100000000,
"gas_price_factor": 1000000000,
"max_gas_per_predicate": 10000000,
"gas_price_factor": 92,
"gas_per_byte": 4,
"max_message_data_length": 1048576
"max_message_data_length": 1048576,
"chain_id": 0
},
"gas_costs": {
"add": 1,
"addi": 1,
"aloc": 1,
"and": 1,
"andi": 1,
"bal": 13,
"bhei": 1,
"bhsh": 1,
"burn": 132,
"cb": 1,
"cfei": 1,
"cfsi": 1,
"croo": 16,
"div": 1,
"divi": 1,
"ecr1": 3000,
"eck1": 951,
"ed19": 3000,
"eq": 1,
"exp": 1,
"expi": 1,
"flag": 1,
"gm": 1,
"gt": 1,
"gtf": 1,
"ji": 1,
"jmp": 1,
"jne": 1,
"jnei": 1,
"jnzi": 1,
"jmpf": 1,
"jmpb": 1,
"jnzf": 1,
"jnzb": 1,
"jnef": 1,
"jneb": 1,
"k256": 11,
"lb": 1,
"log": 9,
"lt": 1,
"lw": 1,
"mcpi": 33,
"mint": 135,
"mlog": 1,
"modOp": 1,
"modi": 1,
"moveOp": 1,
"movi": 1,
"mroo": 2,
"mul": 1,
"muli": 1,
"mldv": 1,
"noop": 1,
"not": 1,
"or": 1,
"ori": 1,
"ret": 13,
"rvrt": 13,
"s256": 2,
"sb": 1,
"scwq": 13,
"sll": 1,
"slli": 1,
"srl": 1,
"srli": 1,
"srw": 12,
"sub": 1,
"subi": 1,
"sw": 1,
"sww": 43,
"swwq": 44,
"time": 1,
"tr": 105,
"tro": 60,
"wdcm": 1,
"wqcm": 1,
"wdop": 1,
"wqop": 1,
"wdml": 1,
"wqml": 1,
"wddv": 1,
"wqdv": 2,
"wdmd": 3,
"wqmd": 4,
"wdam": 2,
"wqam": 3,
"wdmm": 3,
"wqmm": 3,
"xor": 1,
"xori": 1,
"call": {
"base": 144,
"dep_per_unit": 214
},
"ccp": {
"base": 15,
"dep_per_unit": 103
},
"csiz": {
"base": 17,
"dep_per_unit": 790
},
"ldc": {
"base": 15,
"dep_per_unit": 272
},
"logd": {
"base": 26,
"dep_per_unit": 64
},
"mcl": {
"base": 1,
"dep_per_unit": 3333
},
"mcli": {
"base": 1,
"dep_per_unit": 3333
},
"mcp": {
"base": 1,
"dep_per_unit": 2000
},
"meq": {
"base": 1,
"dep_per_unit": 2500
},
"retd": {
"base": 29,
"dep_per_unit": 62
},
"smo": {
"base": 209,
"dep_per_unit": 55
},
"srwq": {
"base": 47,
"dep_per_unit": 5
}
},
"wallet": {
"address": "0x94ffcc53b892684acefaebc8a3d4a595e528a8cf664eeb3ef36f1020b0809d0d",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function CreatePassword({
const form = useForm<CreatePasswordValues>({
resolver: yupResolver(schema),
reValidateMode: 'onChange',
mode: 'onChange',
mode: 'onBlur',
defaultValues: {
password: '',
confirmPassword: '',
Expand Down
5 changes: 0 additions & 5 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,5 @@
"eslint": "^8.51.0",
"eslint-config-next": "13.5.4",
"next-images": "1.8.5"
},
"pnpm": {
"overrides": {
"prettier@*": "2.8.8"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import {
hasText,
walletConnect,
} from '@fuel-wallet/test-utils';
import { BaseAssetId } from 'fuels';
import { BaseAssetId, bn } from 'fuels';

import { shortAddress } from '../../src/utils';
import '../../load.envs.js';
import { testSetup } from '../utils';

import { checkFee } from './utils';

test.describe('Deposit Half ETH', () => {
test.beforeEach(async ({ context, extensionId, page }) => {
await testSetup({ context, page, extensionId });
Expand Down Expand Up @@ -51,6 +53,7 @@ test.describe('Deposit Half ETH', () => {

// test gas fee is shown and correct
await hasText(walletPage, 'Fee (network)');
await hasText(walletPage, '0.000000001 ETH');
const fee = bn.parseUnits('0.000000152');
await checkFee(walletPage, { minFee: fee.sub(100), maxFee: fee.add(100) });
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import {
hasText,
walletConnect,
} from '@fuel-wallet/test-utils';
import { BaseAssetId } from 'fuels';
import { BaseAssetId, bn } from 'fuels';

import { shortAddress, calculateAssetId } from '../../src/utils';
import '../../load.envs.js';
import { testSetup } from '../utils';

import { checkFee } from './utils';

const { VITE_CONTRACT_ID } = process.env;

test.describe('Forward and Mint Multicall', () => {
Expand Down Expand Up @@ -57,6 +59,7 @@ test.describe('Forward and Mint Multicall', () => {

// test gas fee is shown and correct
await hasText(walletPage, 'Fee (network)');
await hasText(walletPage, '0.000000001 ETH');
const fee = bn.parseUnits('0.000000217');
await checkFee(walletPage, { minFee: fee.sub(100), maxFee: fee.add(100) });
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import '../../load.envs';
import { calculateAssetId, shortAddress } from '../../src/utils';
import { testSetup } from '../utils';

import { checkFee } from './utils';

const { VITE_CONTRACT_ID } = process.env;

test.describe('Forward Custom Asset', () => {
Expand Down Expand Up @@ -70,6 +72,7 @@ test.describe('Forward Custom Asset', () => {

// test gas fee is correct
await hasText(walletPage, 'Fee (network)');
await hasText(walletPage, '0.000000001 ETH');
const fee = bn.parseUnits('0.000000126');
await checkFee(walletPage, { minFee: fee.sub(100), maxFee: fee.add(100) });
});
});
7 changes: 5 additions & 2 deletions packages/e2e-contract-tests/playwright/e2e/ForwardEth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import {
getWalletPage,
hasText,
} from '@fuel-wallet/test-utils';
import { BaseAssetId } from 'fuels';
import { BaseAssetId, bn } from 'fuels';

import '../../load.envs';
import { shortAddress } from '../../src/utils';
import { testSetup } from '../utils';

import { checkFee } from './utils';

test.describe('Forward Eth', () => {
test.beforeEach(async ({ context, extensionId, page }) => {
await testSetup({ context, page, extensionId });
Expand Down Expand Up @@ -44,6 +46,7 @@ test.describe('Forward Eth', () => {

// test gas fee is correct
await hasText(walletPage, 'Fee (network)');
await hasText(walletPage, '0.000000001 ETH');
const fee = bn.parseUnits('0.000000114');
await checkFee(walletPage, { minFee: fee.sub(100), maxFee: fee.add(100) });
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import {
hasText,
walletConnect,
} from '@fuel-wallet/test-utils';
import { BaseAssetId } from 'fuels';
import { BaseAssetId, bn } from 'fuels';

import { shortAddress, calculateAssetId } from '../../src/utils';
import '../../load.envs.js';
import { testSetup } from '../utils';

import { checkFee } from './utils';

const { VITE_EXTERNAL_CONTRACT_ID } = process.env;

test.describe('Forward Half ETH and Mint External Custom Asset', () => {
Expand Down Expand Up @@ -67,6 +69,7 @@ test.describe('Forward Half ETH and Mint External Custom Asset', () => {

// test gas fee is shown and correct
await hasText(walletPage, 'Fee (network)');
await hasText(walletPage, '0.000000001 ETH');
const fee = bn.parseUnits('0.000000233');
await checkFee(walletPage, { minFee: fee.sub(100), maxFee: fee.add(100) });
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import {
hasText,
walletConnect,
} from '@fuel-wallet/test-utils';
import { BaseAssetId } from 'fuels';
import { BaseAssetId, bn } from 'fuels';

import { shortAddress, calculateAssetId } from '../../src/utils';
import '../../load.envs.js';
import { testSetup } from '../utils';

import { checkFee } from './utils';

const { VITE_CONTRACT_ID } = process.env;

test.describe('Forward Half ETH and Mint Custom Asset', () => {
Expand Down Expand Up @@ -67,6 +69,7 @@ test.describe('Forward Half ETH and Mint Custom Asset', () => {

// test gas fee is shown and correct
await hasText(walletPage, 'Fee (network)');
await hasText(walletPage, '0.000000001 ETH');
const fee = bn.parseUnits('0.00000021');
await checkFee(walletPage, { minFee: fee.sub(100), maxFee: fee.add(100) });
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import '../../load.envs';
import { calculateAssetId, shortAddress } from '../../src/utils';
import { testSetup } from '../utils';

import { checkFee } from './utils';

const { VITE_CONTRACT_ID } = process.env;

test.describe('Forward Half Custom Asset', () => {
Expand Down Expand Up @@ -76,6 +78,7 @@ test.describe('Forward Half Custom Asset', () => {

// test gas fee is correct
await hasText(walletPage, 'Fee (network)');
await hasText(walletPage, '0.000000001 ETH');
const fee = bn.parseUnits('0.000000165');
await checkFee(walletPage, { minFee: fee.sub(100), maxFee: fee.add(100) });
});
});
Loading

0 comments on commit 9939298

Please sign in to comment.