zapproject / hardhat-bsc

Zap Hardhat - Binance Smart Chain
16 stars 12 forks source link

Auction House Class Instance #316

Closed Kaleb47 closed 2 years ago

Kaleb47 commented 2 years ago

Description

Write a class instance for Auctionhouse.

export class AuctionHouse {
  public readonly chainId: number
  public readonly readOnly: boolean
  public readonly signerOrProvider: Signer | Provider
  public readonly auctionHouse: AuctionHouseContract
  public readonly zoraAddress: string

  constructor(signerOrProvider: Signer | Provider, chainId: number) {
    this.chainId = chainId
    this.readOnly = !Signer.isSigner(signerOrProvider)
    this.signerOrProvider = signerOrProvider
    const network = chainIdToNetworkName(chainId)
    const address = auctionHouseAddresses[network]
    this.auctionHouse = AuctionHouse__factory.connect(address, signerOrProvider)
    this.zoraAddress = addresses[network].media
  }
}

Definition of Done

kimanikelly commented 2 years ago

The AuctionHouse class was already configured in issue #319