ABI and calldata
Signatures
open((string,string,string,string,(string,string,string,string,string),address,uint16,bool,bytes32,bytes32),(uint64,uint96,uint96,uint96,uint256,uint256))
launch(uint256,(string,string,string,string,(string,string,string,string,string),address,uint16,bool,bytes32,bytes32))
join(uint256) leave(uint256) claim(uint256) refund(uint256) cancel(uint256) reclaim(uint256)
claimFor(uint256,address[]) shareOf(uint256,address) failed(uint256) flocks(uint256) deposits(uint256,address) count()
With cast
cast calldata "open((string,string,string,string,(string,string,string,string,string),address,uint16,bool,bytes32,bytes32),(uint64,uint96,uint96,uint96,uint256,uint256))" \
'("Name","TICK","ipfs://...","description",("https://x.com/...","","","https://...",""),0xCREATOR,200,false,0xECONOMICS,0xSALT)' \
'(1800003600,50000000000000000,100000000000000000,200000000000000000,0,546000000000000000000000000)'
The params hash
paramsHash = keccak256(abi.encode(params)), where abi.encode of a single dynamic struct is the offset 0x20 followed by the tuple. Compute it with cast keccak $(cast abi-encode "f((string,...))" '(...)'), or with A.paramsHash. launch reverts with BadParams if it does not match what open stored.
Reading the Opened event
The Opened log carries everything needed to launch: data = (bytes32 paramsHash, Terms terms, bytes encodedParams), with encodedParams = abi.encode(params). Topic 1 is the flock id, topic 2 the creator. A.decodeOpened returns the params ready to be passed back to encodeLaunch.
The flocks(id) getter
creator, state(0 open, 1 launched, 2 cancelled), deadline, minTotal, size, maxPerWallet,
total, used, reserve, launchConfigId, minTokensPerEth, paramsHash, token, curve, tokensOut, reserveLeft