@btc-vision/btc-runtime 1.9.4 → 1.9.6
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/package.json
CHANGED
|
@@ -24,13 +24,7 @@ import { IOP721 } from './interfaces/IOP721';
|
|
|
24
24
|
import { OP721InitParameters } from './interfaces/OP721InitParameters';
|
|
25
25
|
import { ReentrancyGuard } from './ReentrancyGuard';
|
|
26
26
|
import { StoredMapU256 } from '../storage/maps/StoredMapU256';
|
|
27
|
-
import {
|
|
28
|
-
ApprovedEvent,
|
|
29
|
-
ApprovedForAllEvent,
|
|
30
|
-
MAX_URI_LENGTH,
|
|
31
|
-
TransferredEvent,
|
|
32
|
-
URIEvent,
|
|
33
|
-
} from '../events/predefined';
|
|
27
|
+
import { ApprovedEvent, ApprovedForAllEvent, MAX_URI_LENGTH, TransferredEvent, URIEvent, } from '../events/predefined';
|
|
34
28
|
import {
|
|
35
29
|
ON_OP721_RECEIVED_SELECTOR,
|
|
36
30
|
OP712_DOMAIN_TYPE_HASH,
|
|
@@ -170,7 +164,7 @@ export abstract class OP721 extends ReentrancyGuard implements IOP721 {
|
|
|
170
164
|
return w;
|
|
171
165
|
}
|
|
172
166
|
|
|
173
|
-
@method()
|
|
167
|
+
@method('maxSupply')
|
|
174
168
|
@returns({ name: 'maxSupply', type: ABIDataTypes.UINT256 })
|
|
175
169
|
public fn_maxSupply(_: Calldata): BytesWriter {
|
|
176
170
|
const w = new BytesWriter(U256_BYTE_LENGTH);
|
|
@@ -207,7 +201,7 @@ export abstract class OP721 extends ReentrancyGuard implements IOP721 {
|
|
|
207
201
|
return w;
|
|
208
202
|
}
|
|
209
203
|
|
|
210
|
-
@method()
|
|
204
|
+
@method('totalSupply')
|
|
211
205
|
@returns({ name: 'totalSupply', type: ABIDataTypes.UINT256 })
|
|
212
206
|
public fn_totalSupply(_: Calldata): BytesWriter {
|
|
213
207
|
const w = new BytesWriter(U256_BYTE_LENGTH);
|
|
@@ -780,6 +774,7 @@ export abstract class OP721 extends ReentrancyGuard implements IOP721 {
|
|
|
780
774
|
const newIndex = tokenArray.getLength();
|
|
781
775
|
tokenArray.push(tokenId);
|
|
782
776
|
this.tokenIndexMap.set(tokenId, u256.fromU32(newIndex));
|
|
777
|
+
tokenArray.save();
|
|
783
778
|
}
|
|
784
779
|
|
|
785
780
|
protected _removeTokenFromOwnerEnumeration(from: Address, tokenId: u256): void {
|
|
@@ -804,6 +799,8 @@ export abstract class OP721 extends ReentrancyGuard implements IOP721 {
|
|
|
804
799
|
// Remove last element
|
|
805
800
|
tokenArray.deleteLast();
|
|
806
801
|
this.tokenIndexMap.delete(tokenId);
|
|
802
|
+
|
|
803
|
+
tokenArray.save();
|
|
807
804
|
}
|
|
808
805
|
|
|
809
806
|
/**
|