UNPKG

kamiweb3-sdk

Version:

TypeScript SDK for KAMI721-C, KAMI721-AC, and KAMI1155-C smart contracts

51 lines (50 loc) 2.17 kB
import { Signer, BigNumberish, AddressLike } from 'ethers'; import { ERC721ACWrapper } from '../contracts/ERC721ACWrapper'; import { SignerOrProvider } from '../types'; /** * Arguments required for deploying a standard KAMI721AC contract. */ export interface ERC721ACDeployArgs { usdcAddress: string; name: string; symbol: string; baseURI: string; initialMintPrice: BigNumberish; platformAddress: string; platformCommissionPercentage: BigNumberish; } /** * Arguments required for initializing the upgradeable ERC721AC contract. * Matches the DeployArgs for the standard version in this case. */ export type ERC721ACInitializeArgs = ERC721ACDeployArgs; export declare class ERC721ACFactory { /** * Attaches to an existing standard KAMI721AC contract. */ static attach(address: string, signerOrProvider: SignerOrProvider): ERC721ACWrapper; /** * Attaches to an existing upgradeable ERC721AC contract (proxy). * Uses the KAMI721ACUpgradeable ABI. */ static attachUpgradeable(proxyAddress: string, signerOrProvider: SignerOrProvider): ERC721ACWrapper; /** * Deploys a new standard KAMI721AC contract. */ static deploy(args: ERC721ACDeployArgs, signer: Signer): Promise<ERC721ACWrapper>; /** * Deploys a new upgradeable ERC721AC contract using the Transparent Proxy pattern. * @param initArgs The arguments for the initializer function. * @param signer The signer to use for deployment. * @param proxyAdminOwner (Optional) The address that will own the ProxyAdmin. Defaults to the signer. * @returns A Promise resolving to an ERC721ACWrapper instance attached to the proxy address. */ static deployUpgradeable(initArgs: ERC721ACInitializeArgs, signer: Signer, proxyAdminOwner?: AddressLike): Promise<ERC721ACWrapper>; /** * Initiates an upgrade of a KAMI721AC transparent proxy. * Deploys the new KAMI721ACUpgradeable implementation. * @param signer The signer for deployment. * @returns The address of the newly deployed implementation contract. */ static deployNewImplementation(signer: Signer): Promise<string>; }