Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrading fuel-core to 0.31.0 #2717

Merged
merged 14 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
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
7 changes: 7 additions & 0 deletions .changeset/ninety-candles-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@internal/fuel-core": patch
arboleya marked this conversation as resolved.
Show resolved Hide resolved
"@fuel-ts/versions": patch
"@fuel-ts/account": patch
---

chore: upgrading `fuel-core` to `0.31.0`
arboleya marked this conversation as resolved.
Show resolved Hide resolved
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
12 changes: 6 additions & 6 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 100', 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 100 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 100', 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 100 messages exceed the current supported limit.'
);
});

Expand All @@ -186,7 +186,7 @@ describe('Account', () => {
expect(balances.length).toBeGreaterThanOrEqual(1);
});

it('should throw if balances length is higher than 9999', async () => {
it('should throw if balances length is higher than 100', async () => {
const dummyBalances: CoinQuantity[] = new Array(10000);

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

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

Expand Down
6 changes: 3 additions & 3 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 = 100;
arboleya marked this conversation as resolved.
Show resolved Hide resolved
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 = 100;
let cursor;
// eslint-disable-next-line no-unreachable-loop
for (;;) {
Expand Down Expand Up @@ -231,7 +231,7 @@ export class Account extends AbstractAccount {
async getBalances(): Promise<CoinQuantity[]> {
const balances = [];

const pageSize = 9999;
const pageSize = 100;
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"
Loading