Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stephancill/portfolio-nft

On-chain NFT that allows users to track their crypto portfolio on a particular chain
https://github.com/stephancill/portfolio-nft

Last synced: 5 days ago
JSON representation

On-chain NFT that allows users to track their crypto portfolio on a particular chain

Awesome Lists containing this project

README

        

# Portfolio NFT

Allows the minter to track their ERC-20 token balances and USD values in an on-chain SVG
without relying on any third parties.

drawing

## Usage

```
yarn install
```

```
npx hardhat test
```

### Generate frontend ABIs

```
npx hardhat deploy --export-all ./client/src/contracts.json
```

## Testing

```
npx hardhat test
```

With external network forking:

```
FORK=polygon npx hardhat node --network hardhat
FORK=polygon npx hardhat --network localhost
```

### Frontend debugging with local chain

1. Start node

```
FORK=mainnet npx hardhat node --network hardhat
```

2. Export ABIs

```
FORK=mainnet npx hardhat deploy --export ./client/src/contracts.json --network localhost
```

## Deployment

### Checklist

- [ ] Use Flashbots RPC to avoid paying for failed transactions
- [ ] Confirm WETH symbol in `deploy/00_portfolio_nft.js`
- [ ] Set correct name and symbol in `deploy/00_portfolio_nft.js`
- [ ] Remove `hardhat/console.sol` imports
- [ ] Verify contract on Etherscan
- [ ] Verify contract on Sourcify

```
npx hardhat deploy --network
npx hardhat etherscan-verify --network
```