hindley-milner-systems / dapp-ertp-airdrop

0 stars 2 forks source link

contract shutdown operations #41

Open tgrecojs opened 5 months ago

tgrecojs commented 5 months ago

in order to properly shut down the contract, we first need to:

  1. burn any tokens that still remain with the conract's airdropPurse
  2. write any metrics to vstorage that need recording
  3. zcf.shutdown('insert any last words...')
linear[bot] commented 5 months ago

LAR-97 contract shutdown operations

dckc commented 4 months ago

when (under what conditions) does the contract shut down?

tgrecojs commented 4 months ago

working on getting the fine print on this.

here are some possible scenarios:

  1. a predetermined time range during which users can claim tokens has elapsed.
  2. the number of tokens minted has reached the contracts predetermined maximum supply cap.

note: I'm not sure if these scenarios warrant a complete contract shutdown, or if there is a better approach to take (at some point in time when contract must cease to make certain operations available).

dckc commented 4 months ago

Having the contract shut down is desirable, since it frees up resources.

tgrecojs commented 4 weeks ago

I've recently added this in one of the timer-based methods. The gist of it is - it ensures that the contract shuts down once the clock has struck midnight for the final epoch in an airdrop. @dckc

https://github.com/hindley-milner-systems/dapp-ertp-airdrop/blob/2e6ed388628ad782cc483a3d5fb8742221e74b7f/contract/src/airdrop/airdropKitCreator.js#L203-L205

dckc commented 4 weeks ago

nifty.

I'm curious why this is still open. Did you mean to close it? Or is there more to do? a test or something?