mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
rename Erc20CreateParams to DatatokenCreateParams
This commit is contained in:
parent
29222ca85b
commit
6287005473
@ -97,7 +97,7 @@ import {
|
||||
Dispenser,
|
||||
DispenserCreationParams,
|
||||
downloadFile,
|
||||
Erc20CreateParams,
|
||||
DatatokenCreateParams,
|
||||
FixedRateExchange,
|
||||
FreCreationParams,
|
||||
getHash,
|
||||
@ -252,7 +252,7 @@ For pool creation, the OCEAN token is used as the base token. The base token can
|
||||
owner: publisherAccount
|
||||
}
|
||||
|
||||
const erc20Params: Erc20CreateParams = {
|
||||
const erc20Params: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
cap: '100000',
|
||||
feeAmount: '0',
|
||||
@ -526,7 +526,7 @@ Now let's console log the Consumer balance after order to check everything is wo
|
||||
owner: publisherAccount
|
||||
}
|
||||
|
||||
const erc20Params: Erc20CreateParams = {
|
||||
const erc20Params: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
cap: '100000',
|
||||
feeAmount: '0',
|
||||
@ -748,7 +748,7 @@ Lets check that the download URL was successfully received
|
||||
owner: publisherAccount
|
||||
}
|
||||
|
||||
const erc20Params: Erc20CreateParams = {
|
||||
const erc20Params: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
cap: '100000',
|
||||
feeAmount: '0',
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { ProviderFees } from '.'
|
||||
|
||||
export interface Erc20CreateParams {
|
||||
export interface DatatokenCreateParams {
|
||||
templateIndex: number
|
||||
minter: string
|
||||
paymentCollector: string
|
||||
|
@ -5,7 +5,7 @@ import ERC721Factory from '@oceanprotocol/contracts/artifacts/contracts/ERC721Fa
|
||||
import { LoggerInstance, generateDtName, estimateGas, ZERO_ADDRESS } from '../../utils'
|
||||
import {
|
||||
FreCreationParams,
|
||||
Erc20CreateParams,
|
||||
DatatokenCreateParams,
|
||||
PoolCreationParams,
|
||||
DispenserCreationParams,
|
||||
NftCreateData,
|
||||
@ -573,7 +573,7 @@ export class NftFactory extends SmartContractWithAddress {
|
||||
public async estGasCreateNftWithErc20(
|
||||
address: string,
|
||||
nftCreateData: NftCreateData,
|
||||
ercParams: Erc20CreateParams
|
||||
ercParams: DatatokenCreateParams
|
||||
): Promise<any> {
|
||||
const ercCreateData = this.getErcCreationParams(ercParams)
|
||||
return estimateGas(
|
||||
@ -596,7 +596,7 @@ export class NftFactory extends SmartContractWithAddress {
|
||||
public async createNftWithErc20(
|
||||
address: string,
|
||||
nftCreateData: NftCreateData,
|
||||
ercParams: Erc20CreateParams
|
||||
ercParams: DatatokenCreateParams
|
||||
): Promise<TransactionReceipt> {
|
||||
const ercCreateData = this.getErcCreationParams(ercParams)
|
||||
|
||||
@ -630,7 +630,7 @@ export class NftFactory extends SmartContractWithAddress {
|
||||
public async estGasCreateNftErc20WithPool(
|
||||
address: string,
|
||||
nftCreateData: NftCreateData,
|
||||
ercParams: Erc20CreateParams,
|
||||
ercParams: DatatokenCreateParams,
|
||||
poolParams: PoolCreationParams
|
||||
): Promise<any> {
|
||||
const ercCreateData = this.getErcCreationParams(ercParams)
|
||||
@ -657,7 +657,7 @@ export class NftFactory extends SmartContractWithAddress {
|
||||
public async createNftErc20WithPool(
|
||||
address: string,
|
||||
nftCreateData: NftCreateData,
|
||||
ercParams: Erc20CreateParams,
|
||||
ercParams: DatatokenCreateParams,
|
||||
poolParams: PoolCreationParams
|
||||
): Promise<TransactionReceipt> {
|
||||
const ercCreateData = this.getErcCreationParams(ercParams)
|
||||
@ -693,7 +693,7 @@ export class NftFactory extends SmartContractWithAddress {
|
||||
public async estGasCreateNftErc20WithFixedRate(
|
||||
address: string,
|
||||
nftCreateData: NftCreateData,
|
||||
ercParams: Erc20CreateParams,
|
||||
ercParams: DatatokenCreateParams,
|
||||
freParams: FreCreationParams
|
||||
): Promise<any> {
|
||||
const ercCreateData = this.getErcCreationParams(ercParams)
|
||||
@ -720,7 +720,7 @@ export class NftFactory extends SmartContractWithAddress {
|
||||
public async createNftErc20WithFixedRate(
|
||||
address: string,
|
||||
nftCreateData: NftCreateData,
|
||||
ercParams: Erc20CreateParams,
|
||||
ercParams: DatatokenCreateParams,
|
||||
freParams: FreCreationParams
|
||||
): Promise<TransactionReceipt> {
|
||||
const ercCreateData = this.getErcCreationParams(ercParams)
|
||||
@ -756,7 +756,7 @@ export class NftFactory extends SmartContractWithAddress {
|
||||
public async estGasCreateNftErc20WithDispenser(
|
||||
address: string,
|
||||
nftCreateData: NftCreateData,
|
||||
ercParams: Erc20CreateParams,
|
||||
ercParams: DatatokenCreateParams,
|
||||
dispenserParams: DispenserCreationParams
|
||||
): Promise<any> {
|
||||
const ercCreateData = this.getErcCreationParams(ercParams)
|
||||
@ -782,7 +782,7 @@ export class NftFactory extends SmartContractWithAddress {
|
||||
public async createNftErc20WithDispenser(
|
||||
address: string,
|
||||
nftCreateData: NftCreateData,
|
||||
ercParams: Erc20CreateParams,
|
||||
ercParams: DatatokenCreateParams,
|
||||
dispenserParams: DispenserCreationParams
|
||||
): Promise<TransactionReceipt> {
|
||||
const ercCreateData = this.getErcCreationParams(ercParams)
|
||||
@ -810,7 +810,7 @@ export class NftFactory extends SmartContractWithAddress {
|
||||
return trxReceipt
|
||||
}
|
||||
|
||||
getErcCreationParams(ercParams: Erc20CreateParams): any {
|
||||
getErcCreationParams(ercParams: DatatokenCreateParams): any {
|
||||
let name: string, symbol: string
|
||||
// Generate name & symbol if not present
|
||||
if (!ercParams.name || !ercParams.symbol) {
|
||||
|
@ -97,7 +97,7 @@ import {
|
||||
Dispenser,
|
||||
DispenserCreationParams,
|
||||
downloadFile,
|
||||
Erc20CreateParams,
|
||||
DatatokenCreateParams,
|
||||
FixedRateExchange,
|
||||
FreCreationParams,
|
||||
getHash,
|
||||
@ -252,7 +252,7 @@ describe('Marketplace flow tests', async () => {
|
||||
owner: publisherAccount
|
||||
}
|
||||
|
||||
const erc20Params: Erc20CreateParams = {
|
||||
const erc20Params: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
cap: '100000',
|
||||
feeAmount: '0',
|
||||
@ -526,7 +526,7 @@ describe('Marketplace flow tests', async () => {
|
||||
owner: publisherAccount
|
||||
}
|
||||
|
||||
const erc20Params: Erc20CreateParams = {
|
||||
const erc20Params: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
cap: '100000',
|
||||
feeAmount: '0',
|
||||
@ -748,7 +748,7 @@ describe('Marketplace flow tests', async () => {
|
||||
owner: publisherAccount
|
||||
}
|
||||
|
||||
const erc20Params: Erc20CreateParams = {
|
||||
const erc20Params: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
cap: '100000',
|
||||
feeAmount: '0',
|
||||
|
@ -13,7 +13,7 @@ import {
|
||||
ZERO_ADDRESS
|
||||
} from '../../src'
|
||||
import {
|
||||
Erc20CreateParams,
|
||||
DatatokenCreateParams,
|
||||
ComputeJob,
|
||||
ComputeAsset,
|
||||
ComputeAlgorithm,
|
||||
@ -232,7 +232,7 @@ async function createAsset(
|
||||
transferable: true,
|
||||
owner: owner
|
||||
}
|
||||
const erc20ParamsAsset: Erc20CreateParams = {
|
||||
const erc20ParamsAsset: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
cap: '100000',
|
||||
feeAmount: '0',
|
||||
|
@ -15,7 +15,7 @@ import {
|
||||
import {
|
||||
ValidateMetadata,
|
||||
DDO,
|
||||
Erc20CreateParams,
|
||||
DatatokenCreateParams,
|
||||
PoolCreationParams,
|
||||
FreCreationParams,
|
||||
DispenserCreationParams
|
||||
@ -107,7 +107,7 @@ describe('Publish tests', async () => {
|
||||
owner: publisherAccount
|
||||
}
|
||||
|
||||
const erc20Params: Erc20CreateParams = {
|
||||
const erc20Params: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
cap: '100000',
|
||||
feeAmount: '0',
|
||||
@ -191,7 +191,7 @@ describe('Publish tests', async () => {
|
||||
owner: publisherAccount
|
||||
}
|
||||
|
||||
const erc20Params: Erc20CreateParams = {
|
||||
const erc20Params: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
cap: '100000',
|
||||
feeAmount: '0',
|
||||
@ -270,7 +270,7 @@ describe('Publish tests', async () => {
|
||||
owner: publisherAccount
|
||||
}
|
||||
|
||||
const erc20Params: Erc20CreateParams = {
|
||||
const erc20Params: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
cap: '100000',
|
||||
feeAmount: '0',
|
||||
|
@ -13,7 +13,7 @@ import {
|
||||
downloadFile,
|
||||
ZERO_ADDRESS
|
||||
} from '../../src'
|
||||
import { ProviderFees, Erc20CreateParams, DDO } from '../../src/@types'
|
||||
import { ProviderFees, DatatokenCreateParams, DDO } from '../../src/@types'
|
||||
|
||||
describe('Simple Publish & consume test', async () => {
|
||||
let config: Config
|
||||
@ -86,7 +86,7 @@ describe('Simple Publish & consume test', async () => {
|
||||
owner: publisherAccount
|
||||
}
|
||||
|
||||
const erc20Params: Erc20CreateParams = {
|
||||
const erc20Params: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
cap: '100000',
|
||||
feeAmount: '0',
|
||||
|
@ -16,7 +16,7 @@ import {
|
||||
import {
|
||||
ProviderFees,
|
||||
FreCreationParams,
|
||||
Erc20CreateParams,
|
||||
DatatokenCreateParams,
|
||||
PoolCreationParams
|
||||
} from '../../../src/@types'
|
||||
|
||||
@ -43,7 +43,7 @@ describe('Nft Factory test', () => {
|
||||
owner: factoryOwner
|
||||
}
|
||||
|
||||
const ercParams: Erc20CreateParams = {
|
||||
const ercParams: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
minter: nftOwner,
|
||||
paymentCollector: user2,
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
approve,
|
||||
ZERO_ADDRESS
|
||||
} from '../../../src'
|
||||
import { Erc20CreateParams, PoolCreationParams, Operation } from '../../../src/@types'
|
||||
import { DatatokenCreateParams, PoolCreationParams, Operation } from '../../../src/@types'
|
||||
|
||||
const { keccak256 } = require('@ethersproject/keccak256')
|
||||
|
||||
@ -51,7 +51,7 @@ describe('Router unit test', () => {
|
||||
owner: factoryOwner
|
||||
}
|
||||
|
||||
const ERC_PARAMS: Erc20CreateParams = {
|
||||
const ERC_PARAMS: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
minter: factoryOwner,
|
||||
paymentCollector: user2,
|
||||
|
@ -15,7 +15,7 @@ import {
|
||||
} from '../../../../src'
|
||||
import {
|
||||
PoolCreationParams,
|
||||
Erc20CreateParams,
|
||||
DatatokenCreateParams,
|
||||
CurrentFees,
|
||||
TokenInOutMarket,
|
||||
AmountsInMaxFee,
|
||||
@ -30,7 +30,7 @@ describe('Pool unit test', () => {
|
||||
let pool: Pool
|
||||
let poolAddress: string
|
||||
let erc20Token: string
|
||||
let ercParams: Erc20CreateParams
|
||||
let ercParams: DatatokenCreateParams
|
||||
|
||||
const nftData: NftCreateData = {
|
||||
name: '72120Bundle',
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
Dispenser,
|
||||
ZERO_ADDRESS
|
||||
} from '../../../../src/'
|
||||
import { Erc20CreateParams } from '../../../../src/@types'
|
||||
import { DatatokenCreateParams } from '../../../../src/@types'
|
||||
|
||||
describe('Dispenser flow', () => {
|
||||
let factoryOwner: string
|
||||
@ -30,7 +30,7 @@ describe('Dispenser flow', () => {
|
||||
owner: null
|
||||
}
|
||||
|
||||
const ercParams: Erc20CreateParams = {
|
||||
const ercParams: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
minter: null,
|
||||
paymentCollector: null,
|
||||
|
@ -15,7 +15,7 @@ import {
|
||||
balance,
|
||||
unitsToAmount
|
||||
} from '../../../../src'
|
||||
import { FreCreationParams, Erc20CreateParams } from '../../../../src/@types'
|
||||
import { FreCreationParams, DatatokenCreateParams } from '../../../../src/@types'
|
||||
|
||||
describe('Fixed Rate unit test', () => {
|
||||
let factoryOwner: string
|
||||
@ -37,7 +37,7 @@ describe('Fixed Rate unit test', () => {
|
||||
owner: null
|
||||
}
|
||||
|
||||
const ercParams: Erc20CreateParams = {
|
||||
const ercParams: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
minter: null,
|
||||
paymentCollector: null,
|
||||
|
@ -18,7 +18,7 @@ import {
|
||||
ZERO_ADDRESS
|
||||
} from '../../../../src'
|
||||
import {
|
||||
Erc20CreateParams,
|
||||
DatatokenCreateParams,
|
||||
PoolCreationParams,
|
||||
TokenInOutMarket,
|
||||
AmountsInMaxFee,
|
||||
@ -52,7 +52,7 @@ describe('SideStaking unit test', () => {
|
||||
owner: null
|
||||
}
|
||||
|
||||
const ercParams: Erc20CreateParams = {
|
||||
const ercParams: DatatokenCreateParams = {
|
||||
templateIndex: 1,
|
||||
minter: null,
|
||||
paymentCollector: null,
|
||||
|
Loading…
x
Reference in New Issue
Block a user