Skip to content

Commit

Permalink
add yarn docs to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed May 27, 2024
1 parent 88118d7 commit 7661769
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"build": "yarn compile && npx del-cli dist abi && npx tsc || true && npx del-cli './dist/typechain-types/**/*.js' && npx cpx './data/**/*' dist/data && npx cpx './artifacts/contracts/**/*' ./abi && npx del-cli './abi/**/*.dbg.json'",
"compile": "npx hardhat compile --force",
"generate": "yarn compile && ./scripts/generate_go.sh || true && ./scripts/generate_addresses.sh && yarn lint:fix",
"docs": "forge doc",
"lint": "npx eslint . --ext .js,.ts",
"lint:fix": "npx eslint . --ext .js,.ts,.json --fix",
"prepublishOnly": "yarn build",
Expand All @@ -80,4 +81,4 @@
},
"types": "./dist/lib/index.d.ts",
"version": "0.0.8"
}
}
25 changes: 20 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ getAddress("zrc20", "zeta_mainnet", "USDT.BSC");
The third argument (symbol) is only used when querying ZRC-20 addresses to
specify which token address is needed.

To view a table of all contracts visit the [Contract Addresses](https://www.zetachain.com/docs/reference/contracts/) page in the docs.
To view a table of all contracts visit the [Contract
Addresses](https://www.zetachain.com/docs/reference/contracts/) page in the
docs.

Importing
[`ZetaInterfaces`](https://www.zetachain.com/docs/developers/cross-chain-messaging/connector/)
Expand All @@ -42,8 +44,8 @@ import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.so
import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaInteractor.sol";
```

Importing [ZRC20](https://www.zetachain.com/docs/developers/tokens/zrc20/)
and the [system
Importing [ZRC20](https://www.zetachain.com/docs/developers/tokens/zrc20/) and
the [system
contract](https://www.zetachain.com/docs/developers/omnichain/system-contract/)
for omni-chain smart contracts:

Expand All @@ -55,12 +57,14 @@ import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol";

## Prerequisites for Development

Before you can contribute to this project, you must have the following installed:
Before you can contribute to this project, you must have the following
installed:

- [Node.js](https://nodejs.org/)
- [Yarn](https://yarnpkg.com/)
- [jq](https://stedolan.github.io/jq/)
- [abigen](https://geth.ethereum.org/docs/tools/abigen)
- [forge](https://getfoundry.sh/)

## Compiling Contracts

Expand All @@ -75,7 +79,8 @@ to the `artifacts` directory.

## Generating Go Bindings and Contract Addresses

To generate Go bindings for the Solidity contracts and fetch, run the following command:
To generate Go bindings for the Solidity contracts and fetch, run the following
command:

```
yarn generate
Expand All @@ -84,6 +89,16 @@ yarn generate
This will use `abigen` to generate Go bindings for the contracts and output the
resulting Go files to the `pkg` directory.

## Generating Contract Docs

To generate the docs from protocol contracts, run the following command:

```
yarn docs
```

This script uses `forge doc` to generate the docs.

## Contributing

If you would like to contribute to this project, please fork the repository and
Expand Down

0 comments on commit 7661769

Please sign in to comment.