diff --git a/src/contracts/tokens/NFT.ts b/src/contracts/tokens/NFT.ts index 9c3c6110..3642d2dd 100644 --- a/src/contracts/tokens/NFT.ts +++ b/src/contracts/tokens/NFT.ts @@ -15,7 +15,7 @@ export class Nft extends SmartContract { * Estimate gas cost for createDatatoken token creation * @param {String} nftAddress NFT address * @param {String} address User address - * @param {String} minter User set as initial minter for the ERC20 + * @param {String} minter User set as initial minter for the Datatoken * @param {String} paymentCollector initial paymentCollector for this DT * @param {String} mpFeeAddress Consume marketplace fee address * @param {String} feeToken address of the token marketplace wants to add fee on top @@ -54,10 +54,10 @@ export class Nft extends SmartContract { } /** - * Create new ERC20 datatoken - only user with DatatokenDeployer permission can succeed + * Create new ERC20 Datatoken - only user with DatatokenDeployer permission can succeed * @param {String} nftAddress NFT address * @param {String} address User address - * @param {String} minter User set as initial minter for the ERC20 + * @param {String} minter User set as initial minter for the Datatoken * @param {String} paymentCollector initial paymentCollector for this DT * @param {String} mpFeeAddress Consume marketplace fee address * @param {String} feeToken address of the token marketplace wants to add fee on top @@ -66,7 +66,7 @@ export class Nft extends SmartContract { * @param {String} name Token name * @param {String} symbol Token symbol * @param {Number} templateIndex NFT template index - * @return {Promise} ERC20 datatoken address + * @return {Promise} ERC20 Datatoken address */ public async createDatatoken( nftAddress: string, @@ -587,7 +587,7 @@ export class Nft extends SmartContract { /** * This function allows to remove all ROLES at NFT level: Managers, DatatokenDeployer, MetadataUpdater, StoreUpdater * Even NFT Owner has to readd himself as Manager - * Permissions at erc20 level stay. + * Permissions at Datatoken level stay. * Only NFT Owner can call it. * @param {String} nftAddress NFT contract address * @param {String} address NFT Owner adress @@ -645,7 +645,7 @@ export class Nft extends SmartContract { /** * Transfers the NFT - * will clean all permissions both on NFT and erc20 level. + * will clean all permissions both on NFT and Datatoken level. * @param {String} nftAddress NFT contract address * @param {String} nftOwner Current NFT Owner adress * @param {String} nftReceiver User which will receive the NFT, will also be set as Manager @@ -715,7 +715,7 @@ export class Nft extends SmartContract { /** * safeTransferNFT Used for transferring the NFT, can be used by an approved relayer - * will clean all permissions both on NFT and erc20 level. + * will clean all permissions both on NFT and Datatoken level. * @param {String} nftAddress NFT contract address * @param {String} nftOwner Current NFT Owner adress * @param {String} nftReceiver User which will receive the NFT, will also be set as Manager @@ -796,7 +796,7 @@ export class Nft extends SmartContract { /** * safeTransferNFT Used for transferring the NFT, can be used by an approved relayer - * will clean all permissions both on NFT and erc20 level. + * will clean all permissions both on NFT and Datatoken level. * @param {String} nftAddress NFT contract address * @param {String} address Caller address NFT Owner adress * @return {Promise} trxReceipt diff --git a/src/utils/TokenUtils.ts b/src/utils/TokenUtils.ts index bd293946..344d11f3 100644 --- a/src/utils/TokenUtils.ts +++ b/src/utils/TokenUtils.ts @@ -39,7 +39,7 @@ export async function estApprove( * @param {String} account * @param {String} tokenAddress * @param {String} spender - * @param {String} amount amount of ERC20 tokens (always expressed as wei) + * @param {String} amount amount of ERC20 Datatokens (always expressed as wei) * @param {boolean} force if true, will overwrite any previous allowence. Else, will check if allowence is enough and will not send a transaction if it's not needed * @param {number} tokenDecimals optional number of decimals of the token */ @@ -110,7 +110,7 @@ export async function estTransfer( * @param {String} account * @param {String} tokenAddress * @param {String} recipient - * @param {String} amount amount of ERC20 tokens (not as wei) + * @param {String} amount amount of ERC20 Datatokens (not as wei) * @param {String} force if true, will overwrite any previous allowence. Else, will check if allowence is enough and will not send a transaction if it's not needed */ export async function transfer( @@ -144,7 +144,7 @@ export async function transfer( } /** - * Get Allowance for any erc20 + * Get Allowance for any Datatoken * @param {Web3} web3 * @param {String } tokenAdress * @param {String} account @@ -165,7 +165,7 @@ export async function allowance( } /** - * Get balance for any erc20 + * Get balance for any Datatoken * @param {Web3} web3 * @param {String} tokenAdress * @param {String} owner @@ -185,7 +185,7 @@ export async function balance( } /** - * Get decimals for any erc20 + * Get decimals for any Datatoken * @param {Web3} web3 * @param {String} tokenAdress * @return {Promise} Number of decimals of the token diff --git a/test/TestContractHandler.ts b/test/TestContractHandler.ts index dc3fae5d..890902bf 100644 --- a/test/TestContractHandler.ts +++ b/test/TestContractHandler.ts @@ -87,7 +87,7 @@ export const deployContracts = async (web3: Web3, owner: string): Promise { swapFeeMarketRunner: '0.001' } /// ``` - /// Before we call the contract we have to call `approve` so that the contract can move our tokens. This is standard when using any ERC20 tokens + /// Before we call the contract we have to call `approve` so that the contract can move our tokens. This is standard when using any ERC20 Datatokens /// ```Typescript await approve( web3, @@ -353,7 +353,7 @@ describe('Marketplace flow tests', async () => { const pool = new Pool(web3) /// ``` - /// Before we call the contract we have to call `approve` so that the contract can move our tokens. This is standard when using any ERC20 tokens + /// Before we call the contract we have to call `approve` so that the contract can move our tokens. This is standard when using any ERC20 Datatokens /// ```Typescript await approve(web3, stakerAccount, addresses.Ocean, poolAddress, '5', true) @@ -402,7 +402,7 @@ describe('Marketplace flow tests', async () => { console.log(`Consumer ${POOL_NFT_SYMBOL} balance before swap: ${consumerDTBalance}`) /// ``` - /// Before we call the contract we have to call `approve` so that the contract can move our tokens. This is standard when using any ERC20 tokens + /// Before we call the contract we have to call `approve` so that the contract can move our tokens. This is standard when using any ERC20 Datatokens /// ```Typescript await approve(web3, consumerAccount, addresses.Ocean, poolAddress, '100') @@ -644,7 +644,7 @@ describe('Marketplace flow tests', async () => { console.log(`Consumer ${FRE_NFT_SYMBOL} balance before swap: ${consumerDTBalance}`) /// ``` - /// Before we call the contract we have to call `approve` so that the contract can move our tokens. This is standard when using any ERC20 tokens + /// Before we call the contract we have to call `approve` so that the contract can move our tokens. This is standard when using any ERC20 Datatokens /// ```Typescript await approve(web3, consumerAccount, addresses.Ocean, freAddress, '100') await approve( diff --git a/test/integration/PublishFlows.test.ts b/test/integration/PublishFlows.test.ts index c7e84948..1d2b803c 100644 --- a/test/integration/PublishFlows.test.ts +++ b/test/integration/PublishFlows.test.ts @@ -95,7 +95,7 @@ describe('Publish tests', async () => { ) }) - it('should publish a dataset with pool (create NFT + ERC20 + pool) and with Metdata proof', async () => { + it('should publish a dataset with pool (create NFT + Datatoken + pool) and with Metdata proof', async () => { const poolDdo: DDO = { ...genericAsset } const nftParams: NftCreateData = { @@ -179,7 +179,7 @@ describe('Publish tests', async () => { assert(resolvedDDO, 'Cannot fetch DDO from Aquarius') }) - it('should publish a dataset with fixed price (create NFT + ERC20 + fixed price) with an explicit empty Metadata Proof', async () => { + it('should publish a dataset with fixed price (create NFT + Datoken + fixed price) with an explicit empty Metadata Proof', async () => { const fixedPriceDdo: DDO = { ...genericAsset } const nftParams: NftCreateData = { @@ -258,7 +258,7 @@ describe('Publish tests', async () => { assert(resolvedDDO, 'Cannot fetch DDO from Aquarius') }) - it('should publish a dataset with dispenser (create NFT + ERC20 + dispenser) with no defined MetadataProof', async () => { + it('should publish a dataset with dispenser (create NFT + Datatoken + dispenser) with no defined MetadataProof', async () => { const dispenserDdo: DDO = { ...genericAsset } const nftParams: NftCreateData = { diff --git a/test/integration/SimplePublishConsumeFlow.test.ts b/test/integration/SimplePublishConsumeFlow.test.ts index eab987c1..2720b2dc 100644 --- a/test/integration/SimplePublishConsumeFlow.test.ts +++ b/test/integration/SimplePublishConsumeFlow.test.ts @@ -72,7 +72,7 @@ describe('Simple Publish & consume test', async () => { consumerAccount = accounts[1] }) - it('should publish a dataset (create NFT + ERC20)', async () => { + it('should publish a dataset (create NFT + Datatoken)', async () => { const nft = new Nft(web3) const datatoken = new Datatoken(web3) const Factory = new NftFactory(addresses.ERC721Factory, web3) @@ -131,7 +131,7 @@ describe('Simple Publish & consume test', async () => { const resolvedDDO = await aquarius.waitForAqua(ddo.id) assert(resolvedDDO, 'Cannot fetch DDO from Aquarius') - // mint 1 ERC20 and send it to the consumer + // mint 1 Datatoken and send it to the consumer await datatoken.mint(datatokenAddress, publisherAccount, '1', consumerAccount) // initialize provider diff --git a/test/unit/factories/NftFactory.test.ts b/test/unit/factories/NftFactory.test.ts index f3a35fd7..27897877 100644 --- a/test/unit/factories/NftFactory.test.ts +++ b/test/unit/factories/NftFactory.test.ts @@ -359,7 +359,7 @@ describe('Nft Factory test', () => { assert(nftTemplate.isActive === true) }) - it('#addTokenTemplate - should add a new erc20 token template', async () => { + it('#addTokenTemplate - should add a new Datatokent template', async () => { const currentTokenTemplateCount = await nftFactory.getCurrentTokenTemplateCount() await nftFactory.addTokenTemplate(factoryOwner, contracts.erc20TemplateAddress) @@ -369,7 +369,7 @@ describe('Nft Factory test', () => { ) }) - it('#disableTokenTemplate - should disable an erc20 token template', async () => { + it('#disableTokenTemplate - should disable an Datatoken template', async () => { const currentTokenTemplateCount = await nftFactory.getCurrentTokenTemplateCount() let tokenTemplate = await nftFactory.getTokenTemplate(currentTokenTemplateCount) @@ -381,7 +381,7 @@ describe('Nft Factory test', () => { assert(tokenTemplate.isActive === false) }) - it('#reactivateTokenTemplate - should reactivate an previously disabled erc20 token template', async () => { + it('#reactivateTokenTemplate - should reactivate an previously disabled Datatoken template', async () => { const currentTokenTemplateCount = await nftFactory.getCurrentTokenTemplateCount() let tokenTemplate = await nftFactory.getTokenTemplate(currentTokenTemplateCount)