Botyard
Docs

Contracts

One contract holds every lease. It is the record of who pays for which bot and for how long.

Chain id 4663. The source is verified on Sourcify.

For lease owners

BotyardLeases
function quote(uint256 planId, uint256 seconds) view returns (uint256 pricePerDay, uint256 deposit)
function open(uint256 planId, uint256 seconds) returns (uint256 id)     // 1 to 90 days
function extend(uint256 id, uint256 seconds)                            // 1 to 90 more days
function close(uint256 id)                                              // stops the meter now
function settleExpired(uint256 id)                                      // anyone, 3 days after the end
function getLease(uint256 id) view returns (Lease)
function leasesOf(address who) view returns (uint256[])
function liveLimitOf(address who) view returns (uint256)               // 3, or 10 for holders

For the worker

Keeper
function settle(uint256 id, uint256 usedSeconds)   // charge the used time, refund the rest

The charge is split by burnBps (2000, so 20%) between the burn vault and the treasury, in the same transaction as the refund.

Owner powers

  • setPlan: set or retire a plan and its price per day. A lease keeps the price it opened with.
  • setKeeper, setTreasury, setBurnVault, setBurnBps (at most 50%).
  • setLimits: live bots per wallet, per holder wallet, and in total.
  • setOpenPaused: pause new leases. Running leases, close and settleExpired keep working.
  • setToken: the $YARD address, once. setHolderThreshold: the balance that makes a holder.

No owner function can move a lease's deposit anywhere but to its owner, the treasury and the burn vault through a settlement.