Skip to content

Commit

Permalink
feat: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bl0up authored Jun 14, 2024
1 parent c6d9ea4 commit 3456887
Showing 1 changed file with 44 additions and 27 deletions.
71 changes: 44 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ERC20
# ERC721a

A basic ERC20 token contract.
An ERC721 token contract.

## Get started

Expand All @@ -9,10 +9,10 @@ Launch this smart contract set in the SettleMint Blockchain Transformation platf
If you want to use it separately, bootstrap a new project using

```shell
forge init my-erc20-token --template settlemint/solidity-token-erc20
forge init my-erc721a-token --template settlemint/solidity-token-erc721a
```

## DX: Foundry
## DX: Foundry & Hardhat hybrid

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

Expand All @@ -23,75 +23,92 @@ Foundry consists of:
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
- **Chisel**: Fast, utilitarian, and verbose solidity REPL.

**Hardhat is a Flexible, Extensible, Fast Ethereum development environment for professionals in typescript**

Hardhat consists of:

- **Hardhat Runner**: Hardhat Runner is the main component you interact with when using Hardhat. It's a flexible and extensible task runner that helps you manage and automate the recurring tasks inherent to developing smart contracts and dApps.
- **Hardhat Ignition**: Declarative deployment system that enables you to deploy your smart contracts without navigating the mechanics of the deployment process.
- **Hardhat Network**: Declarative deployment system that enables you to deploy your smart contracts without navigating the mechanics of the deployment process.

## Documentation

- https://console.settlemint.com/documentation/docs/using-platform/integrated-development-environment/
- https://book.getfoundry.sh/
- <https://console.settlemint.com/documentation/docs/using-platform/integrated-development-environment/>
- <https://book.getfoundry.sh/>

## Usage

### Build

You can either use Forge:

```shell
$ forge build
btp-scs foundry build
```

### Test
or Hardhat:

```shell
$ forge test
btp-scs foundry build
```

### Format
### Test

With Forge:

```shell
$ forge fmt
btp-scs foundry test
```

### Gas Snapshots
or Hardhat:

```shell
$ forge snapshot
btp-scs hardhat test
```

### Anvil
### Format

Anvil is a local development node, open a terminal in the IDE and launch anvil. You can then deploy to it using `make deploy-anvil`
To format your contracts, run

```shell
$ anvil
btp-scs foundry format
```

### Deploy
### Deploy to local network

Deploy to a local anvil node:
You can deploy your contracts to a local network. First, run

```shell
$ make deploy-anvil
btp-scs hardhat network
```

Deploy to the connected platform node:
then:

```shell
$ make deploy-btp
btp-scs hardhat deploy local -m <DEPLOYMENT_MODULE>
```

### Cast
### Deploy to platform network

You can also deploy your contracts to the network running on the platform by executing the following command:

```shell
$ cast <subcommand>
btp-scs hardhat deploy remote -m <DEPLOYMENT_MODULE>
```

### Deploy your subgraph

To index your smart contract events, use The Graph middleware.
First, edit `subgraph.config.json` to set the addresses of your smart contracts. You can find them in the deployment folder created under `ignation`. Then, run:

```shell
$ make subgraph
btp-scs subgraph deploy
```

### Help

To get info about the tasks, run:

```shell
$ forge --help
$ anvil --help
$ cast --help
btp-scs --help
```

0 comments on commit 3456887

Please sign in to comment.