archethic-foundation / archethic-foundation/archethic-node
Run SC on simple transaction
- Dominant language
- Elixir
- Stars
- 82
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
### Is your feature request related to a problem?
On a Wallet, it can be interesting to do some actions when a transaction is sent
We can for example:
- decline the transaction as not compliant with criteria
Ex: refuse NFT, Token, UCO transfer if < to an amout, after or before a date etc..
-automatically distribute a transfer to other addresses
plenty of use case
We can manage this via a SC but the SC can be called only via recipient
### Describe the solution you'd like
The expectation is that we can place a SC on a Wallet and each time a transaction is sent to this Wallet, the SC is launched to validate the transaction.
Use case for Test
- create a wallet with a SC accepting only 5 UCOs transfer
- Send 5 UCOs from another Wallet => accepted
- Send 7 UCOs from another Wallet => refused
### Additional context
_No response_
Contributor guide
Research direction
Start by tracing how transactions sent to a wallet are validated and how smart contracts are currently invoked. Define the integration point for running a wallet's contract before accepting a transaction, then verify the stated cases: a 5 UCO transfer is accepted and a 7 UCO transfer is refused.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100