Skip to content

litentry/DynamicAssertion

Repository files navigation

  1. Description

    Dynamic VC assertion contract written by solidity, using Hardhat for compile and test.

    Environment setup

    • Install nvm
    • Inside the repository, run nvm use to set the correct Node version.
      • If the version is not installed, run nvm install.

    Installation

    nvm use
    corepack enable pnpm
    pnpm install

    Usage

    Compile

    1. Using hardhat.
    pnpm compile

    After compiled, the contract bytecode will generate in file artifacts/contracts/**/{contractName}.sol/{contractName}.json, e.g. the bytecode of A1 is in the file artifacts/contracts/A1.sol/A1.json.

    1. Using Remix IDE.

    Should use the dynamic as your project root path in Remix IDE as below:

    remixd -s your_repo_path/tee-worker/litentry/core/assertion-build/src/dynamic --remix-ide https://remix.ethereum.org

    If you have not install remixd before, rub below script to install it.

    npm install -g @remix-project/remixd

    Testing

    • Test all: pnpm test.
    pnpm test
    • Test single file: pnpm test {testFilePath}.

    Example:

    pnpm test tests/token-holding-amount.ts

    Vc DI tests(integration tests)

    1. Start parachain&&worker
    2. pnpm install
    3. pnpm --filter integration-tests run test assertion_contracts.test.ts

About

Litentry Dynamic Assertion Contracts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published