Skip to content

Commit f997db0

Browse files
committed
chore: add flag --release to all forc build instances
1 parent 0057a9b commit f997db0

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

.github/workflows/pr-release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
npm-token: ${{ secrets.NPM_TOKEN }}
2525

2626
- name: Build Contracts
27-
run: forc build
27+
run: forc build --release
2828

2929
- name: Build
3030
run: pnpm build

packages/fungible-token/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This project uses the general contract message relaying script/predicate from th
2828
In the root of the repository run the following command to build all the Sway programs.
2929

3030
```bash
31-
forc build
31+
forc build --release
3232
```
3333

3434
### Running Rust Tests

packages/fungible-token/bridge-fungible-token/tests/utils/constants.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ pub(crate) const CONTRACT_MESSAGE_PREDICATE_BINARY: &str =
33
pub(crate) const MESSAGE_SENDER_ADDRESS: &str =
44
"0x00000000000000000000000096c53cd98B7297564716a8f2E1de2C83928Af2fe";
55
pub(crate) const BRIDGE_FUNGIBLE_TOKEN_CONTRACT_BINARY: &str =
6-
"../bridge-fungible-token/out/debug/bridge_fungible_token.bin";
6+
"../bridge-fungible-token/out/release/bridge_fungible_token.bin";
77
pub(crate) const DEPOSIT_RECIPIENT_CONTRACT_BINARY: &str =
8-
"../test-deposit-recipient-contract/out/debug/test_deposit_recipient_contract.bin";
8+
"../test-deposit-recipient-contract/out/release/test_deposit_recipient_contract.bin";
99

1010
pub(crate) const BRIDGED_TOKEN: &str =
1111
"0x00000000000000000000000000000000000000000000000000000000deadbeef";

packages/fungible-token/bridge-fungible-token/tests/utils/setup.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ use super::constants::{
3131
abigen!(
3232
Contract(
3333
name = "BridgeFungibleTokenContract",
34-
abi = "packages/fungible-token/bridge-fungible-token/out/debug/bridge_fungible_token-abi.json",
34+
abi = "packages/fungible-token/bridge-fungible-token/out/release/bridge_fungible_token-abi.json",
3535
),
3636
Contract(
3737
name = "DepositRecipientContract",
3838
abi =
39-
"packages/fungible-token/test-deposit-recipient-contract/out/debug/test_deposit_recipient_contract-abi.json",
39+
"packages/fungible-token/test-deposit-recipient-contract/out/release/test_deposit_recipient_contract-abi.json",
4040
),
4141
);
4242

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export { default as fungibleTokenABI } from '../bridge-fungible-token/out/debug/bridge_fungible_token-abi.json';
2-
export { default as fungibleTokenStorageSlots } from '../bridge-fungible-token/out/debug/bridge_fungible_token-storage_slots.json';
3-
import _fungibleTokenBinary from '../bridge-fungible-token/out/debug/bridge_fungible_token.bin';
1+
export { default as fungibleTokenABI } from '../bridge-fungible-token/out/release/bridge_fungible_token-abi.json';
2+
export { default as fungibleTokenStorageSlots } from '../bridge-fungible-token/out/release/bridge_fungible_token-storage_slots.json';
3+
import _fungibleTokenBinary from '../bridge-fungible-token/out/release/bridge_fungible_token.bin';
44

55
export const fungibleTokenBinary = _fungibleTokenBinary;

packages/message-predicates/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The message to contract predicate relies on a script that performs only the foll
1919
Build:
2020

2121
```sh
22-
pnpm forc build
22+
pnpm forc build --release
2323
cargo run
2424
```
2525

packages/message-predicates/contract-message-predicate/tests/utils/environment.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ use super::builder;
2121

2222
abigen!(Contract(
2323
name = "TestContract",
24-
abi = "packages/message-predicates/contract-message-predicate/out/debug/contract_message_test-abi.json"
24+
abi = "packages/message-predicates/contract-message-predicate/out/release/contract_message_test-abi.json"
2525
));
2626

2727
pub const MESSAGE_SENDER_ADDRESS: &str =
2828
"0xca400d3e7710eee293786830755278e6d2b9278b4177b8b1a896ebd5f55c10bc";
29-
pub const TEST_RECEIVER_CONTRACT_BINARY: &str = "./out/debug/contract_message_test.bin";
29+
pub const TEST_RECEIVER_CONTRACT_BINARY: &str = "./out/release/contract_message_test.bin";
3030

3131
/// Sets up a test fuel environment with a funded wallet
3232
pub async fn setup_environment(

scripts/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22

3-
forc build
3+
forc build --release
44
cargo run
55
turbo run build

scripts/check.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
pnpm forc fmt --check
44
cargo fmt --check
5-
pnpm forc build
5+
pnpm forc build --release
66
cargo clippy --all-features --all-targets -- -D warnings
77
pnpm prettier:check

0 commit comments

Comments
 (0)