From 238949495da10f83527cf6036004b4b43fe0bab0 Mon Sep 17 00:00:00 2001 From: Logan Nguyen Date: Mon, 10 Jun 2024 13:27:07 -0400 Subject: [PATCH] fix: renamed IHRC to IHRC719 Signed-off-by: Logan Nguyen --- .../hts-precompile/IHRC.sol/IHRC.json | 37 -------------- .../HRC719Contract.sol/HRC719Contract.json} | 8 +-- .../IHRC.json => IHRC719.sol/IHRC719.json} | 0 .../HRC632Contract.sol/HRC719Contract.json | 50 +++++++++++++++++++ .../HRC719Contract.sol/HRC719Contract.json} | 0 .../HRCContract.sol/HRC719Contract.json | 40 +++++++++++++++ contracts/hts-precompile/AtomicHTS.sol | 2 +- .../hts-precompile/{IHRC.sol => IHRC719.sol} | 2 +- .../HRC719Contract.sol} | 10 ++-- .../contracts-info/index.ts | 4 +- .../src/utils/common/constants.ts | 2 +- test/constants.js | 2 +- .../hts-precompile/HederaFungibleToken.sol | 8 +-- .../hts-precompile/HederaNonFungibleToken.sol | 8 +-- test/foundry/mocks/interfaces/IHRCCommon.sol | 4 +- .../HRC719Contract.js} | 24 +++++---- test/hts-precompile/utils.js | 10 ++-- 17 files changed, 132 insertions(+), 79 deletions(-) delete mode 100644 artifacts/contracts/hts-precompile/IHRC.sol/IHRC.json rename artifacts/contracts/hts-precompile/examples/{hrc/HRCContract.sol/HRCContract.json => hrc-719/HRC719Contract.sol/HRC719Contract.json} (87%) rename contracts-abi/contracts/hts-precompile/{IHRC.sol/IHRC.json => IHRC719.sol/IHRC719.json} (100%) create mode 100644 contracts-abi/contracts/hts-precompile/examples/hrc-632/HRC632Contract.sol/HRC719Contract.json rename contracts-abi/contracts/hts-precompile/examples/{hrc/HRCContract.sol/HRCContract.json => hrc-719/HRC719Contract.sol/HRC719Contract.json} (100%) create mode 100644 contracts-abi/contracts/hts-precompile/examples/hrc-719/HRCContract.sol/HRC719Contract.json rename contracts/hts-precompile/{IHRC.sol => IHRC719.sol} (91%) rename contracts/hts-precompile/examples/{hrc/HRCContract.sol => hrc-719/HRC719Contract.sol} (62%) rename test/hts-precompile/{hrc/HRCContract.js => hrc-719/HRC719Contract.js} (86%) diff --git a/artifacts/contracts/hts-precompile/IHRC.sol/IHRC.json b/artifacts/contracts/hts-precompile/IHRC.sol/IHRC.json deleted file mode 100644 index 4b61039a2..000000000 --- a/artifacts/contracts/hts-precompile/IHRC.sol/IHRC.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IHRC", - "sourceName": "contracts/hts-precompile/IHRC.sol", - "abi": [ - { - "inputs": [], - "name": "associate", - "outputs": [ - { - "internalType": "uint256", - "name": "responseCode", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "dissociate", - "outputs": [ - { - "internalType": "uint256", - "name": "responseCode", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/artifacts/contracts/hts-precompile/examples/hrc/HRCContract.sol/HRCContract.json b/artifacts/contracts/hts-precompile/examples/hrc-719/HRC719Contract.sol/HRC719Contract.json similarity index 87% rename from artifacts/contracts/hts-precompile/examples/hrc/HRCContract.sol/HRCContract.json rename to artifacts/contracts/hts-precompile/examples/hrc-719/HRC719Contract.sol/HRC719Contract.json index e01c893a9..46f7faf7d 100644 --- a/artifacts/contracts/hts-precompile/examples/hrc/HRCContract.sol/HRCContract.json +++ b/artifacts/contracts/hts-precompile/examples/hrc-719/HRC719Contract.sol/HRC719Contract.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", - "contractName": "HRCContract", - "sourceName": "contracts/hts-precompile/examples/hrc/HRCContract.sol", + "contractName": "HRC719Contract", + "sourceName": "contracts/hts-precompile/examples/hrc-719/HRC719Contract.sol", "abi": [ { "inputs": [ @@ -42,8 +42,8 @@ "type": "function" } ], - "bytecode": "0x608060405234801561001057600080fd5b506101a0806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063322e35501461003b578063d89f312314610060575b600080fd5b61004e610049366004610121565b610073565b60405190815260200160405180910390f35b61004e61006e366004610121565b6100df565b6000816001600160a01b0316635c9217e06040518163ffffffff1660e01b81526004016020604051808303816000875af11580156100b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d99190610151565b92915050565b6000816001600160a01b0316630a754de66040518163ffffffff1660e01b81526004016020604051808303816000875af11580156100b5573d6000803e3d6000fd5b60006020828403121561013357600080fd5b81356001600160a01b038116811461014a57600080fd5b9392505050565b60006020828403121561016357600080fd5b505191905056fea26469706673582212209b69498c3d65324aca9a621cdb22b17518951d53b840cd6ab19db1d7118729a964736f6c63430008170033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063322e35501461003b578063d89f312314610060575b600080fd5b61004e610049366004610121565b610073565b60405190815260200160405180910390f35b61004e61006e366004610121565b6100df565b6000816001600160a01b0316635c9217e06040518163ffffffff1660e01b81526004016020604051808303816000875af11580156100b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d99190610151565b92915050565b6000816001600160a01b0316630a754de66040518163ffffffff1660e01b81526004016020604051808303816000875af11580156100b5573d6000803e3d6000fd5b60006020828403121561013357600080fd5b81356001600160a01b038116811461014a57600080fd5b9392505050565b60006020828403121561016357600080fd5b505191905056fea26469706673582212209b69498c3d65324aca9a621cdb22b17518951d53b840cd6ab19db1d7118729a964736f6c63430008170033", + "bytecode": "0x608060405234801561001057600080fd5b506101a0806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063322e35501461003b578063d89f312314610060575b600080fd5b61004e610049366004610121565b610073565b60405190815260200160405180910390f35b61004e61006e366004610121565b6100df565b6000816001600160a01b0316635c9217e06040518163ffffffff1660e01b81526004016020604051808303816000875af11580156100b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d99190610151565b92915050565b6000816001600160a01b0316630a754de66040518163ffffffff1660e01b81526004016020604051808303816000875af11580156100b5573d6000803e3d6000fd5b60006020828403121561013357600080fd5b81356001600160a01b038116811461014a57600080fd5b9392505050565b60006020828403121561016357600080fd5b505191905056fea26469706673582212201f7d7d711f4ad53fba171b39af61c2bca7667409be78724526e5d3fed707264564736f6c63430008170033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063322e35501461003b578063d89f312314610060575b600080fd5b61004e610049366004610121565b610073565b60405190815260200160405180910390f35b61004e61006e366004610121565b6100df565b6000816001600160a01b0316635c9217e06040518163ffffffff1660e01b81526004016020604051808303816000875af11580156100b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d99190610151565b92915050565b6000816001600160a01b0316630a754de66040518163ffffffff1660e01b81526004016020604051808303816000875af11580156100b5573d6000803e3d6000fd5b60006020828403121561013357600080fd5b81356001600160a01b038116811461014a57600080fd5b9392505050565b60006020828403121561016357600080fd5b505191905056fea26469706673582212201f7d7d711f4ad53fba171b39af61c2bca7667409be78724526e5d3fed707264564736f6c63430008170033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts-abi/contracts/hts-precompile/IHRC.sol/IHRC.json b/contracts-abi/contracts/hts-precompile/IHRC719.sol/IHRC719.json similarity index 100% rename from contracts-abi/contracts/hts-precompile/IHRC.sol/IHRC.json rename to contracts-abi/contracts/hts-precompile/IHRC719.sol/IHRC719.json diff --git a/contracts-abi/contracts/hts-precompile/examples/hrc-632/HRC632Contract.sol/HRC719Contract.json b/contracts-abi/contracts/hts-precompile/examples/hrc-632/HRC632Contract.sol/HRC719Contract.json new file mode 100644 index 000000000..94a8bae1d --- /dev/null +++ b/contracts-abi/contracts/hts-precompile/examples/hrc-632/HRC632Contract.sol/HRC719Contract.json @@ -0,0 +1,50 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "hbarAllowance", + "outputs": [ + { + "internalType": "int64", + "name": "responseCode", + "type": "int64" + }, + { + "internalType": "int256", + "name": "amount", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "int256", + "name": "amount", + "type": "int256" + } + ], + "name": "hbarApprove", + "outputs": [ + { + "internalType": "int64", + "name": "responseCode", + "type": "int64" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/contracts-abi/contracts/hts-precompile/examples/hrc/HRCContract.sol/HRCContract.json b/contracts-abi/contracts/hts-precompile/examples/hrc-719/HRC719Contract.sol/HRC719Contract.json similarity index 100% rename from contracts-abi/contracts/hts-precompile/examples/hrc/HRCContract.sol/HRCContract.json rename to contracts-abi/contracts/hts-precompile/examples/hrc-719/HRC719Contract.sol/HRC719Contract.json diff --git a/contracts-abi/contracts/hts-precompile/examples/hrc-719/HRCContract.sol/HRC719Contract.json b/contracts-abi/contracts/hts-precompile/examples/hrc-719/HRCContract.sol/HRC719Contract.json new file mode 100644 index 000000000..e7b810a05 --- /dev/null +++ b/contracts-abi/contracts/hts-precompile/examples/hrc-719/HRCContract.sol/HRC719Contract.json @@ -0,0 +1,40 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "associate", + "outputs": [ + { + "internalType": "uint256", + "name": "responseCode", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "dissociate", + "outputs": [ + { + "internalType": "uint256", + "name": "responseCode", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/contracts/hts-precompile/AtomicHTS.sol b/contracts/hts-precompile/AtomicHTS.sol index 409dea5cd..a7f69b1c2 100644 --- a/contracts/hts-precompile/AtomicHTS.sol +++ b/contracts/hts-precompile/AtomicHTS.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.20; -import "./IHRC.sol"; +import "./IHRC719.sol"; import "./HederaTokenService.sol"; import "./IHederaTokenService.sol"; diff --git a/contracts/hts-precompile/IHRC.sol b/contracts/hts-precompile/IHRC719.sol similarity index 91% rename from contracts/hts-precompile/IHRC.sol rename to contracts/hts-precompile/IHRC719.sol index 903737040..0c2dea19a 100644 --- a/contracts/hts-precompile/IHRC.sol +++ b/contracts/hts-precompile/IHRC719.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity >=0.4.9 <0.9.0; -interface IHRC { +interface IHRC719 { function associate() external returns (uint256 responseCode); function dissociate() external returns (uint256 responseCode); } diff --git a/contracts/hts-precompile/examples/hrc/HRCContract.sol b/contracts/hts-precompile/examples/hrc-719/HRC719Contract.sol similarity index 62% rename from contracts/hts-precompile/examples/hrc/HRCContract.sol rename to contracts/hts-precompile/examples/hrc-719/HRC719Contract.sol index ff2d06b7b..fa2c7e170 100644 --- a/contracts/hts-precompile/examples/hrc/HRCContract.sol +++ b/contracts/hts-precompile/examples/hrc-719/HRC719Contract.sol @@ -1,14 +1,14 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.7; -import "../../IHRC.sol"; +import "../../IHRC719.sol"; -contract HRCContract { +contract HRC719Contract { function associate(address token) public returns (uint256 responseCode) { - return IHRC(token).associate(); + return IHRC719(token).associate(); } function dissociate(address token) public returns (uint256 responseCode) { - return IHRC(token).dissociate(); + return IHRC719(token).dissociate(); } -} \ No newline at end of file +} diff --git a/system-contract-dapp-playground/prerequisite-check/contracts-info/index.ts b/system-contract-dapp-playground/prerequisite-check/contracts-info/index.ts index a1361380d..476bee2b3 100644 --- a/system-contract-dapp-playground/prerequisite-check/contracts-info/index.ts +++ b/system-contract-dapp-playground/prerequisite-check/contracts-info/index.ts @@ -45,8 +45,8 @@ const getHederaSmartContractAssets = (HederaSmartContractsRootPath: string) => { }, IHRC719Contract: { name: 'IHRC719Contract', - contractPath: `${HederaSmartContractsRootPath}/contracts/hts-precompile/IHRC.sol`, - artifactPath: `${HederaSmartContractsRootPath}/artifacts/contracts/hts-precompile/IHRC.sol/IHRC.json`, + contractPath: `${HederaSmartContractsRootPath}/contracts/hts-precompile/IHRC719.sol`, + artifactPath: `${HederaSmartContractsRootPath}/artifacts/contracts/hts-precompile/IHRC719.sol/IHRC719.json`, }, ExchangeRateMock: { name: 'ExchangeRateMock', diff --git a/system-contract-dapp-playground/src/utils/common/constants.ts b/system-contract-dapp-playground/src/utils/common/constants.ts index 3718a1125..0a25aa240 100644 --- a/system-contract-dapp-playground/src/utils/common/constants.ts +++ b/system-contract-dapp-playground/src/utils/common/constants.ts @@ -19,8 +19,8 @@ */ import { TContractName } from '@/types/common'; +import IHRC719Contract from '@hashgraph-smartcontract/artifacts/contracts/hts-precompile/IHRC719.sol/IHRC719.json'; import ERC20Mock from '@hashgraph-smartcontract/artifacts/contracts/openzeppelin/ERC-20/ERC20Mock.sol/ERC20Mock.json'; -import IHRC719Contract from '@hashgraph-smartcontract/artifacts/contracts/hts-precompile/IHRC.sol/IHRC.json'; import ERC721Mock from '@hashgraph-smartcontract/artifacts/contracts/openzeppelin/ERC-721/ERC721Mock.sol/ERC721Mock.json'; import PrngSystemContract from '@hashgraph-smartcontract/artifacts/contracts/util-precompile/PrngSystemContract.sol/PrngSystemContract.json'; import ExchangeRatePrecompile from '@hashgraph-smartcontract/artifacts/contracts/exchange-rate-precompile/ExchangeRateMock.sol/ExchangeRateMock.json'; diff --git a/test/constants.js b/test/constants.js index 9b14cac94..e9a796eff 100644 --- a/test/constants.js +++ b/test/constants.js @@ -101,7 +101,7 @@ const Contract = { ERC20BurnableMock: 'ERC20BurnableMock', ERC20CappedMock: 'ERC20CappedMock', ERC20PausableMock: 'ERC20PausableMock', - HRCContract: 'HRCContract', + HRC719Contract: 'HRC719Contract', ExchangeRateMock: 'ExchangeRateMock', PrngSystemContract: 'PrngSystemContract', Concatenation: 'Concatenation', diff --git a/test/foundry/mocks/hts-precompile/HederaFungibleToken.sol b/test/foundry/mocks/hts-precompile/HederaFungibleToken.sol index 68043e0a4..195013c58 100644 --- a/test/foundry/mocks/hts-precompile/HederaFungibleToken.sol +++ b/test/foundry/mocks/hts-precompile/HederaFungibleToken.sol @@ -5,11 +5,11 @@ import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import '../../../../contracts/hts-precompile/HederaResponseCodes.sol'; import '../../../../contracts/hts-precompile/IHederaTokenService.sol'; -import '../../../../contracts/hts-precompile/IHRC.sol'; +import '../../../../contracts/hts-precompile/IHRC719.sol'; import './HtsSystemContractMock.sol'; import '../../../../contracts/libraries/Constants.sol'; -contract HederaFungibleToken is IHRC, ERC20, Constants { +contract HederaFungibleToken is IHRC719, ERC20, Constants { error HtsPrecompileError(int64 responseCode); HtsSystemContractMock internal constant HtsPrecompile = HtsSystemContractMock(HTS_PRECOMPILE); @@ -105,7 +105,7 @@ contract HederaFungibleToken is IHRC, ERC20, Constants { return _decimals; } - // IHRC setters: + // IHRC719 setters: function associate() external returns (uint256 responseCode) { responseCode = uint64(HtsPrecompile.preAssociate(msg.sender)); @@ -115,7 +115,7 @@ contract HederaFungibleToken is IHRC, ERC20, Constants { responseCode = uint64(HtsPrecompile.preDissociate(msg.sender)); } - // IHRC getters: + // IHRC719 getters: function isAssociated(address evmAddress) external view returns (bool) { return HtsPrecompile.isAssociated(evmAddress, address(this)); diff --git a/test/foundry/mocks/hts-precompile/HederaNonFungibleToken.sol b/test/foundry/mocks/hts-precompile/HederaNonFungibleToken.sol index 7812ab608..dba9a8cca 100644 --- a/test/foundry/mocks/hts-precompile/HederaNonFungibleToken.sol +++ b/test/foundry/mocks/hts-precompile/HederaNonFungibleToken.sol @@ -5,11 +5,11 @@ import '@openzeppelin/contracts/token/ERC721/ERC721.sol'; import '../../../../contracts/hts-precompile/HederaResponseCodes.sol'; import '../../../../contracts/hts-precompile/IHederaTokenService.sol'; -import '../../../../contracts/hts-precompile/IHRC.sol'; +import '../../../../contracts/hts-precompile/IHRC719.sol'; import './HtsSystemContractMock.sol'; import '../../../../contracts/libraries/Constants.sol'; -contract HederaNonFungibleToken is IHRC, ERC721, Constants { +contract HederaNonFungibleToken is IHRC719, ERC721, Constants { error HtsPrecompileError(int64 responseCode); HtsSystemContractMock internal constant HtsPrecompile = HtsSystemContractMock(HTS_PRECOMPILE); @@ -165,7 +165,7 @@ contract HederaNonFungibleToken is IHRC, ERC721, Constants { burned = nftCount.burned; } - // IHRC setters: + // IHRC719 setters: function associate() external returns (uint256 responseCode) { responseCode = uint64(HtsPrecompile.preAssociate(msg.sender)); @@ -175,7 +175,7 @@ contract HederaNonFungibleToken is IHRC, ERC721, Constants { responseCode = uint64(HtsPrecompile.preDissociate(msg.sender)); } - // IHRC getters: + // IHRC719 getters: function isAssociated(address evmAddress) external view returns (bool) { return HtsPrecompile.isAssociated(evmAddress, address(this)); diff --git a/test/foundry/mocks/interfaces/IHRCCommon.sol b/test/foundry/mocks/interfaces/IHRCCommon.sol index 1c41e1ae7..98028ebfc 100644 --- a/test/foundry/mocks/interfaces/IHRCCommon.sol +++ b/test/foundry/mocks/interfaces/IHRCCommon.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity >=0.4.9 <0.9.0; -import "../../../../contracts/hts-precompile/IHRC.sol"; +import "../../../../contracts/hts-precompile/IHRC719.sol"; interface IERCCommonToken { function balanceOf(address account) external view returns (uint256); } -interface IHRCCommon is IHRC, IERCCommonToken { +interface IHRCCommon is IHRC719, IERCCommonToken { // NOTE: can be moved into IHRC once implemented https://hips.hedera.com/hip/hip-719 function isAssociated(address evmAddress) external view returns (bool); } diff --git a/test/hts-precompile/hrc/HRCContract.js b/test/hts-precompile/hrc-719/HRC719Contract.js similarity index 86% rename from test/hts-precompile/hrc/HRCContract.js rename to test/hts-precompile/hrc-719/HRC719Contract.js index 609f59e49..d79e0fe28 100644 --- a/test/hts-precompile/hrc/HRCContract.js +++ b/test/hts-precompile/hrc-719/HRC719Contract.js @@ -25,13 +25,13 @@ const hre = require('hardhat'); const { ethers } = hre; const utils = require('../utils'); -describe('HRC Test Suite', function () { +describe('@HRC-719 Test Suite', function () { let tokenCreateContract; let tokenAddress; - let hrcContract; + let hrc719Contract; let signers; let hrcToken; - let IHRC; + let IHRC719; const parseCallResponseEventData = async (tx) => { return (await tx.wait()).logs.filter( @@ -52,7 +52,7 @@ describe('HRC Test Suite', function () { ]); // This contract is a wrapper for the associate() and dissociate() functions - hrcContract = await utils.deployHRCContract(); + hrc719Contract = await utils.deployHRC719Contract(); tokenAddress = await utils.createFungibleToken( tokenCreateContract, signers[0].address @@ -62,16 +62,18 @@ describe('HRC Test Suite', function () { ]); // create an interface for calling functions via redirectForToken() - IHRC = new ethers.Interface((await hre.artifacts.readArtifact('IHRC')).abi); + IHRC719 = new ethers.Interface( + (await hre.artifacts.readArtifact('IHRC719')).abi + ); // create a contract object for the token - hrcToken = new Contract(tokenAddress, IHRC, signers[0]); - console.log('hrcContract: ', await hrcContract.getAddress()); + hrcToken = new Contract(tokenAddress, IHRC719, signers[0]); + console.log('hrc719Contract: ', await hrc719Contract.getAddress()); console.log('signer: ', signers[0].address); console.log('tokenAddress: ', tokenAddress); }); it('should be able to associate() to the token from a contract', async function () { - const txAssociate = await hrcContract.associate( + const txAssociate = await hrc719Contract.associate( tokenAddress, Constants.GAS_LIMIT_1_000_000 ); @@ -81,7 +83,7 @@ describe('HRC Test Suite', function () { }); xit('should be able to disssociate() to the token from a contract', async function () { - const txDissociate = await hrcContract.dissociate( + const txDissociate = await hrc719Contract.dissociate( tokenAddress, Constants.GAS_LIMIT_1_000_000 ); @@ -107,7 +109,7 @@ describe('HRC Test Suite', function () { }); xit('should be able to execute associate() via redirectForToken', async function () { - const encodedFunc = IHRC.encodeFunctionData('associate()'); + const encodedFunc = IHRC719.encodeFunctionData('associate()'); const tx = await tokenCreateContract.redirectForToken( tokenAddress, encodedFunc, @@ -119,7 +121,7 @@ describe('HRC Test Suite', function () { }); xit('should be able to execute dissociate() via redirectForToken', async function () { - const encodedFunc = IHRC.encodeFunctionData('dissociate()'); + const encodedFunc = IHRC719.encodeFunctionData('dissociate()'); const tx = await tokenCreateContract.redirectForToken( tokenAddress, encodedFunc, diff --git a/test/hts-precompile/utils.js b/test/hts-precompile/utils.js index a613b0957..af43f0942 100644 --- a/test/hts-precompile/utils.js +++ b/test/hts-precompile/utils.js @@ -158,16 +158,16 @@ class Utils { ); } - static async deployHRCContract() { + static async deployHRC719Contract() { const hrcContractFactory = await ethers.getContractFactory( - Constants.Contract.HRCContract + Constants.Contract.HRC719Contract ); const hrcContract = await hrcContractFactory.deploy( Constants.GAS_LIMIT_1_000_000 ); return await ethers.getContractAt( - Constants.Contract.HRCContract, + Constants.Contract.HRC719Contract, await hrcContract.getAddress() ); } @@ -550,9 +550,7 @@ class Utils { } for (const privateKey of ecdsaPrivateKeys) { - const pkSigner = PrivateKey.fromStringECDSA( - privateKey.replace('0x', '') - ); + const pkSigner = PrivateKey.fromStringECDSA(privateKey.replace('0x', '')); const accountId = await Utils.getAccountId( pkSigner.publicKey.toEvmAddress(), clientGenesis