Skip to content

iamefe/creativeferry_nftmarketplace

Repository files navigation

Foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.

Foundry consists of:

  • Forge: Ethereum testing framework (like Truffle, Hardhat and DappTools).
  • Cast: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
  • Anvil: Local Ethereum node, akin to Ganache, Hardhat Network.
  • Chisel: Fast, utilitarian, and verbose solidity REPL.

Documentation

https://book.getfoundry.sh/

Usage

Install Foundry

curl -L https://foundry.paradigm.xyz | bash

Build

$ forge build

Test

$ forge test

Format

$ forge fmt

Gas Snapshots

$ forge snapshot

Anvil

$ anvil

Deploy

$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>

Cast

$ cast <subcommand>

Help

$ forge --help
$ anvil --help
$ cast --help

Install OpenZepplin's upgraddeable contracts

$ forge install OpenZeppelin/openzeppelin-contracts-upgradeable --no-commit

Install OpenZepplin's contracts

$ forge install OpenZeppelin/openzeppelin-contracts --no-commit

The --no-commit flag prevents the following error:

Error:
The target directory is a part of or on its own an already initialized git repository,
and it requires clean working and staging areas, including no untracked files.

Check the current git repository's status with `git status`.
Then, you can track files with `git add ...` and then commit them with `git commit`,
ignore them in the `.gitignore` file, or run this command again with the `--no-commit` flag.

If none of the previous steps worked, please open an issue at:
https://github.com/foundry-rs/foundry/issues/new/choose

Remappings

@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/

Code formatting

"solidity.formatter": "prettier",
  "workbench.sideBar.location": "right",
#   "solidity.compileUsingRemoteVersion": "v0.8.20+commit.a1b79de6",
  "[solidity]": {
    "editor.defaultFormatter": "JuanBlanco.solidity",
    "editor.formatOnSave": true
  }

Address of contract on the Sepolia testnet:

0xdAfAE67401db66dbe591d2A400e987416133Df6F

Deploying

$ forge script script/DeployNFTMarketplace.s.sol:DeployNFTMarketplace --rpc-url sepolia --broadcast

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published