1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

rename createERC20 to createDatatoken

This commit is contained in:
Miquel A. Cabot 2022-06-10 10:45:56 +02:00
parent 6db0cd0627
commit 01859a52f8
3 changed files with 9 additions and 9 deletions

View File

@ -12,7 +12,7 @@ export class Nft extends SmartContract {
}
/**
* Estimate gas cost for createERC20 token creation
* 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
@ -27,7 +27,7 @@ export class Nft extends SmartContract {
* @param {Contract} nftContract optional contract instance
* @return {Promise<any>}
*/
public async estGasGasCreateErc20(
public async estGasGasCreateDatatoken(
nftAddress: string,
address: string,
minter: string,
@ -68,7 +68,7 @@ export class Nft extends SmartContract {
* @param {Number} templateIndex NFT template index
* @return {Promise<string>} ERC20 datatoken address
*/
public async createErc20(
public async createDatatoken(
nftAddress: string,
address: string,
minter: string,

View File

@ -71,9 +71,9 @@ describe('Datatoken', () => {
nftDatatoken = new Nft(web3, 8996)
})
it('#createERC20 - should create a new ERC20 DT from NFT contract', async () => {
it('#createDatatoken - should create a new ERC20 DT from NFT contract', async () => {
await nftDatatoken.addDatatokenDeployer(nftAddress, nftOwner, erc20DeployerUser)
datatokenAddress = await nftDatatoken.createErc20(
datatokenAddress = await nftDatatoken.createDatatoken(
nftAddress,
nftOwner,
nftOwner,

View File

@ -50,8 +50,8 @@ describe('NFT', () => {
assert(tokenURI === nftData.tokenURI)
})
it('#createERC20 - should create a new ERC20 DT from NFT contract', async () => {
const erc20Address = await nftDatatoken.createErc20(
it('#createDatatoken - should create a new ERC20 DT from NFT contract', async () => {
const erc20Address = await nftDatatoken.createDatatoken(
nftAddress,
nftOwner,
nftOwner,
@ -67,9 +67,9 @@ describe('NFT', () => {
assert(erc20Address !== null)
})
it('#createERC20 - should fail to create a new ERC20 DT if not ERC20Deployer', async () => {
it('#createDatatoken - should fail to create a new ERC20 DT if not ERC20Deployer', async () => {
try {
await nftDatatoken.createErc20(
await nftDatatoken.createDatatoken(
nftAddress,
user1,
nftOwner,