mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
rename createNftWithErc20 to createNftWithDatatoken
This commit is contained in:
parent
f59afbdc46
commit
2adb54c4eb
@ -163,7 +163,7 @@ export class NftFactory extends SmartContractWithAddress {
|
||||
return template
|
||||
}
|
||||
|
||||
/** Get Datatoken(ERC20) Template
|
||||
/** Get Datatoken (ERC20) Template
|
||||
* @param {Number} index Template index
|
||||
* @return {Promise<Template>} DT Template info
|
||||
*/
|
||||
@ -563,14 +563,14 @@ export class NftFactory extends SmartContractWithAddress {
|
||||
}
|
||||
|
||||
/**
|
||||
* Estimate gas cost for createNftWithErc20 method
|
||||
* Estimate gas cost for createNftWithDatatoken method
|
||||
* @param address Caller address
|
||||
* @param _NftCreateData input data for NFT creation
|
||||
* @param _ErcCreateData input data for Datatoken creation
|
||||
* @return {Promise<TransactionReceipt>} transaction receipt
|
||||
*/
|
||||
|
||||
public async estGasCreateNftWithErc20(
|
||||
public async estGasCreateNftWithDatatoken(
|
||||
address: string,
|
||||
nftCreateData: NftCreateData,
|
||||
ercParams: DatatokenCreateParams
|
||||
@ -585,7 +585,7 @@ export class NftFactory extends SmartContractWithAddress {
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev createNftWithErc20
|
||||
* @dev createNftWithDatatoken
|
||||
* Creates a new NFT, then a Datatoken,all in one call
|
||||
* @param address Caller address
|
||||
* @param _NftCreateData input data for nft creation
|
||||
@ -593,7 +593,7 @@ export class NftFactory extends SmartContractWithAddress {
|
||||
* @return {Promise<TransactionReceipt>} transaction receipt
|
||||
*/
|
||||
|
||||
public async createNftWithErc20(
|
||||
public async createNftWithDatatoken(
|
||||
address: string,
|
||||
nftCreateData: NftCreateData,
|
||||
ercParams: DatatokenCreateParams
|
||||
|
@ -242,7 +242,11 @@ async function createAsset(
|
||||
mpFeeAddress: ZERO_ADDRESS
|
||||
}
|
||||
|
||||
const result = await Factory.createNftWithErc20(owner, nftParamsAsset, datatokenParams)
|
||||
const result = await Factory.createNftWithDatatoken(
|
||||
owner,
|
||||
nftParamsAsset,
|
||||
datatokenParams
|
||||
)
|
||||
|
||||
const nftAddress = result.events.NFTCreated.returnValues[0]
|
||||
const datatokenAddressAsset = result.events.TokenCreated.returnValues[0]
|
||||
|
@ -96,7 +96,7 @@ describe('Simple Publish & consume test', async () => {
|
||||
mpFeeAddress: ZERO_ADDRESS
|
||||
}
|
||||
|
||||
const tx = await Factory.createNftWithErc20(
|
||||
const tx = await Factory.createNftWithDatatoken(
|
||||
publisherAccount,
|
||||
nftParams,
|
||||
datatokenParams
|
||||
|
@ -105,7 +105,11 @@ describe('Nft Factory test', () => {
|
||||
|
||||
it('#createNftwithErc - should create an NFT and a Datatoken', async () => {
|
||||
// we prepare transaction parameters objects
|
||||
const txReceipt = await nftFactory.createNftWithErc20(nftOwner, nftData, ercParams)
|
||||
const txReceipt = await nftFactory.createNftWithDatatoken(
|
||||
nftOwner,
|
||||
nftData,
|
||||
ercParams
|
||||
)
|
||||
|
||||
// events have been emitted
|
||||
expect(txReceipt.events.NFTCreated.event === 'NFTCreated')
|
||||
@ -120,7 +124,7 @@ describe('Nft Factory test', () => {
|
||||
const currentNFTCount = await nftFactory.getCurrentNFTCount()
|
||||
const currentTokenCount = await nftFactory.getCurrentTokenCount()
|
||||
|
||||
await nftFactory.createNftWithErc20(nftOwner, nftData, ercParams)
|
||||
await nftFactory.createNftWithDatatoken(nftOwner, nftData, ercParams)
|
||||
|
||||
expect((await nftFactory.getCurrentNFTCount()) === currentNFTCount + 1)
|
||||
expect((await nftFactory.getCurrentTokenCount()) === currentTokenCount + 1)
|
||||
|
@ -66,7 +66,7 @@ describe('Dispenser flow', () => {
|
||||
it('#createNftwithErc - should create an NFT and a Datatoken ', async () => {
|
||||
nftFactory = new NftFactory(contracts.nftFactoryAddress, web3)
|
||||
|
||||
const txReceipt = await nftFactory.createNftWithErc20(
|
||||
const txReceipt = await nftFactory.createNftWithDatatoken(
|
||||
factoryOwner,
|
||||
nftData,
|
||||
ercParams
|
||||
|
Loading…
x
Reference in New Issue
Block a user