From 08a0c309c0dcc70c7e22aafdea4cde7ba5390f73 Mon Sep 17 00:00:00 2001 From: Arun Jangra Date: Mon, 25 Nov 2024 08:37:11 +0530 Subject: [PATCH] updated makefile and ERC20 --- Makefile | 7 ++++++- build-artifacts/starkgate-contracts/foundry.toml | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 build-artifacts/starkgate-contracts/foundry.toml diff --git a/Makefile b/Makefile index 25e0e01..1977f9d 100644 --- a/Makefile +++ b/Makefile @@ -43,13 +43,18 @@ starkgate-contracts-latest: FILES=$$(cat src/solidity/files_to_compile.txt) && \ solc $$FILES --allow-paths .=., --optimize --optimize-runs 200 --overwrite --combined-json abi,bin -o artifacts && \ ./scripts/extract_artifacts.py + # building ERC20 + cp build-artifacts/starkgate-contracts/foundry.toml lib/starkgate-contracts/starkware/solidity/foundry.toml && \ + cd lib/starkgate-contracts/starkware/solidity && \ + echo "pragma solidity ^0.8.0; import \"./ERC20.sol\"; contract ERC20_1 is ERC20 {}" > ./tokens/ERC20/ERC20_1.sol && \ + forge build # Copying Contracts : mkdir -p artifacts/starkgate-contracts cp lib/starkgate-contracts/artifacts/StarkgateManager.json artifacts/starkgate-contracts/StarkgateManager.json cp lib/starkgate-contracts/artifacts/StarkgateRegistry.json artifacts/starkgate-contracts/StarkgateRegistry.json cp lib/starkgate-contracts/artifacts/Proxy.json artifacts/starkgate-contracts/Proxy_5_0_0.json cp lib/starkgate-contracts/artifacts/StarknetTokenBridge.json artifacts/starkgate-contracts/StarknetTokenBridge.json - cp lib/starkgate-contracts/artifacts/ERC20.json artifacts/starkgate-contracts/ERC20.json + cp lib/starkgate-contracts/starkware/solidity/out/ERC20_1.sol/ERC20_1.json artifacts/starkgate-contracts/ERC20.json starkgate-contracts-old: # Configure solidity version diff --git a/build-artifacts/starkgate-contracts/foundry.toml b/build-artifacts/starkgate-contracts/foundry.toml new file mode 100644 index 0000000..a95b4a4 --- /dev/null +++ b/build-artifacts/starkgate-contracts/foundry.toml @@ -0,0 +1,5 @@ +[profile.default] +src = "./tokens/" +out = "out" +solc = "0.8.27" +evm_version = "cancun"