Skip to content

Commit

Permalink
fix: flow use new fuels-ts sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizAsFight committed Dec 7, 2023
1 parent 01353d0 commit 2881e40
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/fungible-token/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Each Sway project uses a `fuel-toolchain.toml` file with pinned versions so `for
In the root of the repository run the following command to build all the Sway programs.

```bash
forc build
pnpm fuels-forc build
```

### Running Rust Tests
Expand Down
2 changes: 1 addition & 1 deletion packages/integration-tests/scripts/bridgeERC20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ const TOKEN_AMOUNT = '10';
console.log('Get message proof on Fuel...');
const withdrawMessageProof = await fuelAcct.provider.getMessageProof(
fWithdrawTxResult.id,
messageOutReceipt.messageId,
messageOutReceipt.nonce,
commitHashAtL1
);

Expand Down
2 changes: 1 addition & 1 deletion packages/integration-tests/scripts/bridgeETH.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const ETH_AMOUNT = '0.1';
console.log('Get message proof on Fuel...');
const withdrawMessageProof = await fuelAccount.provider.getMessageProof(
fWithdrawTxResult.id,
messageOutReceipt.messageId,
messageOutReceipt.nonce,
commitHashAtL1
);

Expand Down
2 changes: 1 addition & 1 deletion packages/integration-tests/tests/bridge_erc20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ describe('Bridging ERC20 tokens', async function () {
);
withdrawMessageProof = await fuelTokenSender.provider.getMessageProof(
tx.id,
messageOutReceipt.messageId,
messageOutReceipt.nonce,
commitHashAtL1
);

Expand Down
2 changes: 1 addition & 1 deletion packages/integration-tests/tests/bridge_erc721.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ describe('Bridging ERC721 tokens', async function () {
);
withdrawMessageProof = await fuelTokenSender.provider.getMessageProof(
tx.id,
messageOutReceipt.messageId,
messageOutReceipt.nonce,
commitHashAtL1
);

Expand Down
2 changes: 1 addition & 1 deletion packages/integration-tests/tests/transfer_eth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ describe('Transferring ETH', async function () {
);
withdrawMessageProof = await fuelETHSender.provider.getMessageProof(
fWithdrawTx.id,
messageOutReceipt.messageId,
messageOutReceipt.nonce,
commitHashAtL1
);

Expand Down
4 changes: 2 additions & 2 deletions packages/message-predicates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The message to contract predicate relies on a script that performs only the foll
Build:

```sh
forc build
pnpm fuels-forc build
cargo run
```

Expand All @@ -34,7 +34,7 @@ cargo test
Code must be formatted.

```sh
forc fmt
pnpm fuels-forc fmt
cargo fmt
```

Expand Down
8 changes: 6 additions & 2 deletions packages/test-utils/src/utils/fuels/relayCommonMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,9 @@ function getCommonRelayableMessages(provider: Provider) {
throw new Error('cannot find contract ID in message data');
const contractId = hexlify(data.slice(0, 32));

const { maxGasPerTx } = provider.getGasConfig();
// build the transaction
const transaction = new ScriptTransactionRequest({
script,
gasLimit: maxGasPerTx,
...txParams,
});
transaction.inputs.push({
Expand Down Expand Up @@ -104,6 +102,12 @@ function getCommonRelayableMessages(provider: Provider) {

transaction.witnesses.push('0x');

const { gasUsed } = await relayer.provider.getTransactionCost(
transaction
);

transaction.gasLimit = gasUsed.mul(1.2);

debug(
'-------------------------------------------------------------------'
);
Expand Down
2 changes: 1 addition & 1 deletion scripts/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

forc fmt --check
cargo fmt --check
forc build
pnpm fuels-forc build
cargo clippy --all-features --all-targets -- -D warnings
pnpm prettier:check

0 comments on commit 2881e40

Please sign in to comment.