The SDK also exposes the contractInstance sub-class which provides an instance for contracts used in the K2 lending protocol. These instances can be used to call smart contract functions that may or may not exist in the SDK.
Contract instances exposed by the sub-class
- K2LendingContract
- K2LendingDepositor
- ReporterRegistry
- nodeOperatorModule
- rst
- rstModule
- k2NativeDelegationRSTIncentives
- nodeOperatorInclusionList
- partitionedLinearInterestRateModel
Using the contractInstance class
const K2LendingContractInstance = await sdk.contracts.K2LendingContract();
const K2LendingDepositorInstance = await sdk.contracts.K2LendingDepositor();
const reporterRegistryInstance = await sdk.contracts.reporterRegistry();
const nodeOperatorModuleInstance = await sdk.contracts.nodeOperatorModule();
const rstInstance = await sdk.contracts.rst(rstAddress);
const rstModuleInstance = await sdk.contracts.rstModule();
const multicallContract = await sdk.contracts.multicallContract();
const k2NativeDelegationRSTIncentivesInstance = await sdk.contracts.k2NativeDelegationRSTIncentives();
const nodeOperatorInclusionListInstance = await sdk.contracts.nodeOperatorInclusionList();
const partitionedLinearInterestRateModelInstance = await sdk.contracts.partitionedLinearInterestRateModel();
const fundSplitterFactory = await sdk.contracts.fundSplitterFactory();
const fundSplitter = await sdk.contracts.fundSplitter(fundSplitterAddress);
const pnoRegistry = await sdk.contracts.pnoRegistry();
const lien = await sdk.contracts.lien();
All the contract instances can be directly accessed without any input parameter.