curl -L https://foundry.paradigm.xyz | bash ##then run
foundryup
forge install foundry-rs/forge-std --no--commit
forge install OpenZeppelin/[email protected] --no-commit
First, import private key
cast wallet import defaultKey --interactive
Second, set the rpc url in .env file, for example:
SKALE_TITAN_HUB_RPC_URL=https://testnet.skalenodes.com/v1/aware-fake-trim-testnet
run
source .env
then deploy MyNFT contract, replace 0x755... with your public key
forge script DeployMyNFT --account defaultKey --sender 0x755AC4E90c24135f1B7f73AeEA6a7ff42b07dd94 --rpc-url $SKALE_TITAN_HUB_RPC_URL --broadcast --legacy
Third, set your environment variables in .env, see .env.example file, run:
source .env
forge script DeployMarketplace --account defaultKey --sender 0x755AC4E90c24135f1B7f73AeEA6a7ff42b07dd94 --rpc-url $SKALE_TITAN_HUB_RPC_URL --broadcast --legacy
MyNFT contract address: 0xD887c912a722D2AC4ACB21E3a3A774651Bc2cF57
Marketplace contract address: 0xE782Ed2880675cc398b23FB405EB85E1502F89b5