@silvana-one/nft 0.2.11 → 1.0.0
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/README.md +12 -0
- package/dist/node/contracts/admin.d.ts +100 -10
- package/dist/node/contracts/admin.js +130 -29
- package/dist/node/contracts/admin.js.map +1 -1
- package/dist/node/contracts/collection.d.ts +51 -34
- package/dist/node/contracts/collection.js +162 -71
- package/dist/node/contracts/collection.js.map +1 -1
- package/dist/node/contracts/nft.js +3 -0
- package/dist/node/contracts/nft.js.map +1 -1
- package/dist/node/contracts.d.ts +36 -30
- package/dist/node/index.cjs +447 -182
- package/dist/node/interfaces/collection.d.ts +5 -5
- package/dist/node/interfaces/events.d.ts +306 -16
- package/dist/node/interfaces/events.js +42 -4
- package/dist/node/interfaces/events.js.map +1 -1
- package/dist/node/interfaces/ownable.d.ts +7 -7
- package/dist/node/interfaces/ownable.js.map +1 -1
- package/dist/node/interfaces/pausable.d.ts +3 -3
- package/dist/node/interfaces/pausable.js.map +1 -1
- package/dist/node/interfaces/types.d.ts +182 -27
- package/dist/node/interfaces/types.js +120 -71
- package/dist/node/interfaces/types.js.map +1 -1
- package/dist/node/marketplace/auction.d.ts +2 -2
- package/dist/node/marketplace/auction.js +4 -4
- package/dist/node/marketplace/auction.js.map +1 -1
- package/dist/node/marketplace/bid.js +3 -5
- package/dist/node/marketplace/bid.js.map +1 -1
- package/dist/node/marketplace/nft-shares.d.ts +2 -2
- package/dist/node/util/div.js +10 -5
- package/dist/node/util/div.js.map +1 -1
- package/dist/node/vk.js +6 -6
- package/dist/node/vk.js.map +1 -1
- package/dist/node/zkprogram-example/game.d.ts +2 -2
- package/dist/node/zkprogram-example/update.d.ts +2 -2
- package/dist/tsconfig.node.tsbuildinfo +1 -1
- package/dist/tsconfig.web.tsbuildinfo +1 -1
- package/dist/web/contracts/admin.d.ts +100 -10
- package/dist/web/contracts/admin.js +130 -29
- package/dist/web/contracts/admin.js.map +1 -1
- package/dist/web/contracts/collection.d.ts +51 -34
- package/dist/web/contracts/collection.js +162 -71
- package/dist/web/contracts/collection.js.map +1 -1
- package/dist/web/contracts/nft.js +3 -0
- package/dist/web/contracts/nft.js.map +1 -1
- package/dist/web/contracts.d.ts +36 -30
- package/dist/web/interfaces/collection.d.ts +5 -5
- package/dist/web/interfaces/events.d.ts +306 -16
- package/dist/web/interfaces/events.js +42 -4
- package/dist/web/interfaces/events.js.map +1 -1
- package/dist/web/interfaces/ownable.d.ts +7 -7
- package/dist/web/interfaces/ownable.js.map +1 -1
- package/dist/web/interfaces/pausable.d.ts +3 -3
- package/dist/web/interfaces/pausable.js.map +1 -1
- package/dist/web/interfaces/types.d.ts +182 -27
- package/dist/web/interfaces/types.js +120 -71
- package/dist/web/interfaces/types.js.map +1 -1
- package/dist/web/marketplace/auction.d.ts +2 -2
- package/dist/web/marketplace/auction.js +4 -4
- package/dist/web/marketplace/auction.js.map +1 -1
- package/dist/web/marketplace/bid.js +3 -5
- package/dist/web/marketplace/bid.js.map +1 -1
- package/dist/web/marketplace/nft-shares.d.ts +2 -2
- package/dist/web/util/div.js +10 -5
- package/dist/web/util/div.js.map +1 -1
- package/dist/web/vk.js +6 -6
- package/dist/web/vk.js.map +1 -1
- package/dist/web/zkprogram-example/game.d.ts +2 -2
- package/dist/web/zkprogram-example/update.d.ts +2 -2
- package/package.json +8 -8
- package/src/contracts/admin.ts +137 -24
- package/src/contracts/collection.ts +188 -96
- package/src/contracts/nft.ts +3 -0
- package/src/interfaces/collection.ts +11 -5
- package/src/interfaces/events.ts +47 -3
- package/src/interfaces/ownable.ts +1 -1
- package/src/interfaces/pausable.ts +1 -1
- package/src/interfaces/types.ts +152 -78
- package/src/marketplace/auction.ts +5 -4
- package/src/marketplace/bid.ts +4 -6
- package/src/util/div.ts +12 -5
- package/src/vk.ts +6 -6
package/README.md
CHANGED
|
@@ -6,6 +6,18 @@ The MinaNFT project is an innovative Non-Fungible Token (NFT) platform that inte
|
|
|
6
6
|
|
|
7
7
|
https://docs.minanft.io/
|
|
8
8
|
|
|
9
|
+
## Best practices
|
|
10
|
+
|
|
11
|
+
For best practices on creating and using NFT collections, please refer to our [Best Practices Guide](./BEST_PRACTICES.md).
|
|
12
|
+
|
|
13
|
+
## NFT configuration
|
|
14
|
+
|
|
15
|
+
For detailed information on NFT and Collection flags, including their meanings, interactions, and best practices, please refer to our [NFT Configuration Guide](./FLAGS.md).
|
|
16
|
+
|
|
17
|
+
## Metadata
|
|
18
|
+
|
|
19
|
+
For detailed information on NFT metadata structure and usage, please refer to our [Metadata Guide](./METADATA.md).
|
|
20
|
+
|
|
9
21
|
## Frontend
|
|
10
22
|
|
|
11
23
|
https://devnet.minanft.io/
|
|
@@ -1,14 +1,97 @@
|
|
|
1
|
-
import { Bool, DeployArgs, PublicKey, SmartContract, State, VerificationKey, UInt64, Field, AccountUpdate, UInt32 } from "o1js";
|
|
1
|
+
import { Bool, DeployArgs, PublicKey, SmartContract, State, VerificationKey, UInt64, Field, AccountUpdate, UInt32, UInt8 } from "o1js";
|
|
2
2
|
import { MintRequest, NFTState, NFTAdminBase, MintParamsOption, PausableContract, PauseEvent, OwnershipChangeEvent, OwnableContract, TransferEvent } from "../interfaces/index.js";
|
|
3
|
-
export { NFTAdmin, NFTAdminDeployProps };
|
|
3
|
+
export { NFTAdmin, NFTAdminDeployProps, NFTAdminAllowFlags };
|
|
4
4
|
interface NFTAdminDeployProps extends Exclude<DeployArgs, undefined> {
|
|
5
5
|
admin: PublicKey;
|
|
6
6
|
uri: string;
|
|
7
7
|
canBePaused?: Bool;
|
|
8
8
|
allowChangeRoyalty?: Bool;
|
|
9
9
|
allowChangeTransferFee?: Bool;
|
|
10
|
+
allowPauseCollection?: Bool;
|
|
10
11
|
isPaused?: Bool;
|
|
11
12
|
}
|
|
13
|
+
declare const NFTAdminAllowFlags_base: (new (value: {
|
|
14
|
+
allowChangeRoyalty: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
15
|
+
allowChangeTransferFee: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
16
|
+
allowPauseCollection: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
17
|
+
}) => {
|
|
18
|
+
allowChangeRoyalty: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
19
|
+
allowChangeTransferFee: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
20
|
+
allowPauseCollection: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
21
|
+
}) & {
|
|
22
|
+
_isStruct: true;
|
|
23
|
+
} & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
|
24
|
+
allowChangeRoyalty: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
25
|
+
allowChangeTransferFee: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
26
|
+
allowPauseCollection: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
27
|
+
}, {
|
|
28
|
+
allowChangeRoyalty: boolean;
|
|
29
|
+
allowChangeTransferFee: boolean;
|
|
30
|
+
allowPauseCollection: boolean;
|
|
31
|
+
}>, "fromFields"> & {
|
|
32
|
+
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => {
|
|
33
|
+
allowChangeRoyalty: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
34
|
+
allowChangeTransferFee: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
35
|
+
allowPauseCollection: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
36
|
+
};
|
|
37
|
+
} & {
|
|
38
|
+
fromValue: (value: {
|
|
39
|
+
allowChangeRoyalty: boolean | import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
40
|
+
allowChangeTransferFee: boolean | import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
41
|
+
allowPauseCollection: boolean | import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
42
|
+
}) => {
|
|
43
|
+
allowChangeRoyalty: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
44
|
+
allowChangeTransferFee: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
45
|
+
allowPauseCollection: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
46
|
+
};
|
|
47
|
+
toInput: (x: {
|
|
48
|
+
allowChangeRoyalty: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
49
|
+
allowChangeTransferFee: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
50
|
+
allowPauseCollection: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
51
|
+
}) => {
|
|
52
|
+
fields?: Field[] | undefined;
|
|
53
|
+
packed?: [Field, number][] | undefined;
|
|
54
|
+
};
|
|
55
|
+
toJSON: (x: {
|
|
56
|
+
allowChangeRoyalty: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
57
|
+
allowChangeTransferFee: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
58
|
+
allowPauseCollection: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
59
|
+
}) => {
|
|
60
|
+
allowChangeRoyalty: boolean;
|
|
61
|
+
allowChangeTransferFee: boolean;
|
|
62
|
+
allowPauseCollection: boolean;
|
|
63
|
+
};
|
|
64
|
+
fromJSON: (x: {
|
|
65
|
+
allowChangeRoyalty: boolean;
|
|
66
|
+
allowChangeTransferFee: boolean;
|
|
67
|
+
allowPauseCollection: boolean;
|
|
68
|
+
}) => {
|
|
69
|
+
allowChangeRoyalty: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
70
|
+
allowChangeTransferFee: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
71
|
+
allowPauseCollection: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
72
|
+
};
|
|
73
|
+
empty: () => {
|
|
74
|
+
allowChangeRoyalty: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
75
|
+
allowChangeTransferFee: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
76
|
+
allowPauseCollection: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Contains flags for the admin contract related to the NFT collection permissions.
|
|
81
|
+
*/
|
|
82
|
+
declare class NFTAdminAllowFlags extends NFTAdminAllowFlags_base {
|
|
83
|
+
/**
|
|
84
|
+
* Packs the NFTAdminAllowFlags into a UInt8 representation for efficient storage.
|
|
85
|
+
* @returns The packed UInt8 instance.
|
|
86
|
+
*/
|
|
87
|
+
pack(): UInt8;
|
|
88
|
+
/**
|
|
89
|
+
* Unpacks a UInt8 instance into a NFTAdminAllowFlags instance.
|
|
90
|
+
* @param packed The packed UInt8 instance.
|
|
91
|
+
* @returns A new NFTAdminAllowFlags instance.
|
|
92
|
+
*/
|
|
93
|
+
static unpack(packed: UInt8): NFTAdminAllowFlags;
|
|
94
|
+
}
|
|
12
95
|
/**
|
|
13
96
|
* The **NFTAdmin** contract serves as the foundational administrative layer for NFT collections on the Mina Protocol.
|
|
14
97
|
* It provides essential functionalities such as contract upgrades, pausing and resuming operations, and ownership management.
|
|
@@ -21,6 +104,10 @@ declare class NFTAdmin extends SmartContract implements NFTAdminBase, PausableCo
|
|
|
21
104
|
* This account has the authority to perform administrative actions such as pausing the contract or upgrading the verification key.
|
|
22
105
|
*/
|
|
23
106
|
admin: State<PublicKey>;
|
|
107
|
+
/**
|
|
108
|
+
* The public key of the contract's pending administrator.
|
|
109
|
+
*/
|
|
110
|
+
pendingAdmin: State<PublicKey>;
|
|
24
111
|
/**
|
|
25
112
|
* A boolean flag indicating whether the contract is currently paused.
|
|
26
113
|
* When `true`, certain operations are disabled.
|
|
@@ -32,13 +119,9 @@ declare class NFTAdmin extends SmartContract implements NFTAdminBase, PausableCo
|
|
|
32
119
|
*/
|
|
33
120
|
canBePaused: State<import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool>;
|
|
34
121
|
/**
|
|
35
|
-
* A boolean
|
|
122
|
+
* A boolean flags indicating whether the collection is allowed to change the royalty fee, transfer fee and pause the collection.
|
|
36
123
|
*/
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* A boolean flag indicating whether the contract has the ability to change the transfer fee.
|
|
40
|
-
*/
|
|
41
|
-
allowChangeTransferFee: State<import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool>;
|
|
124
|
+
flags: State<UInt8>;
|
|
42
125
|
/**
|
|
43
126
|
* Deploys the contract with initial settings.
|
|
44
127
|
* @param props - Deployment properties including admin, upgradeAuthority, uri, canPause, and isPaused.
|
|
@@ -55,7 +138,9 @@ declare class NFTAdmin extends SmartContract implements NFTAdminBase, PausableCo
|
|
|
55
138
|
/** Emitted when the contract is resumed. */
|
|
56
139
|
resume: typeof PauseEvent;
|
|
57
140
|
/** Emitted when ownership of the contract changes. */
|
|
58
|
-
|
|
141
|
+
ownershipTransfer: typeof OwnershipChangeEvent;
|
|
142
|
+
/** Emitted when ownership of the contract is accepted. */
|
|
143
|
+
ownershipAccepted: typeof OwnershipChangeEvent;
|
|
59
144
|
};
|
|
60
145
|
/**
|
|
61
146
|
* Ensures that the transaction is authorized by the contract owner.
|
|
@@ -101,9 +186,14 @@ declare class NFTAdmin extends SmartContract implements NFTAdminBase, PausableCo
|
|
|
101
186
|
/**
|
|
102
187
|
* Transfers ownership of the contract to a new admin.
|
|
103
188
|
* @param to - The public key of the new owner.
|
|
104
|
-
* @returns The public key of the previous
|
|
189
|
+
* @returns The public key of the previous admin.
|
|
105
190
|
*/
|
|
106
191
|
transferOwnership(to: PublicKey): Promise<PublicKey>;
|
|
192
|
+
/**
|
|
193
|
+
* Accept transfer of the ownership of the contract.
|
|
194
|
+
* @returns The public key of the previous admin.
|
|
195
|
+
*/
|
|
196
|
+
acceptOwnership(): Promise<PublicKey>;
|
|
107
197
|
canChangeVerificationKey(vk: VerificationKey, address: PublicKey, tokenId: Field): Promise<Bool>;
|
|
108
198
|
/**
|
|
109
199
|
* Determines if the name can be changed for a Collection.
|
|
@@ -1,7 +1,43 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { Bool, method, Permissions, PublicKey, SmartContract, State, state, VerificationKey, UInt64, Field, AccountUpdate, UInt32, } from "o1js";
|
|
2
|
+
import { Bool, method, Permissions, PublicKey, SmartContract, State, state, VerificationKey, UInt64, Field, AccountUpdate, UInt32, UInt8, Struct, assert, } from "o1js";
|
|
3
3
|
import { MintRequest, NFTState, MintParamsOption, PauseEvent, OwnershipChangeEvent, TransferEvent, } from "../interfaces/index.js";
|
|
4
|
-
export { NFTAdmin };
|
|
4
|
+
export { NFTAdmin, NFTAdminAllowFlags };
|
|
5
|
+
/**
|
|
6
|
+
* Contains flags for the admin contract related to the NFT collection permissions.
|
|
7
|
+
*/
|
|
8
|
+
class NFTAdminAllowFlags extends Struct({
|
|
9
|
+
allowChangeRoyalty: Bool,
|
|
10
|
+
allowChangeTransferFee: Bool,
|
|
11
|
+
allowPauseCollection: Bool,
|
|
12
|
+
}) {
|
|
13
|
+
/**
|
|
14
|
+
* Packs the NFTAdminAllowFlags into a UInt8 representation for efficient storage.
|
|
15
|
+
* @returns The packed UInt8 instance.
|
|
16
|
+
*/
|
|
17
|
+
pack() {
|
|
18
|
+
return UInt8.from(Field.fromBits([
|
|
19
|
+
this.allowChangeRoyalty,
|
|
20
|
+
this.allowChangeTransferFee,
|
|
21
|
+
this.allowPauseCollection,
|
|
22
|
+
]));
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Unpacks a UInt8 instance into a NFTAdminAllowFlags instance.
|
|
26
|
+
* @param packed The packed UInt8 instance.
|
|
27
|
+
* @returns A new NFTAdminAllowFlags instance.
|
|
28
|
+
*/
|
|
29
|
+
static unpack(packed) {
|
|
30
|
+
const bits = packed.value.toBits(3);
|
|
31
|
+
const allowChangeRoyalty = bits[0];
|
|
32
|
+
const allowChangeTransferFee = bits[1];
|
|
33
|
+
const allowPauseCollection = bits[2];
|
|
34
|
+
return new NFTAdminAllowFlags({
|
|
35
|
+
allowChangeRoyalty,
|
|
36
|
+
allowChangeTransferFee,
|
|
37
|
+
allowPauseCollection,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
5
41
|
/**
|
|
6
42
|
* The **NFTAdmin** contract serves as the foundational administrative layer for NFT collections on the Mina Protocol.
|
|
7
43
|
* It provides essential functionalities such as contract upgrades, pausing and resuming operations, and ownership management.
|
|
@@ -16,6 +52,10 @@ class NFTAdmin extends SmartContract {
|
|
|
16
52
|
* This account has the authority to perform administrative actions such as pausing the contract or upgrading the verification key.
|
|
17
53
|
*/
|
|
18
54
|
this.admin = State();
|
|
55
|
+
/**
|
|
56
|
+
* The public key of the contract's pending administrator.
|
|
57
|
+
*/
|
|
58
|
+
this.pendingAdmin = State();
|
|
19
59
|
/**
|
|
20
60
|
* A boolean flag indicating whether the contract is currently paused.
|
|
21
61
|
* When `true`, certain operations are disabled.
|
|
@@ -27,13 +67,9 @@ class NFTAdmin extends SmartContract {
|
|
|
27
67
|
*/
|
|
28
68
|
this.canBePaused = State();
|
|
29
69
|
/**
|
|
30
|
-
* A boolean
|
|
31
|
-
*/
|
|
32
|
-
this.allowChangeRoyalty = State();
|
|
33
|
-
/**
|
|
34
|
-
* A boolean flag indicating whether the contract has the ability to change the transfer fee.
|
|
70
|
+
* A boolean flags indicating whether the collection is allowed to change the royalty fee, transfer fee and pause the collection.
|
|
35
71
|
*/
|
|
36
|
-
this.
|
|
72
|
+
this.flags = State();
|
|
37
73
|
/**
|
|
38
74
|
* Contract events emitted during various operations.
|
|
39
75
|
*/
|
|
@@ -45,7 +81,9 @@ class NFTAdmin extends SmartContract {
|
|
|
45
81
|
/** Emitted when the contract is resumed. */
|
|
46
82
|
resume: PauseEvent,
|
|
47
83
|
/** Emitted when ownership of the contract changes. */
|
|
48
|
-
|
|
84
|
+
ownershipTransfer: OwnershipChangeEvent,
|
|
85
|
+
/** Emitted when ownership of the contract is accepted. */
|
|
86
|
+
ownershipAccepted: OwnershipChangeEvent,
|
|
49
87
|
};
|
|
50
88
|
}
|
|
51
89
|
/**
|
|
@@ -54,11 +92,18 @@ class NFTAdmin extends SmartContract {
|
|
|
54
92
|
*/
|
|
55
93
|
async deploy(props) {
|
|
56
94
|
await super.deploy(props);
|
|
95
|
+
const isPaused = props.isPaused ?? Bool(false);
|
|
96
|
+
const canBePaused = props.canBePaused ?? Bool(true);
|
|
97
|
+
assert(isPaused.equals(Bool(false)).or(canBePaused.equals(Bool(true))), "Cannot deploy paused contract that cannot be resumed");
|
|
57
98
|
this.admin.set(props.admin);
|
|
58
|
-
this.
|
|
59
|
-
this.
|
|
60
|
-
this.
|
|
61
|
-
this.
|
|
99
|
+
this.pendingAdmin.set(PublicKey.empty());
|
|
100
|
+
this.isPaused.set(isPaused);
|
|
101
|
+
this.canBePaused.set(canBePaused);
|
|
102
|
+
this.flags.set(new NFTAdminAllowFlags({
|
|
103
|
+
allowChangeRoyalty: props.allowChangeRoyalty ?? Bool(false),
|
|
104
|
+
allowChangeTransferFee: props.allowChangeTransferFee ?? Bool(false),
|
|
105
|
+
allowPauseCollection: props.allowPauseCollection ?? Bool(true),
|
|
106
|
+
}).pack());
|
|
62
107
|
this.account.zkappUri.set(props.uri);
|
|
63
108
|
this.account.permissions.set({
|
|
64
109
|
...Permissions.default(),
|
|
@@ -68,8 +113,8 @@ class NFTAdmin extends SmartContract {
|
|
|
68
113
|
setPermissions: Permissions.impossible(),
|
|
69
114
|
access: Permissions.proof(),
|
|
70
115
|
send: Permissions.proof(),
|
|
71
|
-
setZkappUri: Permissions.
|
|
72
|
-
setTokenSymbol: Permissions.
|
|
116
|
+
setZkappUri: Permissions.proof(),
|
|
117
|
+
setTokenSymbol: Permissions.proof(),
|
|
73
118
|
});
|
|
74
119
|
}
|
|
75
120
|
/**
|
|
@@ -100,6 +145,8 @@ class NFTAdmin extends SmartContract {
|
|
|
100
145
|
* @returns A `MintParamsOption` indicating if minting is permitted.
|
|
101
146
|
*/
|
|
102
147
|
async canMint(mintRequest) {
|
|
148
|
+
const isPaused = this.isPaused.getAndRequireEquals();
|
|
149
|
+
isPaused.assertFalse("Contract is paused");
|
|
103
150
|
// Only the creator can mint by default
|
|
104
151
|
return MintParamsOption.none();
|
|
105
152
|
}
|
|
@@ -111,6 +158,8 @@ class NFTAdmin extends SmartContract {
|
|
|
111
158
|
* @returns A `Bool` indicating whether the update is allowed.
|
|
112
159
|
*/
|
|
113
160
|
async canUpdate(input, output) {
|
|
161
|
+
const isPaused = this.isPaused.getAndRequireEquals();
|
|
162
|
+
isPaused.assertFalse("Contract is paused");
|
|
114
163
|
return Bool(true);
|
|
115
164
|
}
|
|
116
165
|
/**
|
|
@@ -119,6 +168,8 @@ class NFTAdmin extends SmartContract {
|
|
|
119
168
|
* @returns A `Bool` indicating whether the transfer is allowed.
|
|
120
169
|
*/
|
|
121
170
|
async canTransfer(transferEvent) {
|
|
171
|
+
const isPaused = this.isPaused.getAndRequireEquals();
|
|
172
|
+
isPaused.assertFalse("Contract is paused");
|
|
122
173
|
return Bool(true);
|
|
123
174
|
}
|
|
124
175
|
/**
|
|
@@ -144,20 +195,44 @@ class NFTAdmin extends SmartContract {
|
|
|
144
195
|
/**
|
|
145
196
|
* Transfers ownership of the contract to a new admin.
|
|
146
197
|
* @param to - The public key of the new owner.
|
|
147
|
-
* @returns The public key of the previous
|
|
198
|
+
* @returns The public key of the previous admin.
|
|
148
199
|
*/
|
|
149
200
|
async transferOwnership(to) {
|
|
150
201
|
const isPaused = this.isPaused.getAndRequireEquals();
|
|
151
|
-
isPaused.
|
|
202
|
+
isPaused.assertFalse("Contract is paused");
|
|
152
203
|
await this.ensureOwnerSignature();
|
|
153
204
|
const from = this.admin.getAndRequireEquals();
|
|
154
|
-
|
|
155
|
-
this.
|
|
205
|
+
// Pending admin public key can be empty, it cancels the transfer
|
|
206
|
+
this.pendingAdmin.set(to);
|
|
207
|
+
this.emitEvent("ownershipTransfer", new OwnershipChangeEvent({
|
|
156
208
|
from,
|
|
157
209
|
to,
|
|
158
210
|
}));
|
|
159
211
|
return from;
|
|
160
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* Accept transfer of the ownership of the contract.
|
|
215
|
+
* @returns The public key of the previous admin.
|
|
216
|
+
*/
|
|
217
|
+
async acceptOwnership() {
|
|
218
|
+
const isPaused = this.isPaused.getAndRequireEquals();
|
|
219
|
+
isPaused.assertFalse("Contract is paused");
|
|
220
|
+
const admin = this.admin.getAndRequireEquals();
|
|
221
|
+
const pendingAdmin = this.pendingAdmin.getAndRequireEquals();
|
|
222
|
+
pendingAdmin
|
|
223
|
+
.equals(PublicKey.empty())
|
|
224
|
+
.assertFalse("Pending admin is not set");
|
|
225
|
+
// pendingAdmin can be different from the sender, but it should sign the tx
|
|
226
|
+
const pendingAminUpdate = AccountUpdate.createSigned(pendingAdmin);
|
|
227
|
+
pendingAminUpdate.body.useFullCommitment = Bool(true); // Prevent memo and fee change
|
|
228
|
+
this.admin.set(pendingAdmin);
|
|
229
|
+
this.pendingAdmin.set(PublicKey.empty());
|
|
230
|
+
this.emitEvent("ownershipAccepted", new OwnershipChangeEvent({
|
|
231
|
+
from: admin,
|
|
232
|
+
to: pendingAdmin,
|
|
233
|
+
}));
|
|
234
|
+
return admin;
|
|
235
|
+
}
|
|
161
236
|
async canChangeVerificationKey(vk, address, tokenId) {
|
|
162
237
|
await this.ensureOwnerSignature();
|
|
163
238
|
return Bool(true);
|
|
@@ -166,53 +241,73 @@ class NFTAdmin extends SmartContract {
|
|
|
166
241
|
* Determines if the name can be changed for a Collection.
|
|
167
242
|
*/
|
|
168
243
|
async canChangeName(name) {
|
|
244
|
+
const isPaused = this.isPaused.getAndRequireEquals();
|
|
245
|
+
isPaused.assertFalse("Contract is paused");
|
|
169
246
|
return Bool(false);
|
|
170
247
|
}
|
|
171
248
|
/**
|
|
172
249
|
* Determines if the creator can be changed for a Collection.
|
|
173
250
|
*/
|
|
174
251
|
async canChangeCreator(creator) {
|
|
252
|
+
const isPaused = this.isPaused.getAndRequireEquals();
|
|
253
|
+
isPaused.assertFalse("Contract is paused");
|
|
175
254
|
return Bool(false);
|
|
176
255
|
}
|
|
177
256
|
/**
|
|
178
257
|
* Determines if the base URI can be changed for a Collection.
|
|
179
258
|
*/
|
|
180
259
|
async canChangeBaseUri(baseUri) {
|
|
260
|
+
const isPaused = this.isPaused.getAndRequireEquals();
|
|
261
|
+
isPaused.assertFalse("Contract is paused");
|
|
181
262
|
return Bool(false);
|
|
182
263
|
}
|
|
183
264
|
/**
|
|
184
265
|
* Determines if the royalty fee can be changed for a Collection.
|
|
185
266
|
*/
|
|
186
267
|
async canChangeRoyalty(royaltyFee) {
|
|
268
|
+
const isPaused = this.isPaused.getAndRequireEquals();
|
|
269
|
+
isPaused.assertFalse("Contract is paused");
|
|
187
270
|
await this.ensureOwnerSignature();
|
|
188
|
-
|
|
271
|
+
const flags = NFTAdminAllowFlags.unpack(this.flags.getAndRequireEquals());
|
|
272
|
+
return flags.allowChangeRoyalty;
|
|
189
273
|
}
|
|
190
274
|
/**
|
|
191
275
|
* Determines if the transfer fee can be changed for a Collection.
|
|
192
276
|
*/
|
|
193
277
|
async canChangeTransferFee(transferFee) {
|
|
278
|
+
const isPaused = this.isPaused.getAndRequireEquals();
|
|
279
|
+
isPaused.assertFalse("Contract is paused");
|
|
194
280
|
await this.ensureOwnerSignature();
|
|
195
|
-
|
|
281
|
+
const flags = NFTAdminAllowFlags.unpack(this.flags.getAndRequireEquals());
|
|
282
|
+
return flags.allowChangeTransferFee;
|
|
196
283
|
}
|
|
197
284
|
/**
|
|
198
285
|
* Determines if the admin contract can be changed for a Collection.
|
|
199
286
|
*/
|
|
200
287
|
async canSetAdmin(admin) {
|
|
288
|
+
const isPaused = this.isPaused.getAndRequireEquals();
|
|
289
|
+
isPaused.assertFalse("Contract is paused");
|
|
201
290
|
return Bool(false);
|
|
202
291
|
}
|
|
203
292
|
/**
|
|
204
293
|
* Determines if the collection can be paused.
|
|
205
294
|
*/
|
|
206
295
|
async canPause() {
|
|
296
|
+
const isPaused = this.isPaused.getAndRequireEquals();
|
|
297
|
+
isPaused.assertFalse("Contract is paused");
|
|
207
298
|
await this.ensureOwnerSignature();
|
|
208
|
-
|
|
299
|
+
const flags = NFTAdminAllowFlags.unpack(this.flags.getAndRequireEquals());
|
|
300
|
+
return flags.allowPauseCollection;
|
|
209
301
|
}
|
|
210
302
|
/**
|
|
211
303
|
* Determines if the collection can be resumed.
|
|
212
304
|
*/
|
|
213
305
|
async canResume() {
|
|
306
|
+
const isPaused = this.isPaused.getAndRequireEquals();
|
|
307
|
+
isPaused.assertFalse("Contract is paused");
|
|
214
308
|
await this.ensureOwnerSignature();
|
|
215
|
-
|
|
309
|
+
const flags = NFTAdminAllowFlags.unpack(this.flags.getAndRequireEquals());
|
|
310
|
+
return flags.allowPauseCollection;
|
|
216
311
|
}
|
|
217
312
|
}
|
|
218
313
|
__decorate([
|
|
@@ -220,21 +315,21 @@ __decorate([
|
|
|
220
315
|
__metadata("design:type", Object)
|
|
221
316
|
], NFTAdmin.prototype, "admin", void 0);
|
|
222
317
|
__decorate([
|
|
223
|
-
state(
|
|
318
|
+
state(PublicKey),
|
|
224
319
|
__metadata("design:type", Object)
|
|
225
|
-
], NFTAdmin.prototype, "
|
|
320
|
+
], NFTAdmin.prototype, "pendingAdmin", void 0);
|
|
226
321
|
__decorate([
|
|
227
322
|
state(Bool),
|
|
228
323
|
__metadata("design:type", Object)
|
|
229
|
-
], NFTAdmin.prototype, "
|
|
324
|
+
], NFTAdmin.prototype, "isPaused", void 0);
|
|
230
325
|
__decorate([
|
|
231
326
|
state(Bool),
|
|
232
327
|
__metadata("design:type", Object)
|
|
233
|
-
], NFTAdmin.prototype, "
|
|
328
|
+
], NFTAdmin.prototype, "canBePaused", void 0);
|
|
234
329
|
__decorate([
|
|
235
|
-
state(
|
|
330
|
+
state(UInt8),
|
|
236
331
|
__metadata("design:type", Object)
|
|
237
|
-
], NFTAdmin.prototype, "
|
|
332
|
+
], NFTAdmin.prototype, "flags", void 0);
|
|
238
333
|
__decorate([
|
|
239
334
|
method,
|
|
240
335
|
__metadata("design:type", Function),
|
|
@@ -277,6 +372,12 @@ __decorate([
|
|
|
277
372
|
__metadata("design:paramtypes", [PublicKey]),
|
|
278
373
|
__metadata("design:returntype", Promise)
|
|
279
374
|
], NFTAdmin.prototype, "transferOwnership", null);
|
|
375
|
+
__decorate([
|
|
376
|
+
method.returns(PublicKey),
|
|
377
|
+
__metadata("design:type", Function),
|
|
378
|
+
__metadata("design:paramtypes", []),
|
|
379
|
+
__metadata("design:returntype", Promise)
|
|
380
|
+
], NFTAdmin.prototype, "acceptOwnership", null);
|
|
280
381
|
__decorate([
|
|
281
382
|
method.returns(Bool),
|
|
282
383
|
__metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../../src/contracts/admin.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,IAAI,EAEJ,MAAM,EACN,WAAW,EACX,SAAS,EACT,aAAa,EACb,KAAK,EACL,KAAK,EACL,eAAe,EACf,MAAM,EACN,KAAK,EACL,aAAa,EACb,MAAM,GACP,MAAM,MAAM,CAAC;AACd,OAAO,EACL,WAAW,EACX,QAAQ,EAER,gBAAgB,EAEhB,UAAU,EACV,oBAAoB,EAEpB,aAAa,GACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../../src/contracts/admin.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,IAAI,EAEJ,MAAM,EACN,WAAW,EACX,SAAS,EACT,aAAa,EACb,KAAK,EACL,KAAK,EACL,eAAe,EACf,MAAM,EAC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