Skip to content

Commit

Permalink
Add Some Details of Readme (#47)
Browse files Browse the repository at this point in the history
* add readme for tests

* add docs in README
  • Loading branch information
fanyang1988 authored Aug 2, 2021
1 parent aafd551 commit dce840e
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

Metis is inspired by the [OpenZeppelin-Contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) from the Ethereum ecosystem. Metis will develop the corresponding version of the ink! implementation for each newly generated ink! contract standard. Metis will be audited at the same time to ensure the security of the contract. Metis will also be able to be easily searched and downloaded just like Solidity development, and integrated into the developer's project as a Redspot plug-in.

To use the Metis, can see the [documentation](https://patractlabs.github.io/metis/overview.html).

Proposal(M1): https://polkadot.polkassembly.io/post/469
50 changes: 50 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,51 @@
# Metis Examples

## Build

At first we need build the contracts, note the examples may call each other, so it need build all contracts.

```bash
yarn .
yarn build
```

If build is success, it will be artifacts in `example/artifacts`:

```bash
ll ./artifacts
total 2.5M
-rw-rw-r-- 1 user user 92K 7月 30 17:59 access_control.contract
-rw-rw-r-- 1 user user 23K 7月 30 17:59 access_control.json

...
```

## Run Tests

To run tests, we need run a europa node for envirment:

```bash
europa --tmp --dev
```

To install the europa, can look at [europa](https://github.com/patractlabs/europa), Note the params must be `--tmp --dev`, some testcases will depend on the init Token for test accounts.

As the testcases is large, so we need run tests for each contract:

```bash
npx redspot test ./tests/token/erc721.test.ts
npx redspot test ./tests/token/erc721.burnable.test.ts
npx redspot test ./tests/token/erc721.enumerable.test.ts
npx redspot test ./tests/token/erc721.pausable.test.ts
npx redspot test ./tests/token/erc721.urlstorage.test.ts
npx redspot test ./tests/token/erc777.test.ts
npx redspot test ./tests/token/erc1155.test.ts
npx redspot test ./tests/governance/timelock_controller.test.ts
npx redspot test ./tests/security/reentrancy-guard.test.ts
npx redspot test ./tests/access-control/access-control.test.ts
npx redspot test ./tests/access-control/ownable.test.ts
npx redspot test ./tests/tools/erc165.test.ts
npx redspot test ./tests/utils/escrow.test.ts
```

Use `yarn test` may error by too mush testcases.

0 comments on commit dce840e

Please sign in to comment.