Skip to content

Commit

Permalink
Merge pull request #480 from multiversx/esdt-09-20
Browse files Browse the repository at this point in the history
Fix cost for registering dynamic NFTs
  • Loading branch information
andreibancioiu authored Sep 20, 2024
2 parents 6dbbd06 + 5a21fef commit 3986959
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-localnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
mkdir -p ~/localnet && cd ~/localnet
mxpy localnet setup
nohup mxpy localnet start > localnet.log 2>&1 & echo $! > localnet.pid
sleep 60 # Allow time for the testnet to fully start
sleep 120 # Allow time for the testnet to fully start
# Step 6: Install Node.js and dependencies
- name: Set up Node.js environment
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-core",
"version": "13.6.1",
"version": "13.6.2",
"description": "MultiversX SDK for JavaScript and TypeScript",
"author": "MultiversX",
"homepage": "https://multiversx.com",
Expand Down
8 changes: 4 additions & 4 deletions src/transaction.local.net.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { loadTestWallets, TestWallet } from "./testutils";
import { createLocalnetProvider, INetworkProvider } from "./testutils/networkProviders";
import { TokenTransfer } from "./tokens";
import { Transaction } from "./transaction";
import { TransactionComputer } from "./transactionComputer";
import { TransactionPayload } from "./transactionPayload";
import { TransactionWatcher } from "./transactionWatcher";
import { TransactionsFactoryConfig } from "./transactionsFactories/transactionsFactoryConfig";
import { TransferTransactionsFactory } from "./transactionsFactories/transferTransactionsFactory";
import { TransactionComputer } from "./transactionComputer";

describe("test transaction", function () {
let alice: TestWallet, bob: TestWallet;
Expand All @@ -30,7 +30,7 @@ describe("test transaction", function () {
}

it("should send transactions and wait for completion", async function () {
this.timeout(70000);
this.timeout(80000);

let provider = createLocalnetProvider();
let watcher = createTransactionWatcher(provider);
Expand Down Expand Up @@ -76,7 +76,7 @@ describe("test transaction", function () {
});

it("should send transaction and wait for completion using the new proxy provider", async function () {
this.timeout(70000);
this.timeout(80000);

let provider = createLocalnetProvider();
let watcher = createTransactionWatcher(provider);
Expand Down Expand Up @@ -142,7 +142,7 @@ describe("test transaction", function () {
});

it("should create transaction using the TokenTransferFactory", async function () {
this.timeout(70000);
this.timeout(80000);

const provider = createLocalnetProvider();
const watcher = createTransactionWatcher(provider);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { assert } from "chai";
import { Address } from "../address";
import { ESDT_CONTRACT_ADDRESS_HEX } from "../constants";
import { loadTestWallets, TestWallet } from "../testutils";
import { TokenManagementTransactionsFactory } from "./tokenManagementTransactionsFactory";
import { TransactionsFactoryConfig } from "./transactionsFactoryConfig";
import { Address } from "../address";

describe("test token management transactions factory", () => {
let frank: TestWallet, grace: TestWallet;
Expand Down Expand Up @@ -354,7 +354,7 @@ describe("test token management transactions factory", () => {
assert.deepEqual(transaction.data, Buffer.from("registerDynamic@54657374@544553542d313233343536@464e47"));
assert.equal(transaction.sender, grace.address.toString());
assert.equal(transaction.receiver, Address.newFromHex(ESDT_CONTRACT_ADDRESS_HEX, config.addressHrp).toBech32());
assert.equal(transaction.value, 0n);
assert.equal(transaction.value, 50000000000000000n);
assert.equal(transaction.gasLimit, 60131000n);
});

Expand All @@ -372,7 +372,7 @@ describe("test token management transactions factory", () => {
);
assert.equal(transaction.sender, grace.address.toString());
assert.equal(transaction.receiver, Address.newFromHex(ESDT_CONTRACT_ADDRESS_HEX, config.addressHrp).toBech32());
assert.equal(transaction.value, 0n);
assert.equal(transaction.value, 50000000000000000n);
assert.equal(transaction.gasLimit, 60152000n);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,7 @@ export class TokenManagementTransactionsFactory {
dataParts: dataParts,
gasLimit: this.config.gasLimitRegisterDynamic,
addDataMovementGas: true,
amount: this.config.issueCost,
}).build();
}

Expand All @@ -881,6 +882,7 @@ export class TokenManagementTransactionsFactory {
dataParts: dataParts,
gasLimit: this.config.gasLimitRegisterDynamic,
addDataMovementGas: true,
amount: this.config.issueCost,
}).build();
}

Expand Down

0 comments on commit 3986959

Please sign in to comment.