Ledger 纯文本记账
Ledger 纯文本记账:通过字节码驱动的复式记账引擎,支持多币种账户余额实时查询和资金来源的FIFO分配追踪。 含 15 条反模式约束。
晶体简介
Constraints
Evidence Quality
Medium confidence — review before critical use
82 条不可违反的约束
WHENWhen implementing Numscript monetary calculations
ACTIONuse MonetaryInt based on *big.Int to represent monetary amounts
CONSEQUENCEUsing float64 for monetary amounts causes rounding errors, leading to incorrect balance calculations and potential financial losses due to precision loss in currency computations
WHENWhen executing Numscript VM
ACTIONcall ResolveResources() before Execute() to initialize variables and constants
CONSEQUENCEExecute panics with ErrResourcesNotInitialized when called before resource resolution, preventing any script execution
WHENWhen executing Numscript VM
ACTIONcall ResolveBalances() before Execute() to populate account balances
CONSEQUENCEExecute panics with ErrBalancesNotInitialized when called before balance resolution, causing script execution to fail
常见问题
讨论 (0)
暂无讨论,成为第一个发言的人吧!
更新历史
v0.1.0: 首次发布到 Doramagic.ai。基于 tangweigang-jpg/doramagic-skills 的自动化 batch-v1 元数据 + 自动生成 FAQ。