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

more debugging

This commit is contained in:
paulo-ocean 2024-09-06 18:07:11 +01:00
parent fe3fbc4edd
commit 92a5ff92af
2 changed files with 39 additions and 2 deletions

View File

@ -336,6 +336,10 @@ export class ConfigHelper {
fs.readFileSync(process.env.ADDRESS_FILE, 'utf8')
)
: null
// test
if (addresses) {
console.log('config adding addresses: ', addresses)
}
} catch (e) {
console.log(e)
addresses = null

View File

@ -18,6 +18,7 @@ import { FreCreationParams } from '../@types/FixedPrice'
import { getEventFromTx } from './ContractUtils'
import { ProviderInstance } from '../services/Provider'
export const DEVELOPMENT_CHAIN_ID = 8996
// template address OR templateId
export function isConfidentialEVM(network: string | number): boolean {
const config = new ConfigHelper().getConfig(network)
@ -140,10 +141,42 @@ export async function createAsset(
const config = new ConfigHelper().getConfig(parseInt(String(chainID)))
console.log('Config is:', config)
// Config is: {
// chainId: 8996,
// network: 'development',
// metadataCacheUri: 'http://172.15.0.5:5000',
// nodeUri: 'http://127.0.0.1:8545',
// providerUri: 'http://172.15.0.4:8030',
// subgraphUri: 'https://172.15.0.15:8000',
// explorerUri: null,
// oceanTokenAddress: '0x2473f4F7bf40ed9310838edFCA6262C17A59DF64',
// oceanTokenSymbol: 'OCEAN',
// fixedRateExchangeAddress: '0xefdcb16b16C7842ec27c6fdCf56adc316B9B29B8',
// dispenserAddress: '0xfeA10BBb093d7fcb1EDf575Aa7e28d37b9DcFcE9',
// startBlock: 15,
// transactionBlockTimeout: 50,
// transactionConfirmationBlocks: 1,
// transactionPollingTimeout: 750,
// gasFeeMultiplier: 1,
// confidentialEVM: false,
// nftFactoryAddress: '0xEEE56e2a630DD29F9A628d618E58bb173911F393',
// opfCommunityFeeCollector: '0xFe0145Caf0EC55D23dc1b08431b071f6e1123a76',
// veAllocate: '0x15338ade17C4b6F65E4ff7b3aCE22AAdED00aC4d',
// veOCEAN: '0x17d55A3501999FFBF9b0623cDB258611419d01F5',
// veDelegation: '0x4999A8428d1D42fc955FbBC2f1E22323a55B6f86',
// veFeeDistributor: '0xE6E685823Ddd2e0D0B29917D84D687E5431136F6',
// veDelegationProxy: undefined,
// DFRewards: '0xc6eF91571a6d512985C885cb5EEB7aC8E6C47f4B',
// DFStrategyV1: '0xE4f7c64C52085A6df2c7c2972466EEf3ba3aD081',
// veFeeEstimate: '0x3Ef2ebF03002D828943EB1AbbFC470D1A53c6B21'
// }
const templateIndex = await calculateTemplateIndex(chainID, template)
let templateIndex = await calculateTemplateIndex(chainID, template)
if (templateIndex < 1) {
throw new Error(`Invalid template index: ${templateIndex}`)
// for testing purposes only
if (chainID === DEVELOPMENT_CHAIN_ID) {
templateIndex = 1
} else throw new Error(`Invalid template index: ${templateIndex}`)
}
const nft = new Nft(owner, chainID)