@kaspacom/kcc20-tx-builder 0.8.0-fee.12 → 0.8.0-fee.13
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/CHANGELOG.md +4 -0
- package/dist/cjs/engine.js +5 -2
- package/dist/cjs/engine.js.map +1 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +5 -2
- package/dist/engine.js.map +1 -1
- package/docs/COMPATIBILITY.json +1 -1
- package/package.json +1 -1
- package/src/engine.ts +6 -2
package/docs/COMPATIBILITY.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "kcc20-example-compatibility/v1",
|
|
3
|
-
"packageVersion": "0.8.0-fee.
|
|
3
|
+
"packageVersion": "0.8.0-fee.13",
|
|
4
4
|
"contractsRepository": "https://github.com/KASPACOM/kaspa-covenants",
|
|
5
5
|
"contractsCommit": "1a15362b35661464587cf07ffe8a42186a545897",
|
|
6
6
|
"compiler": {
|
package/package.json
CHANGED
package/src/engine.ts
CHANGED
|
@@ -5349,16 +5349,20 @@ export function createKcc20PsktBuilderEngine(
|
|
|
5349
5349
|
String(utxo.state.wrapper_spk_hash).toLowerCase() !== holderPlan.wrapper.scriptHash) {
|
|
5350
5350
|
throw new Error(`bid ${slot} differs from fixed market policy`);
|
|
5351
5351
|
}
|
|
5352
|
-
// The indexer adds policy
|
|
5352
|
+
// The indexer adds policy summaries and an ownerScheme alias. They are not
|
|
5353
5353
|
// part of the on-chain bid state and must not enter script reconstruction.
|
|
5354
5354
|
const { creatorFeeBps: indexedCreatorFeeBps,
|
|
5355
|
-
feePolicyVersion: indexedFeePolicyVersion,
|
|
5355
|
+
feePolicyVersion: indexedFeePolicyVersion,
|
|
5356
|
+
ownerScheme: indexedOwnerScheme, ...bidState } = utxo.state;
|
|
5356
5357
|
if ((indexedCreatorFeeBps !== undefined &&
|
|
5357
5358
|
Number(indexedCreatorFeeBps) !== params.feePolicy.creatorFeeBps) ||
|
|
5358
5359
|
(indexedFeePolicyVersion !== undefined &&
|
|
5359
5360
|
Number(indexedFeePolicyVersion) !== params.feePolicy.version)) {
|
|
5360
5361
|
throw new Error(`bid ${slot} indexed policy summary differs from fixed policy`);
|
|
5361
5362
|
}
|
|
5363
|
+
if (indexedOwnerScheme !== undefined && indexedOwnerScheme !== scheme) {
|
|
5364
|
+
throw new Error(`bid ${slot} indexed owner scheme differs from contract state`);
|
|
5365
|
+
}
|
|
5362
5366
|
const bidScript = buildKcc20FeeMarketRoleScript({ artifact: artifacts.bid,
|
|
5363
5367
|
role: "bid", state: bidState });
|
|
5364
5368
|
const buyerPlan = prepareKcc20FeeMarketWrappedHolder({ ...base,
|