Skip to content

Commit

Permalink
chore!: upgrading fuels to 0.96.0 (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
arboleya authored Oct 13, 2024
1 parent 40c642e commit 5c3d337
Show file tree
Hide file tree
Showing 22 changed files with 256 additions and 239 deletions.
17 changes: 17 additions & 0 deletions .changeset/orange-ligers-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@fuel-connectors/burner-wallet-connector": minor
"@fuel-connectors/fuel-development-wallet": minor
"@fuel-connectors/walletconnect-connector": minor
"@fuel-connectors/solana-connector": minor
"@fuel-connectors/evm-predicates": minor
"@fuel-connectors/evm-connector": minor
"@fuel-connectors/fuelet-wallet": minor
"@fuel-connectors/fuel-wallet": minor
"@fuels/connectors": minor
"@fuel-connectors/bako-safe": minor
"@fuel-connectors/common": minor
"@fuels/react": minor
"docs": minor
---

Upgrading `fuels` to `0.96.0`
2 changes: 1 addition & 1 deletion e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@playwright/test": "1.46.1",
"@types/node": "20.12.11",
"dotenv": "16.4.5",
"fuels": "0.95.0"
"fuels": "0.96.0"
},
"engines": {
"node": ">=18",
Expand Down
2 changes: 1 addition & 1 deletion examples/react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@wagmi/connectors": "5.1.7",
"@wagmi/core": "2.13.4",
"clsx": "2.1.1",
"fuels": "0.95.0",
"fuels": "0.96.0",
"react": "18.3.1",
"react-dom": "18.3.1"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/react-app/src/types/contracts/Counter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* eslint-disable @typescript-eslint/consistent-type-imports */

/*
Fuels version: 0.94.9
Fuels version: 0.96.0
Forc version: 0.65.2
Fuel-Core version: 0.37.1
*/
Expand Down
2 changes: 1 addition & 1 deletion examples/react-app/src/types/contracts/CounterFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* eslint-disable @typescript-eslint/consistent-type-imports */

/*
Fuels version: 0.94.9
Fuels version: 0.96.0
Forc version: 0.65.2
Fuel-Core version: 0.37.1
*/
Expand Down
2 changes: 1 addition & 1 deletion examples/react-app/src/types/contracts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* eslint-disable @typescript-eslint/consistent-type-imports */

/*
Fuels version: 0.94.9
Fuels version: 0.96.0
Forc version: 0.65.2
Fuel-Core version: 0.37.1
*/
Expand Down
2 changes: 1 addition & 1 deletion examples/react-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@fuels/react": "workspace:*",
"@tanstack/react-query": "5.35.1",
"connectkit": "1.8.2",
"fuels": "0.95.0",
"fuels": "0.96.0",
"next": "14.2.3",
"react": "18.3.1",
"react-dom": "18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/bako-safe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"socket.io-client": "4.7.2"
},
"devDependencies": {
"fuels": "0.95.0",
"fuels": "0.96.0",
"tsup": "8.0.2",
"typescript": "5.4.2",
"undici": "6.9.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/burner-wallet-connector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"devDependencies": {
"@fuel-connectors/common": "workspace:*",
"fuels": "0.95.0",
"fuels": "0.96.0",
"jsdom": "24.0.0",
"tsup": "8.0.2",
"typescript": "5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"devDependencies": {
"@types/memoizee": "0.4.11",
"fuels": "0.95.0",
"fuels": "0.96.0",
"terser": "5.31.0",
"tsup": "8.0.2",
"typescript": "5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/connectors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@fuel-connectors/fuelet-wallet": "workspace:*",
"@fuel-connectors/solana-connector": "workspace:*",
"@fuel-connectors/walletconnect-connector": "workspace:*",
"fuels": "0.95.0",
"fuels": "0.96.0",
"terser": "5.31.0",
"tsup": "8.0.2",
"typescript": "5.4.5"
Expand Down
6 changes: 3 additions & 3 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"author": "",
"license": "ISC",
"dependencies": {
"@fuel-ts/errors": "0.95.0",
"@fuel-ts/versions": "0.95.0",
"fuels": "0.95.0",
"@fuel-ts/errors": "0.96.0",
"@fuel-ts/versions": "0.96.0",
"fuels": "0.96.0",
"typedoc-plugin-markdown": "^3.15.3"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/evm-connector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@fuel-connectors/common": "workspace:*",
"@fuel-connectors/evm-predicates": "workspace:*",
"@types/memoizee": "0.4.11",
"fuels": "0.95.0",
"fuels": "0.96.0",
"jsdom": "24.0.0",
"ts-loader": "9.5.1",
"ts-node": "10.9.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/evm-predicates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@fuel-connectors/common": "workspace:*",
"fuels": "0.95.0",
"fuels": "0.96.0",
"tsx": "4.9.3",
"typescript": "5.4.5"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/fuel-development-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"devDependencies": {
"@fuel-connectors/fuel-wallet": "workspace:*",
"fuels": "0.95.0",
"fuels": "0.96.0",
"tsup": "8.0.2",
"typescript": "5.4.5",
"undici": "6.16.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/fuel-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"devDependencies": {
"events": "3.3.0",
"fuels": "0.95.0",
"fuels": "0.96.0",
"tsup": "8.0.2",
"typescript": "5.4.5",
"undici": "6.16.0",
Expand Down
50 changes: 25 additions & 25 deletions packages/fuel-wallet/src/tests/FuelWalletConnector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,29 @@ describe('FuelWalletConnector', () => {
test('should request accounts', async () => {
const request = requestMock.mockReturnValue(
Promise.resolve([
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
]),
);

const connector = new FuelWalletConnector();
const result = await connector.accounts();
expect(result).toEqual([
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
]);
expect(request).toHaveBeenCalledWith('accounts', {});
});

test('should request current account', async () => {
const request = requestMock.mockReturnValue(
Promise.resolve(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
),
);

const connector = new FuelWalletConnector();
const result = await connector.currentAccount();
expect(result).toBe(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
);
expect(request).toHaveBeenCalledWith('currentAccount', {});
});
Expand All @@ -84,21 +84,21 @@ describe('FuelWalletConnector', () => {
test('should request sign message', async () => {
const request = requestMock.mockReturnValue(
Promise.resolve(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
),
);

const connector = new FuelWalletConnector();
const result = await connector.signMessage(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
'hello',
);
expect(result).toBe(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
);
expect(request).toHaveBeenCalledWith('signMessage', {
address:
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
message: 'hello',
});
});
Expand All @@ -107,7 +107,7 @@ describe('FuelWalletConnector', () => {
const connector = new FuelWalletConnector();
await expect(
connector.signMessage(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
' ',
),
).rejects.toThrowError('Message is required');
Expand All @@ -116,19 +116,19 @@ describe('FuelWalletConnector', () => {
test('should request send transaction', async () => {
const request = requestMock.mockReturnValue(
Promise.resolve(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
),
);

const connector = new FuelWalletConnector();
const result = await connector.sendTransaction(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
{
type: TransactionType.Create,
},
);
expect(result).toBe(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
);
expect(request).toHaveBeenCalled();
});
Expand All @@ -137,7 +137,7 @@ describe('FuelWalletConnector', () => {
const connector = new FuelWalletConnector();
await expect(
connector.sendTransaction(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
null as unknown as TransactionRequestLike,
),
).rejects.toThrowError('Transaction is required');
Expand All @@ -148,14 +148,14 @@ describe('FuelWalletConnector', () => {
test('should list assets', async () => {
const request = requestMock.mockReturnValue(
Promise.resolve([
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
]),
);

const connector = new FuelWalletConnector();
const result = await connector.assets();
expect(result).toEqual([
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
]);
expect(request).toHaveBeenCalledWith('assets', {});
});
Expand All @@ -165,20 +165,20 @@ describe('FuelWalletConnector', () => {
test('should get ABI', async () => {
const request = requestMock.mockReturnValue(
Promise.resolve(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
),
);

const connector = new FuelWalletConnector();
const result = await connector.getABI(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
);
expect(result).toBe(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
);
expect(request).toHaveBeenCalledWith('getAbi', {
contractId:
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
});
});

Expand All @@ -187,13 +187,13 @@ describe('FuelWalletConnector', () => {

const connector = new FuelWalletConnector();
const result = await connector.addABI(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
{} as FuelABI,
);
expect(result).toBe(true);
expect(request).toHaveBeenCalledWith('addAbi', {
abiMap: {
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb':
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB':
{},
},
});
Expand All @@ -204,12 +204,12 @@ describe('FuelWalletConnector', () => {

const connector = new FuelWalletConnector();
const result = await connector.hasABI(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
);
expect(result).toBe(true);
expect(request).toHaveBeenCalledWith('getAbi', {
contractId:
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
});
});
});
Expand Down Expand Up @@ -250,14 +250,14 @@ describe('FuelWalletConnector', () => {
test('should return version', async () => {
const request = requestMock.mockReturnValue(
Promise.resolve(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
),
);

const connector = new FuelWalletConnector();
const result = await connector.version();
expect(result).toBe(
'0x1DC6604C6943E7C618ecDeE1e815dD4051EBf0A0E822986F5550B960fF4126fb',
'0x1DC6604C6943e7C618ECDee1e815dd4051ebf0a0E822986F5550B960fF4126FB',
);
expect(request).toHaveBeenCalledWith('version', {
app: '0.0.0',
Expand Down
2 changes: 1 addition & 1 deletion packages/fuelet-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"devDependencies": {
"@fuel-connectors/fuel-wallet": "workspace:*",
"fuels": "0.95.0",
"fuels": "0.96.0",
"tsup": "8.0.2",
"typescript": "5.4.5",
"undici": "6.16.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@tanstack/react-query": "5.35.1",
"@types/react": "18.3.1",
"compare-versions": "6.1.0",
"fuels": "0.95.0",
"fuels": "0.96.0",
"react": "18.3.1",
"tsup": "7.3.0",
"tsx": "4.9.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/solana-connector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@fuel-connectors/common": "workspace:*",
"@types/memoizee": "0.4.11",
"@web3modal/core": "5.0.0",
"fuels": "0.95.0",
"fuels": "0.96.0",
"jsdom": "24.0.0",
"ts-loader": "9.5.1",
"ts-node": "10.9.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/walletconnect-connector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@fuel-connectors/evm-predicates": "workspace:*",
"@types/memoizee": "0.4.11",
"@web3modal/core": "5.0.0",
"fuels": "0.95.0",
"fuels": "0.96.0",
"jsdom": "24.0.0",
"ts-loader": "9.5.1",
"ts-node": "10.9.2",
Expand Down
Loading

0 comments on commit 5c3d337

Please sign in to comment.