Skip to content

Commit

Permalink
revert me
Browse files Browse the repository at this point in the history
Signed-off-by: Logan Nguyen <[email protected]>
  • Loading branch information
quiet-node committed Dec 23, 2024
1 parent fceb411 commit 91f28c0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/server/tests/acceptance/rpc_batch2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -751,23 +751,33 @@ describe('@api-batch-2 RPC Server Acceptance Tests', function () {
let redirectBytecode: string;

async function createNftHTSToken(account) {
global.logger.debug(`INSIDE creating NFT HTS Token`);

const mainContract = new ethers.Contract(mainContractAddress, TokenCreateJson.abi, accounts[0].wallet);
const tx = await mainContract.createNonFungibleTokenPublic(account.wallet.address, {
value: BigInt('30000000000000000000'),
...Helper.GAS.LIMIT_5_000_000,
});
global.logger.debug(`Start creating NFT HTS Token`);
const receipt = await tx.wait();
global.logger.debug(`Finished creating NFT Token. Getting reeceipt=${JSON.stringify(receipt)}`);

global.logger.debug(`Start polling for receipt`);
await relay.pollForValidTransactionReceipt(receipt.hash);
global.logger.debug(`Finished polling for receipt`);

const { tokenAddress } = receipt.logs.filter(
(e) => e.fragment.name === RelayCalls.HTS_CONTRACT_EVENTS.CreatedToken,
)[0].args;

global.logger.debug(`NFT HTS TOKEN ADDRESS ${tokenAddress}`);
return tokenAddress;
}

before(async () => {
global.logger.debug(`Starting eth_getCode test suite`);
mainContract = await Utils.deployContract(TokenCreateJson.abi, TokenCreateJson.bytecode, accounts[3].wallet);
global.logger.debug(`Finished deploying mainContract: ${JSON.stringify(mainContract)}`);
mainContractAddress = mainContract.target as string;

const accountWithContractIdKey = await servicesNode.createAccountWithContractIdKey(
Expand All @@ -776,6 +786,7 @@ describe('@api-batch-2 RPC Server Acceptance Tests', function () {
relay.provider,
requestId,
);

NftHTSTokenContractAddress = await createNftHTSToken(accountWithContractIdKey);
});

Expand Down

0 comments on commit 91f28c0

Please sign in to comment.