mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
change comments in Datatoken
This commit is contained in:
parent
bb16ad157d
commit
e97c88e00e
@ -742,7 +742,7 @@ export class FixedRateExchange extends SmartContractWithAddress {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collect BaseTokens in the contract (anyone can call this, funds are sent to erc20.paymentCollector)
|
* Collect BaseTokens in the contract (anyone can call this, funds are sent to Datatoken.paymentCollector)
|
||||||
* @param {String} address User address
|
* @param {String} address User address
|
||||||
* @param {String} exchangeId ExchangeId
|
* @param {String} exchangeId ExchangeId
|
||||||
* @param {String} amount amount to be collected
|
* @param {String} amount amount to be collected
|
||||||
@ -808,7 +808,7 @@ export class FixedRateExchange extends SmartContractWithAddress {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collect datatokens in the contract (anyone can call this, funds are sent to erc20.paymentCollector)
|
* Collect datatokens in the contract (anyone can call this, funds are sent to Datatoken.paymentCollector)
|
||||||
* @param {String} address User address
|
* @param {String} address User address
|
||||||
* @param {String} exchangeId ExchangeId
|
* @param {String} exchangeId ExchangeId
|
||||||
* @param {String} amount amount to be collected
|
* @param {String} amount amount to be collected
|
||||||
|
@ -186,7 +186,7 @@ export class Datatoken extends SmartContract {
|
|||||||
): Promise<TransactionReceipt> {
|
): Promise<TransactionReceipt> {
|
||||||
const dtContract = this.getContract(dtAddress)
|
const dtContract = this.getContract(dtAddress)
|
||||||
if (!(await this.isDatatokenDeployer(dtAddress, address))) {
|
if (!(await this.isDatatokenDeployer(dtAddress, address))) {
|
||||||
throw new Error(`User is not ERC20 Deployer`)
|
throw new Error(`User is not Datatoken Deployer`)
|
||||||
}
|
}
|
||||||
if (!fixedRateParams.allowedConsumer) fixedRateParams.allowedConsumer = ZERO_ADDRESS
|
if (!fixedRateParams.allowedConsumer) fixedRateParams.allowedConsumer = ZERO_ADDRESS
|
||||||
|
|
||||||
@ -287,7 +287,7 @@ export class Datatoken extends SmartContract {
|
|||||||
dispenserParams: DispenserParams
|
dispenserParams: DispenserParams
|
||||||
): Promise<TransactionReceipt> {
|
): Promise<TransactionReceipt> {
|
||||||
if (!(await this.isDatatokenDeployer(dtAddress, address))) {
|
if (!(await this.isDatatokenDeployer(dtAddress, address))) {
|
||||||
throw new Error(`User is not ERC20 Deployer`)
|
throw new Error(`User is not Datatoken Deployer`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const dtContract = this.getContract(dtAddress)
|
const dtContract = this.getContract(dtAddress)
|
||||||
@ -388,7 +388,7 @@ export class Datatoken extends SmartContract {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add Minter for an ERC20 datatoken
|
* Add Minter for an ERC20 Datatoken
|
||||||
* only DatatokenDeployer can succeed
|
* only DatatokenDeployer can succeed
|
||||||
* @param {String} dtAddress Datatoken address
|
* @param {String} dtAddress Datatoken address
|
||||||
* @param {String} address User address
|
* @param {String} address User address
|
||||||
@ -440,7 +440,7 @@ export class Datatoken extends SmartContract {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Revoke Minter permission for an ERC20 datatoken
|
* Revoke Minter permission for an ERC20 Datatoken
|
||||||
* only DatatokenDeployer can succeed
|
* only DatatokenDeployer can succeed
|
||||||
* @param {String} dtAddress Datatoken address
|
* @param {String} dtAddress Datatoken address
|
||||||
* @param {String} address User address
|
* @param {String} address User address
|
||||||
@ -545,7 +545,7 @@ export class Datatoken extends SmartContract {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Revoke paymentManager permission for an ERC20 datatoken
|
* Revoke paymentManager permission for an ERC20 Datatoken
|
||||||
* only DatatokenDeployer can succeed
|
* only DatatokenDeployer can succeed
|
||||||
* @param {String} dtAddress Datatoken address
|
* @param {String} dtAddress Datatoken address
|
||||||
* @param {String} address User address
|
* @param {String} address User address
|
||||||
@ -623,7 +623,7 @@ export class Datatoken extends SmartContract {
|
|||||||
nftAddress && !isNftOwner && (await this.nft.getNftPermissions(nftAddress, address))
|
nftAddress && !isNftOwner && (await this.nft.getNftPermissions(nftAddress, address))
|
||||||
const isDatatokenDeployer = nftPermissions?.deployDatatoken
|
const isDatatokenDeployer = nftPermissions?.deployDatatoken
|
||||||
if (!isPaymentManager && !isNftOwner && !isDatatokenDeployer) {
|
if (!isPaymentManager && !isNftOwner && !isDatatokenDeployer) {
|
||||||
throw new Error(`Caller is not Fee Manager, owner or erc20 Deployer`)
|
throw new Error(`Caller is not Fee Manager, owner or Datatoken Deployer`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const estGas = await estimateGas(
|
const estGas = await estimateGas(
|
||||||
@ -1011,7 +1011,7 @@ export class Datatoken extends SmartContract {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** setData
|
/** setData
|
||||||
* This function allows to store data with a preset key (keccak256(ERC20Address)) into NFT 725 Store
|
* This function allows to store data with a preset key (keccak256(dtAddress)) into NFT 725 Store
|
||||||
* only DatatokenDeployer can succeed
|
* only DatatokenDeployer can succeed
|
||||||
* @param {String} dtAddress Datatoken address
|
* @param {String} dtAddress Datatoken address
|
||||||
* @param {String} address User address
|
* @param {String} address User address
|
||||||
@ -1024,7 +1024,7 @@ export class Datatoken extends SmartContract {
|
|||||||
value: string
|
value: string
|
||||||
): Promise<TransactionReceipt> {
|
): Promise<TransactionReceipt> {
|
||||||
if (!(await this.isDatatokenDeployer(dtAddress, address))) {
|
if (!(await this.isDatatokenDeployer(dtAddress, address))) {
|
||||||
throw new Error(`User is not ERC20 Deployer`)
|
throw new Error(`User is not Datatoken Deployer`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const dtContract = this.getContract(dtAddress)
|
const dtContract = this.getContract(dtAddress)
|
||||||
@ -1058,7 +1058,7 @@ export class Datatoken extends SmartContract {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean erc20level Permissions (minters, paymentManager and reset the paymentCollector) for an ERC20 datatoken
|
* Clean Datatoken level Permissions (minters, paymentManager and reset the paymentCollector) for an ERC20 Datatoken
|
||||||
* Only NFT Owner (at 721 level) can call it.
|
* Only NFT Owner (at 721 level) can call it.
|
||||||
* @param dtAddress Datatoken address where we want to clean permissions
|
* @param dtAddress Datatoken address where we want to clean permissions
|
||||||
* @param address User adress
|
* @param address User adress
|
||||||
@ -1085,7 +1085,7 @@ export class Datatoken extends SmartContract {
|
|||||||
return trxReceipt
|
return trxReceipt
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns ERC20 user's permissions for a datatoken
|
/** Returns ERC20 Datatoken user's permissions for a datatoken
|
||||||
* @param {String} dtAddress Datatoken adress
|
* @param {String} dtAddress Datatoken adress
|
||||||
* @param {String} address user adress
|
* @param {String} address user adress
|
||||||
* @return {Promise<DatatokenRoles>}
|
* @return {Promise<DatatokenRoles>}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user