Skip to content

Commit

Permalink
fix flags for creating token operations transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
popenta committed Dec 14, 2023
1 parent 09133bf commit 4ad5563
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 150 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@ describe("test token management transactions factory", () => {
canFreeze: true,
canWipe: true,
canPause: true,
canTransferNFTCreateRole: false,
canChangeOwner: true,
canUpgrade: true,
canAddSpecialRoles: true
canUpgrade: false,
canAddSpecialRoles: false
});

assert.deepEqual(draft.data, Buffer.from("issue@4652414e4b@4652414e4b@64@@63616e467265657a65@74727565@63616e57697065@74727565@63616e5061757365@74727565@63616e4368616e67654f776e6572@74727565@63616e55706772616465@74727565@63616e4164645370656369616c526f6c6573@74727565"));
assert.deepEqual(draft.data, Buffer.from("issue@4652414e4b@4652414e4b@64@@63616e467265657a65@74727565@63616e57697065@74727565@63616e5061757365@74727565@63616e4368616e67654f776e6572@74727565@63616e55706772616465@66616c7365@63616e4164645370656369616c526f6c6573@66616c7365"));
assert.equal(draft.sender, frank.address.toString());
assert.equal(draft.receiver, ESDT_CONTRACT_ADDRESS);
assert.deepEqual(draft.value, config.issueCost);
Expand All @@ -64,11 +63,11 @@ describe("test token management transactions factory", () => {
canPause: true,
canTransferNFTCreateRole: true,
canChangeOwner: true,
canUpgrade: true,
canAddSpecialRoles: true
canUpgrade: false,
canAddSpecialRoles: false
});

assert.deepEqual(draft.data, Buffer.from("issueSemiFungible@4652414e4b@4652414e4b@63616e467265657a65@74727565@63616e57697065@74727565@63616e5061757365@74727565@63616e5472616e736665724e4654437265617465526f6c65@74727565@63616e4368616e67654f776e6572@74727565@63616e55706772616465@74727565@63616e4164645370656369616c526f6c6573@74727565"));
assert.deepEqual(draft.data, Buffer.from("issueSemiFungible@4652414e4b@4652414e4b@63616e467265657a65@74727565@63616e57697065@74727565@63616e5061757365@74727565@63616e5472616e736665724e4654437265617465526f6c65@74727565@63616e4368616e67654f776e6572@74727565@63616e55706772616465@66616c7365@63616e4164645370656369616c526f6c6573@66616c7365"));
assert.equal(draft.sender, frank.address.toString());
assert.equal(draft.receiver, ESDT_CONTRACT_ADDRESS);
assert.deepEqual(draft.value, config.issueCost);
Expand All @@ -84,11 +83,11 @@ describe("test token management transactions factory", () => {
canPause: true,
canTransferNFTCreateRole: true,
canChangeOwner: true,
canUpgrade: true,
canAddSpecialRoles: true
canUpgrade: false,
canAddSpecialRoles: false
});

assert.deepEqual(draft.data, Buffer.from("issueNonFungible@4652414e4b@4652414e4b@63616e467265657a65@74727565@63616e57697065@74727565@63616e5061757365@74727565@63616e5472616e736665724e4654437265617465526f6c65@74727565@63616e4368616e67654f776e6572@74727565@63616e55706772616465@74727565@63616e4164645370656369616c526f6c6573@74727565"));
assert.deepEqual(draft.data, Buffer.from("issueNonFungible@4652414e4b@4652414e4b@63616e467265657a65@74727565@63616e57697065@74727565@63616e5061757365@74727565@63616e5472616e736665724e4654437265617465526f6c65@74727565@63616e4368616e67654f776e6572@74727565@63616e55706772616465@66616c7365@63616e4164645370656369616c526f6c6573@66616c7365"));
assert.equal(draft.sender, frank.address.toString());
assert.equal(draft.receiver, ESDT_CONTRACT_ADDRESS);
assert.deepEqual(draft.value, config.issueCost);
Expand All @@ -105,11 +104,11 @@ describe("test token management transactions factory", () => {
canPause: true,
canTransferNFTCreateRole: true,
canChangeOwner: true,
canUpgrade: true,
canAddSpecialRoles: true
canUpgrade: false,
canAddSpecialRoles: false
});

assert.deepEqual(draft.data, Buffer.from("registerMetaESDT@4652414e4b@4652414e4b@0a@63616e467265657a65@74727565@63616e57697065@74727565@63616e5061757365@74727565@63616e5472616e736665724e4654437265617465526f6c65@74727565@63616e4368616e67654f776e6572@74727565@63616e55706772616465@74727565@63616e4164645370656369616c526f6c6573@74727565"));
assert.deepEqual(draft.data, Buffer.from("registerMetaESDT@4652414e4b@4652414e4b@0a@63616e467265657a65@74727565@63616e57697065@74727565@63616e5061757365@74727565@63616e5472616e736665724e4654437265617465526f6c65@74727565@63616e4368616e67654f776e6572@74727565@63616e55706772616465@66616c7365@63616e4164645370656369616c526f6c6573@66616c7365"));
assert.equal(draft.sender, frank.address.toString());
assert.equal(draft.receiver, ESDT_CONTRACT_ADDRESS);
assert.deepEqual(draft.value, config.issueCost);
Expand Down
Loading

0 comments on commit 4ad5563

Please sign in to comment.