Skip to content

Commit

Permalink
fix: fixed prerequisite-check with the correct contract artifacts (#697)
Browse files Browse the repository at this point in the history
* fix: fixed typo IHRC729 to IHRC719

Signed-off-by: Logan Nguyen <[email protected]>

* fix: fixed prerequisite-check with the correct contract artifacts

Signed-off-by: Logan Nguyen <[email protected]>

---------

Signed-off-by: Logan Nguyen <[email protected]>
  • Loading branch information
quiet-node authored Mar 5, 2024
1 parent b7224a1 commit 7275451
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ const getHederaSmartContractAssets = (HederaSmartContractsRootPath: string) => {
contractPath: `${HederaSmartContractsRootPath}/contracts/hts-precompile/examples/token-transfer/TokenTransferContract.sol`,
artifactPath: `${HederaSmartContractsRootPath}/artifacts/contracts/hts-precompile/examples/token-transfer/TokenTransferContract.sol/TokenTransferContract.json`,
},
IHRC729Contract: {
name: 'IHRC729Contract',
contractPath: `${HederaSmartContractsRootPath}/contracts/hts-precompile/examples/hrc/HRCContract.sol`,
artifactPath: `${HederaSmartContractsRootPath}/artifacts/contracts/hts-precompile/examples/hrc/HRCContract.sol/HRCContract.json`,
IHRC719Contract: {
name: 'IHRC719Contract',
contractPath: `${HederaSmartContractsRootPath}/contracts/hts-precompile/IHRC.sol`,
artifactPath: `${HederaSmartContractsRootPath}/artifacts/contracts/hts-precompile/IHRC.sol/IHRC.json`,
},
SelfFunding: {
name: 'SelfFunding',
contractPath: `${HederaSmartContractsRootPath}/contracts/exchange-rate-precompile/SelfFunding.sol`,
artifactPath: `${HederaSmartContractsRootPath}/artifacts/contracts/exchange-rate-precompile/SelfFunding.sol/SelfFunding.json`,
ExchangeRateMock: {
name: 'ExchangeRateMock',
contractPath: `${HederaSmartContractsRootPath}/contracts/exchange-rate-precompile/ExchangeRateMock.sol`,
artifactPath: `${HederaSmartContractsRootPath}/artifacts/contracts/exchange-rate-precompile/ExchangeRateMock.sol/ExchangeRateMock.json`,
},
PrngSystemContract: {
name: 'PrngSystemContract',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ const HEDERA_SMART_CONTRACTS = getHederaSmartContractAssetsFunc(HederaSmartContr
'TokenManagementContract',
'TokenTransferContract',
'PrngSystemContract',
'ExchangeRateMock',
'TokenQueryContract',
'IHRC729Contract',
'SelfFunding',
'IHRC719Contract',
'ERC20Mock',
'ERC721Mock',
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ const ContractInteraction = ({ contract }: PageProps) => {
{contract.methods.map((method) => {
return (
<TabPanel className={`whitespace-nowrap py-4`} key={method}>
{/* Contract information - not for IHRC729Contract*/}
{/* Contract information - not for IHRC719Contract*/}
{contract.name !== CONTRACT_NAMES.IHRC719 && (
<>
<div className="pb-6 flex flex-col gap-1 px-3 relative">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type TContractName =
| 'TokenTransferContract'
| 'TokenQueryContract'
| 'PrngSystemContract'
| 'IHRC729Contract'
| 'IHRC719Contract'
| 'ERC721Mock'
| 'ERC20Mock';

Expand Down
12 changes: 6 additions & 6 deletions system-contract-dapp-playground/src/utils/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import { TContractName } from '@/types/common';
import ERC20Mock from '@hashgraph-smartcontract/artifacts/contracts/openzeppelin/ERC-20/ERC20Mock.sol/ERC20Mock.json';
import IHRC729Contract from '@hashgraph-smartcontract/artifacts/contracts/hts-precompile/IHRC.sol/IHRC.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';
Expand Down Expand Up @@ -187,7 +187,7 @@ export const CONTRACT_NAMES: Record<string, TContractName> = {
ERC20: 'ERC20Mock',
ERC721: 'ERC721Mock',
PRNG: 'PrngSystemContract',
IHRC719: 'IHRC729Contract',
IHRC719: 'IHRC719Contract',
TOKEN_QUERY: 'TokenQueryContract',
TOKEN_TRANSFER: 'TokenTransferContract',
EXCHANGE_RATE: 'ExchangeRatePrecompile',
Expand Down Expand Up @@ -241,10 +241,10 @@ export const HEDERA_SMART_CONTRACTS_ASSETS = {
},
],
TOKEN_ASSOCIATION: {
name: 'IHRC729Contract' as TContractName,
name: 'IHRC719Contract' as TContractName,
title: 'Token Associate Example Contract',
contractABI: IHRC729Contract.abi,
contractBytecode: IHRC729Contract.bytecode,
contractABI: IHRC719Contract.abi,
contractBytecode: IHRC719Contract.bytecode,
githubUrl: `${HEDERA_SMART_CONTRACT_OFFICIAL_GITHUB_URL}/blob/main/contracts/hts-precompile/IHRC.sol`,
methods: ['IHRC / HIP-719'],
},
Expand Down Expand Up @@ -335,7 +335,7 @@ export const HEDERA_SHARED_PARAM_INPUT_FIELDS = {
export const CONTRACT_NAME_TO_STORAGE_KEY_VALUE: Record<TContractName, string> = {
ERC20Mock: 'ERC-20',
ERC721Mock: 'ERC-721',
IHRC729Contract: 'IHRC719',
IHRC719Contract: 'IHRC719',
PrngSystemContract: 'PRNG',
TokenQueryContract: 'TOKEN-QUERY',
TokenTransferContract: 'TOKEN-TRANSFER',
Expand Down

0 comments on commit 7275451

Please sign in to comment.