Custom Configuration
If want to use a custom configuration of your nautilus instance, you can set an additional config
parameter in the Nautilus.create()
call.
The custom configuration provided will overwrite the default network config that is accessible in the ocean.js repository.
Example
import { Nautilus } from '@deltadao/nautilus'
import { Wallet } from 'ethers'
const nautilus = await Nautilus.create(
new Wallet('0x1234'),
{
nodeUri: 'https://rpc.dev.pontus-x.eu',
metadataCacheUri: 'https://aquarius.dev.pontus-x.eu'
}
)
For the most common use-cases we provide examples below, but if you need a full picture on what configurations are available we recommend the Ocean Library Docs.
Custom Metadata Cache
const customConfig: Partial<Config> = {
metadataCacheUri: 'https://aquarius.dev.pontus-x.eu'
}
Custom Provider
const customConfig: Partial<Config> = {
providerUri: 'https://provider.dev.pontus-x.eu'
}
Custom RPC Endpoint
const customConfig: Partial<Config> = {
nodeUri: 'https://rpc.dev.pontus-x.eu'
}
Custom Network
If your network is not yet supported by the official ocean.js repository, you can still interact with it by providing all necessary configurations.
const customConfig = {
chainId: 32456,
network: 'pontusx',
metadataCacheUri: 'https://aquarius.dev.pontus-x.eu',
nodeUri: 'https://rpc.dev.pontus-x.eu',
providerUri: 'https://provider.dev.pontus-x.eu',
subgraphUri: 'https://subgraph.dev.pontus-x.eu',
oceanTokenAddress: '0xdF171F74a8d3f4e2A789A566Dce9Fa4945196112',
oceanTokenSymbol: 'OCEAN',
fixedRateExchangeAddress: '0x8372715D834d286c9aECE1AcD51Da5755B32D505',
dispenserAddress: '0x5461b629E01f72E0A468931A36e039Eea394f9eA',
nftFactoryAddress: '0xFdC4a5DEaCDfc6D82F66e894539461a269900E13',
providerAddress: '0x68C24FA5b2319C81b34f248d1f928601D2E5246B'
} satisfies Partial<Config>