From 35331f2b0982c2eec49ff82ef06d316753292d5c Mon Sep 17 00:00:00 2001 From: "Joaquin Hoyos (Clark)" Date: Wed, 19 Jul 2023 14:10:28 -0300 Subject: [PATCH] Revert "change marketplace_fee stake_key hash with the one we currently use" This reverts commit 8eeec04c72bf7eac568d7169ba11562a61a461d9. --- e2e/test.ts | 51 +++++++++++++++++++++----------------------- lib/jpg/constants.ak | 2 +- plutus.json | 4 ++-- 3 files changed, 27 insertions(+), 30 deletions(-) diff --git a/e2e/test.ts b/e2e/test.ts index 7143bd5..e1adcaa 100644 --- a/e2e/test.ts +++ b/e2e/test.ts @@ -38,7 +38,7 @@ const marketplacePkh = "70e60f3b5ea7153e0acc7a803e4401d44b8ed1bae1c7baaad1a62a72"; const marketplaceStakePkh = - "1e78aae7c90cc36d624f7b3bb6d86b52696dc84e490f343eba89005f"; + "81728e7ed4cf324e1323135e7e6d931f01e30792d9cdf17129cb806d"; export const BULK_PURCHASE_SIZE = 54; @@ -59,14 +59,14 @@ export const bulkPurchaseAssets: Assets = new Array(BULK_PURCHASE_SIZE) export const marketplaceAddr = C.BaseAddress.new( 0, C.StakeCredential.from_keyhash(C.Ed25519KeyHash.from_hex(marketplacePkh)), - C.StakeCredential.from_keyhash(C.Ed25519KeyHash.from_hex(marketplaceStakePkh)) -) - .to_address() - .to_bech32("addr_test"); + C.StakeCredential.from_keyhash( + C.Ed25519KeyHash.from_hex(marketplaceStakePkh), + ), +).to_address().to_bech32("addr_test"); export async function test( name: string, - fn: (ctx: TestContext) => Promise + fn: (ctx: TestContext) => Promise, ) { const sellerPk = generatePrivateKey(); const refPk = generatePrivateKey(); @@ -79,7 +79,9 @@ export async function test( .selectWalletFromPrivateKey(sellerPk) .wallet.address(); - const refAddr = await l.selectWalletFromPrivateKey(refPk).wallet.address(); + const refAddr = await l + .selectWalletFromPrivateKey(refPk) + .wallet.address(); const royaltyAddr = await l .selectWalletFromPrivateKey(royaltyPk) @@ -89,10 +91,12 @@ export async function test( .selectWalletFromPrivateKey(buyerPk) .wallet.address(); - const { paymentCredential: sellerPaymentCredential } = - getAddressDetails(sellerAddr); - const { paymentCredential: royaltyPaymentCredential } = - getAddressDetails(royaltyAddr); + const { paymentCredential: sellerPaymentCredential } = getAddressDetails( + sellerAddr, + ); + const { paymentCredential: royaltyPaymentCredential } = getAddressDetails( + royaltyAddr, + ); const emulator = new Emulator( [ @@ -115,7 +119,7 @@ export async function test( ], { ...PROTOCOL_PARAMETERS_DEFAULT, - } + }, ); const lucid = await Lucid.new(emulator); @@ -126,13 +130,9 @@ export async function test( const txRef = await lucid .newTx() - .payToAddressWithData( - refAddr, - { scriptRef: validator }, - { - lovelace: 100000000n, - } - ) + .payToAddressWithData(refAddr, { scriptRef: validator }, { + lovelace: 100000000n, + }) .complete(); const signedRef = await txRef.sign().complete(); @@ -161,7 +161,7 @@ export async function test( export async function testFail( name: string, - fn: (ctx: TestContext) => Promise + fn: (ctx: TestContext) => Promise, ) { try { await test(name, fn); @@ -171,15 +171,12 @@ export async function testFail( console.log(err); } catch (e) { - const error = e - .split("\n") - .map((l: string) => `\n ${l}`) - .join(""); + const error = e.split("\n").map((l: string) => `\n ${l}`).join(""); const message = ` - ${colors.bold(colors.brightMagenta(name))} - ${colors.green( - "passed" - )}\n${error}`; + ${colors.bold(colors.brightMagenta(name))} - ${ + colors.green("passed") + }\n${error}`; console.log(message); } diff --git a/lib/jpg/constants.ak b/lib/jpg/constants.ak index 18ab62c..c440761 100644 --- a/lib/jpg/constants.ak +++ b/lib/jpg/constants.ak @@ -2,7 +2,7 @@ use aiken/transaction/credential.{Address, Inline, VerificationKeyCredential} use jpg/types.{VerificationKeyHash} pub const marketplace_stake_vkh: VerificationKeyHash = - #"1e78aae7c90cc36d624f7b3bb6d86b52696dc84e490f343eba89005f" + #"81728e7ed4cf324e1323135e7e6d931f01e30792d9cdf17129cb806d" pub const marketplace_vkh: VerificationKeyHash = #"70e60f3b5ea7153e0acc7a803e4401d44b8ed1bae1c7baaad1a62a72" diff --git a/plutus.json b/plutus.json index 30bf862..69ed4e7 100644 --- a/plutus.json +++ b/plutus.json @@ -21,8 +21,8 @@ "$ref": "#/definitions/ask~1Redeemer" } }, - "compiledCode": "59058301000032323232323232323232322223232533300a323232323232323232323232323232323232533301c3370e9000000899191919191919191919192999813801899b8848000ccc00401001401c4c8c8c8c8c8c8c8c8c8c8c8c8c94ccc0dcc0e80184c8c8c94ccc0e8c0f40084c8c8c8c94ccc0ed4ccc0ed4ccc0ec028402452808008a50100214a066e24040008cdc7802a44100375a60740046eb8c0e000458c0ec004dd5981b8011bae30350011630380053375e00c98150d8799fd8799f581c70e60f3b5ea7153e0acc7a803e4401d44b8ed1bae1c7baaad1a62a72ffd8799fd8799fd8799f581c1e78aae7c90cc36d624f7b3bb6d86b52696dc84e490f343eba89005fffffffff003375e002022606a002606a0046eacc0cc004c0cc008c0c4004c0a4010cdc199b83337040029032240c49032199801800803a6103d8798000302e005302c00430010012222323232323232323253330313375e0020122646464646464a66606e66ebc00c02c4c94ccc0ecc0f80284c8c8c94ccc0f8c1040084c8c94ccc0f4cdc7802a45001533303d533303d3371200e002266e21200000714a026466e000200054ccc10002c520001333301801801300b4c103d87980001616375a607c0046eb8c0f000458c0fc004dd5981d8011bae303900116303c00916375a60760026076004607200260620046070016606c0142c606a002606a0046eacc0cc004c0cc008c0c4004c0a4008c0c0010c0b800cccc8c0040048894ccc0a800852809919299981498018010a511333005005001003302e003375c605800497ae023300b00d001333232323001001222533302833712900a00089919980200200099b8100248050c8c8c8c8c8c8c8c8c8c0dc004c0d8004c0d4004c0d0004c0cc004c0c8004c0c4004c0c0004c0bc004c0b80084cc010008004c0040048894ccc098cdc3800a4000200426466600800800266e040092002302c0020120063758604e002603e030646466e95200433026375200297ae037280026ecc004c090004c0714ccc078cdc3a4004603a02220222c6eb4c088004c0680504cc008010dd71980c180d009a400460340266002002444a66603e00429404c8c94ccc078cdc78010018a5113330050050010033023003375c60420046eb0c074004c074004c070004c06c004c068004c064004c060008dd6180b000980b000980a800980600198090009809001180800098040018a4c2c6400a6646464464a66601c66e1d200000113232323253330153018002132498cc01c00c8c9263253330143370e9000000899191919299980d980f00109924c64a66603266e1d20000011323232325333020302300213232498c94ccc07ccdc3a400000226464a666048604e0042649319299981119b87480000044c8c94ccc09cc0a80084c926301b0011630280013020002153330223370e90010008991919191919299981598170010a4c2c6eb4c0b0004c0b0008dd6981500098150011bad30280013020002163020001163025001301d0031533301f3370e90010008a999811180e8018a4c2c2c603a00460280062c60420026042004603e002602e0082c602e0062c6eb4c070004c070008c068004c04800858c04800458dd7180b000980b0011bac3014001300c00216300c0013001001222533301000214984c8ccc010010c05000c008c004c0480088c94ccc02ccdc3a400000226464a66602060260042930b1bae301100130090021533300b3370e900100089919299980818098010a4c2c6eb8c044004c02400858c024004010c800cc94ccc024cdc3a400000226464a66601c60220042930b1bad300f0013007003153330093370e90010008a99980618038018a4c2c2c600e0046600200290001111199980399b8700100300c233330050053370000890011807000801001118029baa001230033754002ae6955ceaab9e5573eae815d0aba201", - "hash": "72d101ab30e212b89e8b2b51516ecbbf4d598ad65638dd854debe0c3" + "compiledCode": "59058301000032323232323232323232322223232533300a323232323232323232323232323232323232533301c3370e9000000899191919191919191919192999813801899b8848000ccc00401001401c4c8c8c8c8c8c8c8c8c8c8c8c8c94ccc0dcc0e80184c8c8c94ccc0e8c0f40084c8c8c8c94ccc0ed4ccc0ed4ccc0ec028402452808008a50100214a066e24040008cdc7802a44100375a60740046eb8c0e000458c0ec004dd5981b8011bae30350011630380053375e00c98150d8799fd8799f581c70e60f3b5ea7153e0acc7a803e4401d44b8ed1bae1c7baaad1a62a72ffd8799fd8799fd8799f581c81728e7ed4cf324e1323135e7e6d931f01e30792d9cdf17129cb806dffffffff003375e002022606a002606a0046eacc0cc004c0cc008c0c4004c0a4010cdc199b83337040029032240c49032199801800803a6103d8798000302e005302c00430010012222323232323232323253330313375e0020122646464646464a66606e66ebc00c02c4c94ccc0ecc0f80284c8c8c94ccc0f8c1040084c8c94ccc0f4cdc7802a45001533303d533303d3371200e002266e21200000714a026466e000200054ccc10002c520001333301801801300b4c103d87980001616375a607c0046eb8c0f000458c0fc004dd5981d8011bae303900116303c00916375a60760026076004607200260620046070016606c0142c606a002606a0046eacc0cc004c0cc008c0c4004c0a4008c0c0010c0b800cccc8c0040048894ccc0a800852809919299981498018010a511333005005001003302e003375c605800497ae023300b00d001333232323001001222533302833712900a00089919980200200099b8100248050c8c8c8c8c8c8c8c8c8c0dc004c0d8004c0d4004c0d0004c0cc004c0c8004c0c4004c0c0004c0bc004c0b80084cc010008004c0040048894ccc098cdc3800a4000200426466600800800266e040092002302c0020120063758604e002603e030646466e95200433026375200297ae037280026ecc004c090004c0714ccc078cdc3a4004603a02220222c6eb4c088004c0680504cc008010dd71980c180d009a400460340266002002444a66603e00429404c8c94ccc078cdc78010018a5113330050050010033023003375c60420046eb0c074004c074004c070004c06c004c068004c064004c060008dd6180b000980b000980a800980600198090009809001180800098040018a4c2c6400a6646464464a66601c66e1d200000113232323253330153018002132498cc01c00c8c9263253330143370e9000000899191919299980d980f00109924c64a66603266e1d20000011323232325333020302300213232498c94ccc07ccdc3a400000226464a666048604e0042649319299981119b87480000044c8c94ccc09cc0a80084c926301b0011630280013020002153330223370e90010008991919191919299981598170010a4c2c6eb4c0b0004c0b0008dd6981500098150011bad30280013020002163020001163025001301d0031533301f3370e90010008a999811180e8018a4c2c2c603a00460280062c60420026042004603e002602e0082c602e0062c6eb4c070004c070008c068004c04800858c04800458dd7180b000980b0011bac3014001300c00216300c0013001001222533301000214984c8ccc010010c05000c008c004c0480088c94ccc02ccdc3a400000226464a66602060260042930b1bae301100130090021533300b3370e900100089919299980818098010a4c2c6eb8c044004c02400858c024004010c800cc94ccc024cdc3a400000226464a66601c60220042930b1bad300f0013007003153330093370e90010008a99980618038018a4c2c2c600e0046600200290001111199980399b8700100300c233330050053370000890011807000801001118029baa001230033754002ae6955ceaab9e5573eae815d0aba201", + "hash": "d7a69b54c817c494fcbfbfbb9def5d5287fcc0e25f54bfe900a1a89e" } ], "definitions": {