Closed ShaneOxM closed 5 months ago
Current Makefile:
-include .env
.PHONY: all test clean deploy fund help install snapshot format anvil
DEFAULT_ANVIL_KEY := 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
help:
@echo "Usage:"
@echo " make deploy [ARGS=...]\n example: make deploy ARGS=\"--network sepolia\""
@echo ""
@echo " make fund [ARGS=...]\n example: make deploy ARGS=\"--network sepolia\""
all: clean remove install update build
# Clean the repo
clean :; forge clean
# Remove modules
remove :; rm -rf .gitmodules && rm -rf .git/modules/* && rm -rf lib && touch .gitmodules && git add . && git commit -m "modules"
install :; forge install Cyfrin/foundry-devops@0.1.0 --no-commit && forge install foundry-rs/forge-std@v1.5.3 --no-commit && forge install openzeppelin/openzeppelin-contracts@v4.8.3 --no-commit
# Update Dependencies
update:; forge update
build:; forge build
test :; forge test
snapshot :; forge snapshot
format :; forge fmt
anvil :; anvil -m 'test test test test test test test test test test test junk' --steps-tracing --block-time 1
NETWORK_ARGS := --rpc-url http://localhost:8545 --private-key $(DEFAULT_ANVIL_KEY) --broadcast
ifeq ($(findstring --network sepolia,$(ARGS)),--network sepolia)
NETWORK_ARGS := --rpc-url $(SEPOLIA_RPC_URL) --private-key $(PRIVATE_KEY) --broadcast --verify --etherscan-api-key $(ETHERSCAN_API_KEY) -vvvv
endif
deploy:
@forge script script/DeployBasicNft.s.sol:DeployBasicNft $(NETWORK_ARGS)
mint:
@forge script script/Interactions.s.sol:MintBasicNft $(NETWORK_ARGS)
Current Foundry.toml:
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
ffi = true
fs_permissions = [
{ access = "read", path = "./images/" },
{ access = "read", path = "./broadcast" },
]
remappings = ['@openzeppelin/contracts=lib/openzeppelin-contracts/contracts']
[etherscan]
mainnet = { key = "${ETHERSCAN_API_KEY}" }
sepolia = { key = "${ETHERSCAN_API_KEY}" }
[rpc_endpoints]
sepolia = "${SEPOLIA_RPC_URL}"
# See more config options https://github.com/foundry-rs/foundry/tree/master/config
Issue Resolved:
I had misplaced my Interactions.s.sol
script in the tests rather then correctly under scripts, leading to a incorrect path reference.
Operating System
Windows
Describe the bug
Hello,
I have been working on resolving an issue with the "make mint" command in the Foundry-Nft-F23 lesson.
After reading a resolved issue, I noted Patrick's mentioning removing the "get_recent_deployement.sh" file from the current version for security purposes".
I have verified that my foundry.toml permissions are set correctly per the updated README.md, but still have had no luck getting the
make mint ARGS="--network sepolia
to run.Here is the error I receive:
Running:
make deploy ARG="--network sepolia
works perfectly fine, only see the os error when running "mint"Thanks in advance for the help here.