cairo-contracts icon indicating copy to clipboard operation
cairo-contracts copied to clipboard

ERC20 Token time lock

Open AbdelStark opened this issue 2 years ago • 7 comments

🧐 Motivation

A token holder contract that will allow a beneficiary to extract the tokens after a given release time.

📝 Details

Useful for simple vesting schedules like "advisors get all of their tokens after 1 year".

Solidity implementation in OpenZeppelin repository

AbdelStark avatar Apr 27 '22 12:04 AbdelStark

I'll start working on a PR @martriay

AbdelStark avatar Apr 27 '22 12:04 AbdelStark

Please hold on for a bit. We already have plans for a Timelock implementation very soon, let’s try to avoid duplicate efforts. Once the timelock is in place, you can work on the token impl :)

On Wed, Apr 27, 2022 at 2:44 PM Abdelhamid Bakhta @.***> wrote:

I'll start working on a PR @martriay https://github.com/martriay

— Reply to this email directly, view it on GitHub https://github.com/OpenZeppelin/cairo-contracts/issues/288#issuecomment-1110955742, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM77FYQBRLMY6HAWUUNL7LVHEZCFANCNFSM5UO5OGHA . You are receiving this because you were mentioned.Message ID: @.***>

martriay avatar Apr 27 '22 12:04 martriay

Ouch, I already started the implementation before seeing your reply. But never mind I will just let the PR as a draft PR and I will redo the implementation once your TimeLock implementation is ready. Link of the draft PR: #289

AbdelStark avatar Apr 27 '22 13:04 AbdelStark

Please hold on for a bit. We already have plans for a Timelock implementation very soon, let’s try to avoid duplicate efforts. Once the timelock is in place, you can work on the token impl :) On Wed, Apr 27, 2022 at 2:44 PM Abdelhamid Bakhta @.> wrote: I'll start working on a PR @martriay https://github.com/martriay — Reply to this email directly, view it on GitHub <#288 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM77FYQBRLMY6HAWUUNL7LVHEZCFANCNFSM5UO5OGHA . You are receiving this because you were mentioned.Message ID: @.>

As a side note, is there a way to mock the block.timestamp with nile ? Like warp function in protostar.

AbdelStark avatar Apr 27 '22 13:04 AbdelStark

No there is not, since Nile uses starknet-devnet which doesn't support it. It'd be nice to open an issue to add that somehow.

martriay avatar Apr 27 '22 21:04 martriay

No there is not, since Nile uses starknet-devnet which doesn't support it. It'd be nice to open an issue to add that somehow.

Opened an issue: https://github.com/Shard-Labs/starknet-devnet/issues/94

AbdelStark avatar Apr 28 '22 07:04 AbdelStark

No there is not, since Nile uses starknet-devnet which doesn't support it. It'd be nice to open an issue to add that somehow.

Opened an issue: Shard-Labs/starknet-devnet#94

https://github.com/Shard-Labs/starknet-devnet/issues/94#issuecomment-1112388222

AbdelStark avatar Apr 28 '22 16:04 AbdelStark

Closing this since it's the library's policy not to implement customized or "flavored" presets like this one, Wizard for Cairo should be used instead (once we implement #13).

martriay avatar Mar 21 '24 03:03 martriay