Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
)
  • Loading branch information
helciofranco authored Sep 6, 2024
1 parent 1d90228 commit 083bf92
Show file tree
Hide file tree
Showing 72 changed files with 3,516 additions and 1,654 deletions.
16 changes: 16 additions & 0 deletions .changeset/nasty-teachers-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"@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-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
---

Update to `[email protected]`, `[email protected]` and `[email protected]`
5 changes: 5 additions & 0 deletions .changeset/tiny-emus-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fuel-connectors/solana-connector": minor
---

Update `Solana Connector` to use the full `Bytes` representation of `tx_id`.
2 changes: 1 addition & 1 deletion .github/workflows/pr-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: 'Release PR to npm'
runs-on: buildjet-4vcpu-ubuntu-2204
# Comment if:false to enable release PR to npm
if: false
# if: false
permissions: write-all
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ concurrency:
cancel-in-progress: true

env:
FORC_VERSION: 0.61.2
CORE_VERSION: 0.31.0
FORC_VERSION: 0.63.3
CORE_VERSION: 0.35.0

jobs:
tests-vitest:
Expand Down
4 changes: 2 additions & 2 deletions examples/react-app/contracts/Forc.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[package]]
name = "core"
source = "path+from-root-148AAAB4460F1A9D"
source = "path+from-root-DBA362D23F79A071"

[[package]]
name = "counter"
Expand All @@ -9,5 +9,5 @@ dependencies = ["std"]

[[package]]
name = "std"
source = "git+https://github.com/fuellabs/sway?tag=v0.59.0#d9985d8111f94235edba9a08fc71a9513ec2a95c"
source = "git+https://github.com/fuellabs/sway?rev#253330df2e4fb1863d7826914cb3cc790e89bec9"
dependencies = ["core"]
2 changes: 1 addition & 1 deletion examples/react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@wagmi/connectors": "5.1.7",
"@wagmi/core": "2.13.4",
"clsx": "2.1.1",
"fuels": "0.93.0",
"fuels": "0.94.4",
"react": "18.3.1",
"react-dom": "18.3.1"
},
Expand Down
9 changes: 3 additions & 6 deletions examples/react-app/src/components/counter.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from 'react';
import { useLogEvents } from '../hooks/use-log-events';
import { useWallet } from '../hooks/useWallet';
import { CounterAbi__factory } from '../types';
import { Counter } from '../types';
import { counter as COUNTER_CONTRACT_ID } from '../types/contract-ids.json';
import type { CustomError } from '../utils/customError';
import { DEFAULT_AMOUNT } from './balance';
Expand Down Expand Up @@ -62,7 +62,7 @@ export default function ContractCounter({ isSigning, setIsSigning }: Props) {
if (wallet) {
setLoading(true);
setIsSigning(true);
const contract = CounterAbi__factory.connect(COUNTER_CONTRACT_ID, wallet);
const contract = new Counter(COUNTER_CONTRACT_ID, wallet);
try {
const { waitForResult } = await contract.functions
.increment_counter()
Expand Down Expand Up @@ -124,10 +124,7 @@ export default function ContractCounter({ isSigning, setIsSigning }: Props) {
async function getCount() {
if (!wallet) return;

const counterContract = CounterAbi__factory.connect(
COUNTER_CONTRACT_ID,
wallet,
);
const counterContract = new Counter(COUNTER_CONTRACT_ID, wallet);

try {
const { value } = await counterContract.functions
Expand Down
8 changes: 2 additions & 6 deletions examples/react-app/src/components/transfer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Address, Provider } from 'fuels';
import { Address } from 'fuels';
import { useState } from 'react';
import { useWallet } from '../hooks/useWallet';
import type { CustomError } from '../utils/customError';
Expand Down Expand Up @@ -40,10 +40,6 @@ export default function Transfer({ isSigning, setIsSigning }: Props) {
receiverAddress,
DEFAULT_AMOUNT,
asset_id,
{
gasLimit: 150_000,
maxFee: 150_000,
},
);

setToast({
Expand All @@ -67,7 +63,7 @@ export default function Transfer({ isSigning, setIsSigning }: Props) {
<p>
Transferred successfully! View it on the{' '}
<a
href={`https://app.fuel.network/tx/${result.id}`}
href={`https://app.fuel.network/tx/${result?.id}`}
className="underline"
target="_blank"
rel="noreferrer"
Expand Down
102 changes: 102 additions & 0 deletions examples/react-app/src/types/contracts/Counter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
/* Autogenerated file. Do not edit manually. */

/* eslint-disable max-classes-per-file */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/consistent-type-imports */

/*
Fuels version: 0.94.4
Forc version: 0.63.3
Fuel-Core version: 0.35.0
*/

import { Contract, Interface } from 'fuels';
import type {
AbstractAddress,
Account,
BN,
BigNumberish,
FunctionFragment,
InvokeFunction,
Provider,
StorageSlot,
} from 'fuels';

const abi = {
programType: 'contract',
specVersion: '1',
encodingVersion: '1',
concreteTypes: [
{
type: 'u64',
concreteTypeId:
'1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0',
},
],
metadataTypes: [],
functions: [
{
inputs: [],
name: 'get_count',
output:
'1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0',
attributes: [
{
name: 'storage',
arguments: ['read'],
},
],
},
{
inputs: [],
name: 'increment_counter',
output:
'1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0',
attributes: [
{
name: 'storage',
arguments: ['read', 'write'],
},
],
},
],
loggedTypes: [],
messagesTypes: [],
configurables: [],
};

const storageSlots: StorageSlot[] = [
{
key: '6e3c7b4f69bbff7132c3c3a62883a6868f47b0bc2a7f21605f29038cd9a5e05f',
value: '0000000000000000000000000000000000000000000000000000000000000000',
},
];

export class CounterInterface extends Interface {
constructor() {
super(abi);
}

declare functions: {
get_count: FunctionFragment;
increment_counter: FunctionFragment;
};
}

export class Counter extends Contract {
static readonly abi = abi;
static readonly storageSlots = storageSlots;

declare interface: CounterInterface;
declare functions: {
get_count: InvokeFunction<[], BN>;
increment_counter: InvokeFunction<[], BN>;
};

constructor(
id: string | AbstractAddress,
accountOrProvider: Account | Provider,
) {
super(id, abi, accountOrProvider);
}
}
51 changes: 0 additions & 51 deletions examples/react-app/src/types/contracts/CounterAbi.d.ts

This file was deleted.

12 changes: 0 additions & 12 deletions examples/react-app/src/types/contracts/CounterAbi.hex.ts

This file was deleted.

Loading

0 comments on commit 083bf92

Please sign in to comment.