Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 954 Bytes

README.md

File metadata and controls

48 lines (39 loc) · 954 Bytes

go-do-it

Commitment device written in Fe lang

Quick start

Setup

# Install Fe
brew install fe-lang/tap/fe

# Install Foundry
curl -L https://foundry.paradigm.xyz | bash

Test, Build, Deploy

# Test
fe test

# Build
fe build .

# Deploy by passing the compiled binary in --create
cast send --rpc-url $RPC_URL --private-key $PRIVATE_KEY --create $(cat output/GoDoIt/GoDoIt.bin)

Run on local blockchain

In another terminal

# Spin up a local blockchain with Anvil from Foundry
anvil

Test with commands from in Makefile

make build
make deploy
make senda1     # Add witness 1
make senda2     # Add witness 2
make checkm     # Check if majority rejects

make checkc     # Check arbiter's address
make sendc      # Change arbiter's address
make checkc     # Expect arbiter's address is different

Things left to do

Commiter's withdrawal is untested.
Witness' withdrawal is not yet written.