-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into db/chore/manual-proxy-contracts
- Loading branch information
Showing
52 changed files
with
3,708 additions
and
3,339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"create-fuels": patch | ||
--- | ||
|
||
fix: moved `create-fuels` deps for `fuels-ts` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"@fuel-ts/contract": patch | ||
"@fuel-ts/account": patch | ||
"@fuel-ts/program": patch | ||
"fuels": patch | ||
"create-fuels": patch | ||
--- | ||
|
||
build(deps): bump the deps-minor group with 20 updates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
--- | ||
|
||
ci(deps): bump thollander/actions-comment-pull-request from 2 to 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"create-fuels": patch | ||
--- | ||
|
||
build(deps): bump typescript-eslint from 8.5.0 to 8.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
--- | ||
|
||
build(deps): bump memfs from 4.11.1 to 4.14.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@internal/fuel-core": patch | ||
"@fuel-ts/versions": patch | ||
"@fuel-ts/account": patch | ||
"@fuel-ts/errors": patch | ||
--- | ||
|
||
chore: upgrading `fuel-core` to `0.40.0` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@fuel-ts/account": patch | ||
--- | ||
|
||
feat: implement batch transfer to contracts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"create-fuels": patch | ||
--- | ||
|
||
chore: exclude `node_modules` in template tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
--- | ||
|
||
chore: increase benchmark iterations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
--- | ||
ci: add optimized graphql query e2e tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,6 @@ | |
"fuels": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"bun": "^1.1.29" | ||
"bun": "^1.1.31" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// #region combining-utxos | ||
import { Provider, Wallet } from 'fuels'; | ||
|
||
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../env'; | ||
|
||
const provider = await Provider.create(LOCAL_NETWORK_URL); | ||
const fundingWallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); | ||
|
||
const wallet = Wallet.generate({ provider }); | ||
|
||
// First, lets fund a wallet with 10_000 of the base asset. But as we are doing this across 10 transactions, | ||
// we will end up with 10 UTXOs. | ||
for (let i = 0; i < 10; i++) { | ||
const initTx = await fundingWallet.transfer( | ||
wallet.address, | ||
1000, | ||
provider.getBaseAssetId() | ||
); | ||
await initTx.waitForResult(); | ||
} | ||
|
||
// We can fetch the coins to see how many UTXOs we have, and confirm it is 10. | ||
const { coins: initialCoins } = await wallet.getCoins( | ||
provider.getBaseAssetId() | ||
); | ||
console.log('Initial Coins Length', initialCoins.length); | ||
// 10 | ||
|
||
// But we can also confirm the total balance of the base asset for this account is 10_000. | ||
const initialBalance = await wallet.getBalance(provider.getBaseAssetId()); | ||
console.log('Initial Balance', initialBalance.toNumber()); | ||
// 10_000 | ||
|
||
// Now we can combine the UTXOs into a single UTXO by performing a single transfer for the | ||
// majority of the balance. Of course, we will still need some funds for the transaction fees. | ||
const combineTx = await wallet.transfer( | ||
wallet.address, | ||
9500, | ||
provider.getBaseAssetId() | ||
); | ||
await combineTx.wait(); | ||
|
||
// Now we can perform the same validations and see we have less UTXOs. | ||
// We have 2 in this instance, as we have performed the transfer in the base asset: | ||
// a UTXO for our transfer, and another for what is left after paying the fees. | ||
const { coins: combinedCoins } = await wallet.getCoins( | ||
provider.getBaseAssetId() | ||
); | ||
console.log('Combined Coins Length', combinedCoins.length); | ||
// 2 | ||
|
||
// And we can also confirm the final balance of the base asset for this account is 9_998, | ||
// so the cost of combining is also minimal. | ||
const combinedBalance = await wallet.getBalance(provider.getBaseAssetId()); | ||
console.log('Combined Balance', combinedBalance.toNumber()); | ||
// 9_998 | ||
// #endregion combining-utxos |
Oops, something went wrong.