IntersectMBO / IntersectMBO/cardano-ledger

Change `accountBalanceIntervalTxBodyL` to accommodate multi-assets

Open
#5,533 1 comment 0 reactions 0 assignees View on GitHub
CIP-159 - Account Address Enhancement EulerEra
Dominant language
Haskell
Stars
295
Forks
179
Avg merge
4d 7h
Merged PRs (30d)
29

Description

This is the second phase CIP-159 and continuation of #5503

Here is the CDDL specification for this new field taken from the CIP:
```cddl
; We don't want to allow arbitrary precision intervals because it would make
; costing difficult so we constrain them to be 8-byte integers.
balance_bound = uint .size 8

required_balance_interval =
[ inclusive_lower_bound: b, exclusive_upper_bound: b / nil ] /
[ inclusive_lower_bound: b / nil, exclusive_upper_bound: b ]
; Note that when multi-asset interval is supplied, interval for ADA is optional
account_balance_interval =
required_balance_interval /
[ inclusive_lower_bound: coin / nil
, exclusive_upper_bound: coin / nil
, {+ policy_id => {+ asset_name => required_balance_interval } }
]
account_balance_intervals =
{ + reward_account => account_balance_interval }
transaction_body =
{ 0 : set
, 1 : [* transaction_output]
...
, ? 24 : account_balance_intervals ; new field
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.