@stacks/rendezvous 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/citizen.js CHANGED
@@ -379,16 +379,14 @@ const restoreSbtcBalances = (simnet, sbtcBalancesMap) => {
379
379
  * @param sweepTxId A unique hex to use for the deposit.
380
380
  */
381
381
  const mintSbtc = (simnet, amountSats, recipient, txId, sweepTxId) => {
382
- // Calling `get-burn-header` only works for past block heights. We mine one
383
- // empty Stacks block if the initial height is 0.
384
- if (simnet.blockHeight === 0) {
385
- simnet.mineEmptyBlock();
382
+ // Calling `get-burn-block-info?` only works for past burn heights. We mine
383
+ // one empty Bitcoin block if the initial height is 0 and use the previous
384
+ // burn height to retrieve the burn header hash.
385
+ if (simnet.burnBlockHeight === 0) {
386
+ simnet.mineEmptyBurnBlock();
386
387
  }
387
- const previousStacksHeight = simnet.blockHeight - 1;
388
- const burnHash = simnet.callReadOnlyFn("SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-deposit", "get-burn-header", [
389
- // (height uint)
390
- transactions_1.Cl.uint(previousStacksHeight),
391
- ], simnet.deployer).result;
388
+ const previousBurnHeight = simnet.burnBlockHeight - 1;
389
+ const burnHash = (0, transactions_1.hexToCV)(simnet.runSnippet(`(get-burn-block-info? header-hash u${previousBurnHeight})`));
392
390
  if (burnHash === null || burnHash.type === transactions_1.ClarityType.OptionalNone) {
393
391
  throw new Error("Something went wrong trying to retrieve the burn header.");
394
392
  }
@@ -404,7 +402,7 @@ const mintSbtc = (simnet, amountSats, recipient, txId, sweepTxId) => {
404
402
  // (burn-hash (buff 32))
405
403
  burnHash.value,
406
404
  // (burn-height uint)
407
- transactions_1.Cl.uint(previousStacksHeight),
405
+ transactions_1.Cl.uint(previousBurnHeight),
408
406
  // (sweep-txid (buff 32))
409
407
  transactions_1.Cl.bufferFromHex(sweepTxId),
410
408
  ], "SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4").result);
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stacks/rendezvous",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Meet your contract's vulnerabilities head-on.",
5
5
  "main": "app.js",
6
6
  "bin": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stacks/rendezvous",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Meet your contract's vulnerabilities head-on.",
5
5
  "main": "app.js",
6
6
  "bin": {