massalabs / massalabs/DeWeb

Allow custom recipient of freed coins

Open
#334 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11
Forks
2
PR merge metrics
No merged PRs in 30d

Description

I would like to extend the deweb smart contract to allow setting a different recipient of the coins locked in a deweb page.
Can someone give me directions on how this could be done?

I have located the code for the pages `purge()` call, but can't find the source for the `balance()` function: https://github.com/massalabs/DeWeb/blob/e0f4f478821268d5c790aa4c67d9a5fbb4c3ee97/smart-contract/assembly/contracts/deweb-interface.ts#L343

Can someone give me a hint where I can find it?
Also, how would the alternate recipient's address ideally be stored?

Extending the smart contract this way (ideally not as a fork?) could for example enable offering fiat onramps for a deweb page registry, but without the need to kyc customers. Otherwise, a deweb page registry with anonymous fiat onramp could be used as a means for money laundering.

Looking forward to your thoughts!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with smart-contract/assembly/contracts/deweb-interface.ts at the mentioned balance() entry point, and trace how it relates to the page purge() call. Determine where the contract currently assigns freed coins and how an alternate recipient address could be represented; done means the requested recipient behavior and storage approach are specified and implemented without relying on an external fork.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.