You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The token timelock example is important because it's a well understood simple concept that touches on how to work with tokens. I propose implementing a few simplifications/clarifications in order to enhance it's readability and usability as learning material:
Consistent naming: the folder is named timelock but the contract is called CalimbaleBalance. I suggest standardizing on token-timelock and TokenTimelockContract
Remove Timebound and only support "valid after" semantics
Support a single claimant instead of a vector of claimants
Migrate from deposit() to a p22 constructor
The text was updated successfully, but these errors were encountered:
Related to #359
Simplify the token timelock example by renaming, supporting a single claimant, and using a p22 constructor.
* **Renaming:**
- Rename the folder to `token-timelock`.
- Rename the contract to `TokenTimelockContract` in `token-timelock/src/lib.rs`.
* **Single Claimant Support:**
- Update `ClaimableBalance` struct to support a single claimant instead of a vector of claimants in `token-timelock/src/lib.rs`.
* **p22 Constructor:**
- Replace the `deposit` function with a p22 constructor named `__constructor` in `token-timelock/src/lib.rs`.
* **Time Bound:**
- Update `TimeBound` struct to only support "valid after" semantics in `token-timelock/src/lib.rs`.
* **Tests:**
- Update tests to use `TokenTimelockContract` and support a single claimant in `token-timelock/src/test.rs`.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/stellar/soroban-examples/issues/359?shareId=XXXX-XXXX-XXXX-XXXX).
The token timelock example is important because it's a well understood simple concept that touches on how to work with tokens. I propose implementing a few simplifications/clarifications in order to enhance it's readability and usability as learning material:
timelock
but the contract is calledCalimbaleBalance
. I suggest standardizing ontoken-timelock
andTokenTimelockContract
Timebound
and only support "valid after" semanticsdeposit()
to a p22 constructorThe text was updated successfully, but these errors were encountered: