Skip to content

Commit

Permalink
final prove minting from reference inputs works
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljakubas committed Sep 13, 2023
1 parent 9f35569 commit b5d3ae1
Showing 1 changed file with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1245,11 +1245,12 @@ spec = describe "NEW_SHELLEY_TRANSACTIONS" $ do

addrsMint <- listAddresses @n ctx wa
let addrMint = (addrsMint !! 1) ^. #id
let (Right tokenName') = mkTokenName "ab12"
let payloadMint = Json [json|{
"mint_burn": [{
"policy_id": #{toText policyId'},
"reference_input": #{toJSON refInp},
"asset_name": "ab12",
"asset_name": #{toText tokenName'},
"operation":
{ "mint" :
{ "receiving_address": #{addrMint},
Expand All @@ -1274,6 +1275,25 @@ spec = describe "NEW_SHELLEY_TRANSACTIONS" $ do
, expectResponseCode HTTP.status202
]

let tokenPolicyId' =
UnsafeTokenPolicyId . Hash $
unScriptHash $
toScriptHash scriptUsed
let tokens' = TokenMap.singleton
(AssetId tokenPolicyId' tokenName')
(TokenQuantity 1_000)

eventually "wallet holds minted assets" $ do
rWal <- request @ApiWallet ctx
(Link.getWallet @'Shelley wa) Default Empty
verify rWal
[ expectSuccess
, expectField (#assets . #available . #getApiT)
(`shouldBe` tokens')
, expectField (#assets . #total . #getApiT)
(`shouldBe` tokens')
]

it "TRANS_NEW_VALIDITY_INTERVAL_01a - \
\Validity interval with second" $
\ctx -> runResourceT $ do
Expand Down

0 comments on commit b5d3ae1

Please sign in to comment.