Skip to content

Instantly share code, notes, and snippets.

@genecyber
Created March 17, 2022 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save genecyber/9021d36066eac63416085ebff5606200 to your computer and use it in GitHub Desktop.
Save genecyber/9021d36066eac63416085ebff5606200 to your computer and use it in GitHub Desktop.

Nft automations

Self held staking

  • wildcard mint
  • wildcard transfer Catcher
  • on mint registers deposit address
  • on transfer — check if _to is registered deposit address — distribute stake

Timelock

  • wildcard mint
  • wildcard claim (allow revert)
  • wildcard transfer (allow revert) Catcher
  • on mint — registers tokenid — registers block registered
  • on claim — if tokenId is time locked — if #blocks have passed do nothing — else revert
  • on transfer — if #blocks have passed do nothing — else if #transfer_locked — revert — else do nothing

Deadman switch

  • wildcard transfer Catcher
  • on transfer — check for when last updated — if expired send vault to destination
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment