Skip to main content

contractInstance sub-class

The SDK also exposes the contractInstance sub-class which provides an instance for contracts used in the Stakehouse Universe. These instances can be used to call smart contract functions that do not exist in the SDK.

Contract instances exposed by the sub-class

  • accountManager
  • transactionRouter
  • genericERC20Contract
  • dETHContract
  • safeBox
  • savETHBatch
  • savETHRegistry
  • savETHManager
  • slotSettlementRegistry
  • savETHIndexNamingRegistry
  • stakehouseUniverse
  • houseRagequitAdaptor

Using the contractInstance class

const transactionRouterInstance = (await sdk.contractInstance).transactionRouter();

All the contract instances can be directly accessed without any input parameter except for the genericERC20Contract. This contract instance can be used to import any ERC-20 contract that follows a generic pattern.

To use genericERC20Contract:

const erc20ContractAddress = <ADDRESS>;
const erc20ContractInstance = (await sdk.contractInstance).genericERC20Contract(erc20ContractAddress);