GalaChain / GalaChain/sdk

Lock fungible tokens on another's behalf with valid lock allowance

Open
#362 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
138
Forks
44
Avg merge
1d 16h
Merged PRs (30d)
22

Description

`LockToken` does not currently support locking fungible tokens unless the calling user is the owner.

https://github.com/GalaChain/sdk/blob/main/chaincode/src/locks/lockTokens.ts#L99C1-L104C6

```
// for initial support of fungible tokens, require owner to be the caller.
if (tokenInstanceKey.isFungible()) {
throw new NotImplementedError("LockToken is not supported for fungible tokens", {
instanceKey: tokenInstanceKey.toStringKey()
});
}
```

This issue tracks testing and adding support for this functionality.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read chaincode/src/locks/lockTokens.ts around lines 99-104, starting with the current fungible-token guard and how lock allowances are represented or validated nearby. Add support for locking fungible tokens on another user's behalf when a valid lock allowance exists, and add tests covering the supported and rejected cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.