archethic-foundation / archethic-foundation/archethic-node

Smart Contracts: Stop the worker if the contract has no funds

Open
#993 0 comments 0 reactions 0 assignees View on GitHub
feature smart contracts
Dominant language
Elixir
Stars
82
Forks
24
PR merge metrics
No merged PRs in 30d

Description

### Is your feature request related to a problem?

There is no point in trying to run a contract that has no funds.
We should delete the worker as soon as it fails for `:insufficient_funds`.
We should create the worker as soon as the contract chain receive UCOs.

### Describe the solution you'd like

_No response_

### Additional context

Epic: #608

Contributor guide

Open the contributing guide

Research direction

Start by tracing the smart-contract worker path that handles :insufficient_funds and the contract-chain path that receives UCOs. The change is done when a worker is deleted after insufficient funds and is created again when the contract chain receives UCOs; review epic #608 for related context.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
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.