Skip to content

Commit

Permalink
Replace build script with use_content_literal flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ScreamingHawk committed Nov 26, 2024
1 parent cc6b1d3 commit 3f66a7d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 70 deletions.
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ solc = "0.8.19"
solc-version = "0.8.19"
via_ir = true
optimizer-runs = 20_000
use_literal_content = true

[profile.default.fuzz]
runs = 1_024
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"author": "Horizon Blockchain Games",
"license": "Apache-2.0",
"scripts": {
"build": "ts-node scripts/build.ts",
"build": "forge build --force",
"deploy": "ts-node scripts/deploy.ts",
"test": "forge test",
"coverage": "forge coverage --report lcov",
Expand Down
67 changes: 0 additions & 67 deletions scripts/build.ts

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const BUILD_DIR = 'build'
export const BUILD_DIR = 'out'
export const DEPLOYABLE_CONTRACT_NAMES = [
'ERC20ItemsFactory',
'ERC721ItemsFactory',
Expand Down
5 changes: 4 additions & 1 deletion scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ const main = async () => {

// Create contract for deployment
const compilerOutput = JSON.parse(
await readFile(join(BUILD_DIR, `${solFile}.json`), 'utf8'),
await readFile(
join(BUILD_DIR, `${solFile}.sol`, `${solFile}.json`),
'utf8',
),
)
class MyContractFactory extends ContractFactory {
constructor(signer?: Signer) {
Expand Down

0 comments on commit 3f66a7d

Please sign in to comment.