Open ryardley opened 1 week ago
running local hardhat network:
yarn hardhat node
— will deploy enclave and mock contracts
then you can run this to add a ciphernode
yarn run hardhat ciphernode:add --network localhost --ciphernode-address [0xaddress]
then you can run this to request a committee using the mock contracts
yarn run hardhat committee:new --network localhost
if you want to run it agains a specific E3, all the args can be set:
Usage: hardhat [GLOBAL OPTIONS] committee:new [--compute-params <STRING>] [--duration <INT>] [--e3-address <STRING>] [--e3-params <STRING>] [--filter <STRING>] [--threshold-quorum <INT>] [--threshold-total <INT>] [--window-end <INT>] [--window-start <INT>]
OPTIONS:
--compute-params parameters for the compute provider (default: "0x000000000000000000000000404af1c0780a9269e4d3308a0812fb87bf5fc490")
--duration duration in seconds of the E3 (default: 1 day) (default: 86400)
--e3-address address of the E3 program
--e3-params parameters for the E3 program (default: "0x0000000000000000000000009f3ebc4f6be495901a29bba2ae5a45fb870cdc14")
--filter address of filter contract to use
--threshold-quorum threshold quorum for committee (default: 2)
--threshold-total threshold total for committee (default: 2)
--window-end timestamp end of window for the E3 (default: now + 1 day) (default: 1726676828)
--window-start timestamp start of window for the E3 (default: now) (default: 1726590428)
yarn hardhat node
./ciphernode --addr 0xfffff...fff --evm ws://127.0.0.1:8545
yarn ciphernode:add --network hardhat
yarn requestCommittee --e3Id 1234 --filter 0x123...abc --threshold-quorum 3 --threshold-total 5
./calculate-encrypted-output --pubkey 3mBYfk...9Lw2XqR
yarn publishCiphertextOutput --e3Id xxxxx --data yyyyy