cuckoo

Start

Quickstart

From nothing to a landed egg on a local node, with the CLI.

You need Node 20 or later. Everything below runs on a local test node. The same commands work on a real chain with --rpc.

1. Get the code

git clone https://github.com/ProtoCuckoo/Cuckoo
cd Cuckoo
npm install

2. A key and a deployment

node cli/cuckoo.mjs wallet new
set CUCKOO_KEY=0x...funded key
node cli/cuckoo.mjs deploy
{ "nest": "0x83821aCc...6F7C" }
set CUCKOO_NEST=0x83821aCc...6F7C
node cli/cuckoo.mjs deposit 3

3. Sign an egg

node cli/cuckoo.mjs block
{ "clock": "85989246" }
node cli/cuckoo.mjs egg buy --curve 0xCURVE --eth 0.5 --block 85989300 --window 2 --reward 0.002 --file egg.json

This signs a Pons-style buy(quoteIn, minOut, recipient) that must land in blocks 85989300 to 85989302.

4. Run a keeper (or let someone else)

node cli/cuckoo.mjs keeper egg.json --lead 0
{ "block": 85989300, "landed": true }

Anyone can run it: the reward goes to whoever lands first. You can also carry your own egg with cuckoo hatch egg.json.

5. Change your mind

node cli/cuckoo.mjs cancel 1717000000000   # burns the egg with that nonce
node cli/cuckoo.mjs withdraw 1