Skip to content

Commit

Permalink
chore: upgrading fuel-core to 0.31.0 (#2717)
Browse files Browse the repository at this point in the history
  • Loading branch information
arboleya committed Jul 9, 2024
1 parent 5e23894 commit 4a3c184
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 34 deletions.
8 changes: 8 additions & 0 deletions .changeset/ninety-candles-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"create-fuels": patch
"@internal/fuel-core": patch
"@fuel-ts/versions": patch
"@fuel-ts/account": patch
---

chore: upgrading `fuel-core` to `0.31.0`
2 changes: 1 addition & 1 deletion internal/fuel-core/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.30.0
0.31.0
8 changes: 4 additions & 4 deletions packages/account/src/account.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('Account', () => {
expect(assetC?.amount.gt(1)).toBeTruthy();
});

it('should throw if coins length is higher than 9999', async () => {
it('should throw if coins length is higher than 512', async () => {
const dummyCoins: Coin[] = new Array(10000);

vi.spyOn(Provider.prototype, 'getCoins').mockImplementation(async () =>
Expand All @@ -96,7 +96,7 @@ describe('Account', () => {

expect(result).toBeUndefined();
expect((<Error>error).message).toEqual(
'Wallets containing more than 9999 coins exceed the current supported limit.'
'Wallets containing more than 512 coins exceed the current supported limit.'
);
});

Expand Down Expand Up @@ -139,7 +139,7 @@ describe('Account', () => {
expect(messages.length).toEqual(1);
});

it('should throw if messages length is higher than 9999', async () => {
it('should throw if messages length is higher than 512', async () => {
const dummyMessages: Message[] = new Array(10000);

vi.spyOn(Provider.prototype, 'getMessages').mockImplementation(async () =>
Expand All @@ -162,7 +162,7 @@ describe('Account', () => {

expect(result).toBeUndefined();
expect((<Error>error).message).toEqual(
'Wallets containing more than 9999 messages exceed the current supported limit.'
'Wallets containing more than 512 messages exceed the current supported limit.'
);
});

Expand Down
4 changes: 2 additions & 2 deletions packages/account/src/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class Account extends AbstractAccount {
async getCoins(assetId?: BytesLike): Promise<Coin[]> {
const coins = [];

const pageSize = 9999;
const pageSize = 512;
let cursor;
// eslint-disable-next-line no-unreachable-loop
for (;;) {
Expand Down Expand Up @@ -185,7 +185,7 @@ export class Account extends AbstractAccount {
async getMessages(): Promise<Message[]> {
const messages = [];

const pageSize = 9999;
const pageSize = 512;
let cursor;
// eslint-disable-next-line no-unreachable-loop
for (;;) {
Expand Down
67 changes: 43 additions & 24 deletions packages/account/src/providers/fuel-core-schema.graphql
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
"""
Indicates that an Input Object is a OneOf Input Object (and thus requires
exactly one of its field be provided)
"""
directive @oneOf on INPUT_OBJECT

"""
Provides a scalar specification URL for specifying the behavior of custom scalar types.
"""
directive @specifiedBy(
"""
URL that specifies the behavior of this scalar.
"""
url: String!
) on SCALAR

scalar Address

scalar AssetId
Expand Down Expand Up @@ -30,14 +46,14 @@ An edge in a connection.
"""
type BalanceEdge {
"""
A cursor for use in pagination
The item at the end of the edge
"""
cursor: String!
node: Balance!

"""
The item at the end of the edge
A cursor for use in pagination
"""
node: Balance!
cursor: String!
}

input BalanceFilterInput {
Expand All @@ -53,6 +69,7 @@ type Block {
height: U32!
header: Header!
consensus: Consensus!
transactionIds: [TransactionId!]!
transactions: [Transaction!]!
}

Expand All @@ -78,14 +95,14 @@ An edge in a connection.
"""
type BlockEdge {
"""
A cursor for use in pagination
The item at the end of the edge
"""
cursor: String!
node: Block!

"""
The item at the end of the edge
A cursor for use in pagination
"""
node: Block!
cursor: String!
}

scalar BlockId
Expand Down Expand Up @@ -157,14 +174,14 @@ An edge in a connection.
"""
type CoinEdge {
"""
A cursor for use in pagination
The item at the end of the edge
"""
cursor: String!
node: Coin!

"""
The item at the end of the edge
A cursor for use in pagination
"""
node: Coin!
cursor: String!
}

input CoinFilterInput {
Expand Down Expand Up @@ -249,14 +266,14 @@ An edge in a connection.
"""
type ContractBalanceEdge {
"""
A cursor for use in pagination
The item at the end of the edge
"""
cursor: String!
node: ContractBalance!

"""
The item at the end of the edge
A cursor for use in pagination
"""
node: ContractBalance!
cursor: String!
}

input ContractBalanceFilterInput {
Expand Down Expand Up @@ -332,6 +349,7 @@ input ExcludeInput {

type FailureStatus {
transactionId: TransactionId!
blockHeight: U32!
block: Block!
time: Tai64Timestamp!
reason: String!
Expand Down Expand Up @@ -672,14 +690,14 @@ An edge in a connection.
"""
type MessageEdge {
"""
A cursor for use in pagination
The item at the end of the edge
"""
cursor: String!
node: Message!

"""
The item at the end of the edge
A cursor for use in pagination
"""
node: Message!
cursor: String!
}

type MessageProof {
Expand Down Expand Up @@ -1222,6 +1240,7 @@ type Subscription {

type SuccessStatus {
transactionId: TransactionId!
blockHeight: U32!
block: Block!
time: Tai64Timestamp!
programState: ProgramState
Expand Down Expand Up @@ -1294,14 +1313,14 @@ An edge in a connection.
"""
type TransactionEdge {
"""
A cursor for use in pagination
The item at the end of the edge
"""
cursor: String!
node: Transaction!

"""
The item at the end of the edge
A cursor for use in pagination
"""
node: Transaction!
cursor: String!
}

scalar TransactionId
Expand Down
2 changes: 1 addition & 1 deletion packages/account/src/providers/provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('Provider', () => {

const version = await provider.getVersion();

expect(version).toEqual('0.30.0');
expect(version).toEqual('0.31.0');
});

it('can call()', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/versions/src/lib/getBuiltinVersions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export function getBuiltinVersions() {
return {
FORC: '0.61.2',
FUEL_CORE: '0.30.0',
FUEL_CORE: '0.31.0',
FUELS: '0.91.0',
};
}
2 changes: 1 addition & 1 deletion templates/nextjs/sway-programs/fuel-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ channel = "testnet"

[components]
forc = "0.61.2"
fuel-core = "0.30.0"
fuel-core = "0.31.0"

0 comments on commit 4a3c184

Please sign in to comment.