From efc2e369dae9bb36a0f7ae150e6d84a89fef3a6a Mon Sep 17 00:00:00 2001 From: samepant Date: Fri, 20 Sep 2024 13:46:51 -0400 Subject: [PATCH] fix publish env vars, better readme --- .github/workflows/publish-evm.yml | 5 ++-- packages/evm/README.md | 46 +++++++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-evm.yml b/.github/workflows/publish-evm.yml index 9bd86220..a9952b6c 100644 --- a/.github/workflows/publish-evm.yml +++ b/.github/workflows/publish-evm.yml @@ -5,8 +5,9 @@ on: types: [created] env: - HARDHAT_VAR_MNEMONIC: "test test test test test test test test test test test junk" - HARDHAT_VAR_INFURA_API_KEY: "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" + MNEMONIC: "test test test test test test test test test test test junk" + INFURA_API_KEY: "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" + ETHERSCAN_API_KEY: "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" jobs: publish-npm: diff --git a/packages/evm/README.md b/packages/evm/README.md index 3f0bbb0b..3a71d386 100644 --- a/packages/evm/README.md +++ b/packages/evm/README.md @@ -1,5 +1,28 @@ # Enclave EVM +## Importing the contracts, interfaces or types + +To install, run + +``` +yarn add @gnosis-guild/enclave +``` + +If writing a new E3 program, you can import the necessary interfaces by writing +something similar to: + +``` +import { + IE3Program, + IInputValidator, + IDecryptionVerifier +} from "../interfaces/IE3Program.sol"; + +contract MockE3Program is IE3Program {...} +``` + +[Check out the E3 mock for an example](./contracts/test/MockE3Program.sol) + ## To deploy ``` @@ -19,8 +42,27 @@ To add a ciphernode to the registry, run yarn ciphernode:add --network [network] --ciphernode-address [address] ``` -To remove a ciphernode, run +To request a new committee, run + +``` +yarn run hardhat committee:new --network [network] \ +``` + +To publish the public key of a committee, run + +``` +yarn run hardhat --network [network] committee:publish --e3-id [e3-id] --nodes [node address], +[node address] --public-key [publickey] \ +``` + +To activate an E3, run + +``` +yarn run hardhat --network [network] e3:activate --e3-id [e3-id] \ +``` + +To publish an input for an active E3, run ``` -yarn ciphernode:remove --network [network] --ciphernode-address [address] +yarn run hardhat --network [network] e3:publishInput --e3-id [e3-id] --data [input data] ```