From dc8cf8b8886302901e5017c35f79f1b6cf6c3710 Mon Sep 17 00:00:00 2001 From: msinkec Date: Sat, 13 Jan 2024 13:46:12 +0100 Subject: [PATCH] maxMintAmount -> limit --- src/contracts/bsv20MintBasic.ts | 8 ++++---- src/contracts/bsv20MintTimeLock.ts | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/contracts/bsv20MintBasic.ts b/src/contracts/bsv20MintBasic.ts index 39cb523a..d783c6bf 100644 --- a/src/contracts/bsv20MintBasic.ts +++ b/src/contracts/bsv20MintBasic.ts @@ -14,7 +14,7 @@ export class BSV20Mint extends BSV20V2 { supply: bigint @prop() - maxMintAmount: bigint + limit: bigint constructor( id: ByteString, @@ -22,19 +22,19 @@ export class BSV20Mint extends BSV20V2 { max: bigint, dec: bigint, supply: bigint, - maxMintAmount: bigint + limit: bigint ) { super(id, sym, max, dec) this.init(...arguments) this.supply = supply - this.maxMintAmount = maxMintAmount + this.limit = limit } @method() public mint(dest: Addr, amount: bigint) { // Check mint amount doesn't exceed maximum. - assert(amount <= this.maxMintAmount, 'mint amount exceeds maximum') + assert(amount <= this.limit, 'mint amount exceeds limit') let outputs = toByteString('') let transferAmt = amount diff --git a/src/contracts/bsv20MintTimeLock.ts b/src/contracts/bsv20MintTimeLock.ts index a30ea469..36652862 100644 --- a/src/contracts/bsv20MintTimeLock.ts +++ b/src/contracts/bsv20MintTimeLock.ts @@ -14,7 +14,7 @@ export class BSV20MintTimeLock extends BSV20V2 { supply: bigint @prop() - maxMintAmount: bigint + limit: bigint @prop(true) lastUpdate: bigint @@ -28,7 +28,7 @@ export class BSV20MintTimeLock extends BSV20V2 { max: bigint, dec: bigint, supply: bigint, - maxMintAmount: bigint, + limit: bigint, lastUpdate: bigint, timeDelta: bigint ) { @@ -36,7 +36,7 @@ export class BSV20MintTimeLock extends BSV20V2 { this.init(...arguments) this.supply = supply - this.maxMintAmount = maxMintAmount + this.limit = limit this.lastUpdate = lastUpdate this.timeDelta = timeDelta } @@ -52,8 +52,8 @@ export class BSV20MintTimeLock extends BSV20V2 { // Update last mint timestamp. this.lastUpdate = this.ctx.locktime - // Check mint amount doesn't exceed maximum. - assert(amount <= this.maxMintAmount, 'mint amount exceeds maximum') + // Check mint amount doesn't exceed limit. + assert(amount <= this.limit, 'mint amount exceeds limit') let outputs = toByteString('') let transferAmt = amount