Skip to content

Commit

Permalink
Run Write.Tx.BalanceSpec tests in all recent eras
Browse files Browse the repository at this point in the history
  • Loading branch information
Anviking committed Jan 10, 2025
1 parent add2319 commit 29a64aa
Show file tree
Hide file tree
Showing 14 changed files with 472 additions and 97 deletions.
1 change: 1 addition & 0 deletions lib/balance-tx/lib/internal/Internal/Cardano/Write/Eras.hs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ type RecentEraConstraints era =
, Babbage.BabbageEraTxBody era
, Alonzo.AlonzoEraTxBody era
, Shelley.EraUTxO era
, Ledger.ShelleyEraTxCert era
, Show (Core.TxOut era)
, Show (Core.Tx era)
, Show (Core.PParams era)
Expand Down
81 changes: 81 additions & 0 deletions lib/balance-tx/test/data/balanceTx/conway/1ada-payment/golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
0.000000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 0) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 1000000) (MultiAsset (fromList []))})
0.050000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 50000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 950000) (MultiAsset (fromList []))})
0.100000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 100000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 900000) (MultiAsset (fromList []))})
0.150000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 150000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 850000) (MultiAsset (fromList []))})
0.200000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 200000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 800000) (MultiAsset (fromList []))})
0.250000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 250000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 750000) (MultiAsset (fromList []))})
0.300000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 300000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 700000) (MultiAsset (fromList []))})
0.350000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 350000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 650000) (MultiAsset (fromList []))})
0.400000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 400000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 600000) (MultiAsset (fromList []))})
0.450000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 450000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 550000) (MultiAsset (fromList []))})
0.500000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 500000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 500000) (MultiAsset (fromList []))})
0.550000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 550000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 450000) (MultiAsset (fromList []))})
0.600000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 600000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 400000) (MultiAsset (fromList []))})
0.650000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 650000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 350000) (MultiAsset (fromList []))})
0.700000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 700000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 300000) (MultiAsset (fromList []))})
0.750000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 750000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 250000) (MultiAsset (fromList []))})
0.800000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 800000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 200000) (MultiAsset (fromList []))})
0.850000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 850000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 150000) (MultiAsset (fromList []))})
0.900000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 900000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 100000) (MultiAsset (fromList []))})
0.950000,ErrBalanceTxAssetsInsufficient (ErrBalanceTxAssetsInsufficientError {available = MaryValue (Coin 950000) (MultiAsset (fromList [])), required = MaryValue (Coin 1000000) (MultiAsset (fromList [])), shortfall = MaryValue (Coin 50000) (MultiAsset (fromList []))})
1.000000,ErrBalanceTxUnableToCreateChange (ErrBalanceTxUnableToCreateChangeError {requiredCost = Coin 168977, shortfall = Coin 168977})
1.050000,ErrBalanceTxUnableToCreateChange (ErrBalanceTxUnableToCreateChangeError {requiredCost = Coin 168977, shortfall = Coin 118977})
1.100000,ErrBalanceTxUnableToCreateChange (ErrBalanceTxUnableToCreateChangeError {requiredCost = Coin 168977, shortfall = Coin 68977})
1.150000,ErrBalanceTxUnableToCreateChange (ErrBalanceTxUnableToCreateChangeError {requiredCost = Coin 168977, shortfall = Coin 18977})
1.200000,0.200000,0.164005
1.250000,0.250000,0.164005
1.300000,0.300000,0.164005
1.350000,0.350000,0.164005
1.400000,0.400000,0.164005
1.450000,0.450000,0.164005
1.500000,0.500000,0.164005
1.550000,0.550000,0.164005
1.600000,0.600000,0.164005
1.650000,0.650000,0.164005
1.700000,0.700000,0.164005
1.750000,0.750000,0.164005
1.800000,0.800000,0.164005
1.850000,0.850000,0.164005
1.900000,0.900000,0.164005
1.950000,0.950000,0.164005
2.000000,1.000000,0.164005
2.050000,1.050000,0.164005
2.100000,1.100000,0.164005
2.150000,1.150000,0.164005
2.200000,0.166865,0.166865
2.250000,0.166865,0.166865
2.300000,0.166865,0.166865
2.350000,0.166865,0.166865
2.400000,0.166865,0.166865
2.450000,0.166865,0.166865
2.500000,0.166865,0.166865
2.550000,0.166865,0.166865
2.600000,0.166865,0.166865
2.650000,0.166865,0.166865
2.700000,0.166865,0.166865
2.750000,0.166865,0.166865
2.800000,0.166865,0.166865
2.850000,0.166865,0.166865
2.900000,0.166865,0.166865
2.950000,0.166865,0.166865
3.000000,0.166865,0.166865
3.050000,0.166865,0.166865
3.100000,0.166865,0.166865
3.150000,0.166865,0.166865
3.200000,0.166865,0.166865
3.250000,0.166865,0.166865
3.300000,0.166865,0.166865
3.350000,0.166865,0.166865
3.400000,0.166865,0.166865
3.450000,0.166865,0.166865
3.500000,0.166865,0.166865
3.550000,0.166865,0.166865
3.600000,0.166865,0.166865
3.650000,0.166865,0.166865
3.700000,0.166865,0.166865
3.750000,0.166865,0.166865
3.800000,0.166865,0.166865
3.850000,0.166865,0.166865
3.900000,0.166865,0.166865
3.950000,0.166865,0.166865
4.000000,0.166865,0.166865
Loading

0 comments on commit 29a64aa

Please sign in to comment.