Giter Site home page Giter Site logo

build-copy's Introduction

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

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

Deploy

❯ forge create --rpc-url https://base-sepolia.g.alchemy.com/v2/mwGPVe9op8x1I6WTVgDo2qjRbbEmQbSV \                                                                                                    ─╯
   --constructor-args build-copy bc 10000000000 0x3ae6c93C96e0366b899bEe8e286a6946a9DAd52b  \
  --private-key $PRIVATE_KEY --etherscan-api-key $PRIVATE_KEY --verify \
  src/GovernableToken.sol:GovernableERC20
[⠆] Compiling...
No files changed, compilation skipped
Deployer: 0x3ae6c93C96e0366b899bEe8e286a6946a9DAd52b
Deployed to: 0x0e6C43c2ef6cd5FF413d906E32f3A55c5b993c56
Transaction hash: 0x2fd4705f8c9da7edcf46fea3d2afda317560308ba272bd0c324cbf5fa188087b
Starting contract verification...
Waiting for etherscan to detect contract deployment...
Start verifying contract `0x0e6C43c2ef6cd5FF413d906E32f3A55c5b993c56` deployed on base-sepolia

Submitting verification for [src/GovernableToken.sol:GovernableERC20] 0x0e6C43c2ef6cd5FF413d906E32f3A55c5b993c56.
Encountered an error verifying this contract:
Response: `NOTOK`
Details: `Invalid API Key`

# verify contract on etherscan
❯ forge verify-contract --chain-id 84532 \                                                                                                                                                           ─╯
  --watch \
  --etherscan-api-key $ETHERSCAN_API_KEY \
  0x0e6C43c2ef6cd5FF413d906E32f3A55c5b993c56 \
  src/GovernableToken.sol:GovernableERC20 --constructor-args $(cast abi-encode "constructor(string, string, uint256, address)"  "build-copy" "bc" 10000000000 0x3ae6c93C96e0366b899bEe8e286a6946a9DAd52b)
Start verifying contract `0x0e6C43c2ef6cd5FF413d906E32f3A55c5b993c56` deployed on base-sepolia

Submitting verification for [src/GovernableToken.sol:GovernableERC20] 0x0e6C43c2ef6cd5FF413d906E32f3A55c5b993c56.
Submitted contract for verification:
        Response: `OK`
        GUID: `ddy3tfwflcvy9uesbfkgqzp1cmyix7ncdlxritzzhezqxcimxd`
        URL: https://sepolia.basescan.org/address/0x0e6c43c2ef6cd5ff413d906e32f3a55c5b993c56
Contract verification status:
Response: `NOTOK`
Details: `Pending in queue`
Contract verification status:
Response: `OK`
Details: `Pass - Verified`
Contract successfully verified

build-copy's People

Watchers

ttang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.