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

ci(release): v0.97.0 @ master #3347

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fuel-service-user
Copy link
Contributor

@fuel-service-user fuel-service-user commented Oct 21, 2024

Summary

In this release, we:

  • Implemented batch transfer to contracts
  • Optimized the getMessageByNonce provider endpoint
  • Upgraded fuel-core to v0.40.0
  • Optimize graphQL query for Provider.getTransactions
  • Upgraded forc to v0.66.4
  • Removed blockId property from responses when listing transactions
  • Upgraded forc to v0.66.2
  • Deprecate and fix multiple receipts properties
  • Optimized the getCoins provider endpoint
  • Revised our code snippets to use a WYSIWYG format

Breaking


Features

Fixes

Chores

Docs


Migration Notes

Features

#3383 - onDeploy fuels config supports all Sway program types

  • Changed the outputted data from the onDeploy callback method for the fuels.config.ts. Instead of just emitting the deployed contracts (as an array), it will now emit an object with contracts, predicates and scripts.
// Before (fuels.config.ts)
import { createConfig, FuelsConfig, DeployedContract } from 'fuels';

export default createConfig({
  output: 'dir/out',
  onDeploy: (config: FuelsConfig, deployedContracts: DeployedContract[]) => {
    console.log('contracts', deployedContracts);
  }
});
// After (fuels.config.ts)
import { createConfig, FuelsConfig, DeployedData } from 'fuels';

export default createConfig({
  output: 'dir/out',
  onDeploy: (config: FuelsConfig, deployed: DeployedData[]) => {
    console.log('contracts', deployed.contracts);
    console.log('predicates', deployed.predicates);
    console.log('scripts', deployed.scripts);
  }
});

Fixes

#3298 - Remove unnecessary nonce from message gql queries

  • Removed the nonce property from Provider.operations.getMessageByNonce(). This can still be retrieved by Provider.getMessageByNonce().

Chores

#3389 - Refactor predicate and script deployment

ContractFactory.deployAsBlobTxForScript has been removed in favor of Predicate.deploy and Script.deploy:

// before
const factory = new ContractFactory(scriptBytecode, scriptAbi, wallet);
const { waitForResult } = await factory.deployAsBlobTxForScript();
const { loaderBytecode, configurableOffsetDiff } = await waitForResult();

// after
const script = new Script(scriptBytecode, scriptAbi, wallet);
const { blobId, waitForResult } = await script.deploy(deployerWallet);
const loaderScript = await waitForResult();

const predicate = new Predicate({ bytecode, abi, provider });
const { blobId, waitForResult } = await predicate.deploy(deployerWallet);
const loaderPredicate = await waitForResult();

#3387 - Mandate abi in Predicate constructor

Instantiating a Predicate now requires providing its abi. If you want to use the Predicate as an Account, please instantiate it via the Account class

// before
const predicate = new Predicate({ provider, bytecode }); // worked even though abi is missing

// after
const predicate = new Predicate({ abi, provider, bytecode }); // abi is now mandatory

// predicate as account
const account = new Account(predicateAddress, provider);

#3336 - Optimize getTransactions query

The response format for Provider.getTransactions remains the same. However, the response format for the query Provider.operations.getTransactions has been modified.

// before
query getTransactions {
  id
  rawPayload
  status {
    ...
  }
}
// after
query getTransactions {
  rawPayload
}

#3379 - Remove blockId in transaction list responses

The blockId property has been removed from the following GraphQL queries used to list past transactions:

const { transactions } = await getTransactionsSummaries({ ... });

const { transactionsByOwner } = await provider.operations.getTransactionsByOwner({ ... });

If the blockId is required for a given transaction, it needs to be queried separately with getTransactionSummary helper:

import { getTransactionSummary } from 'fuels';

const transaction = await getTransactionSummary({
  id,
  provider,
});

Note: The blockId is still available in the result for a submitted transaction.

#3301 - Optimize coin gql queries

  • The Provider.operations.getCoins() and Provider.operations.getCoinsToSpend function no longer return the owner. These methods shouldn't be called directly but are used internally to formulate responses from the SDK.

  • Removed the property owner from the Provider.operations.getCoinsToSpend() function. Suggest to use the owner from the input parameters.

Copy link

vercel bot commented Oct 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 0:10am
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 0:10am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
ts-docs-api ⬜️ Ignored (Inspect) Nov 14, 2024 0:10am

Copy link

codspeed-hq bot commented Oct 21, 2024

CodSpeed Performance Report

Merging #3347 will not alter performance

Comparing changeset-release/master (3fbc91a) with master (b0e9c84)

Summary

✅ 18 untouched benchmarks

Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
64.28%(+0%) 69.74%(+0%) 73.11%(+0%) 64.72%(+0%)
Changed Files:

Coverage values did not change👌.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant