UNPKG

kamiweb3-sdk

Version:

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

60 lines 3.02 kB
import { Signer, BigNumberish } from 'ethers'; import { KAMI721CWrapper } from '../contracts/KAMI721CWrapper'; import { SignerOrProvider } from '../types'; /** * Arguments required for deploying the standard KAMI721C contract. */ export interface KAMI721CDeployArgs { paymentToken_: string; name_: string; symbol_: string; baseTokenURI_: string; initialMintPrice_: BigNumberish; platformAddress_: string; platformCommissionPercentage_: BigNumberish; } /** * Arguments required for initializing the upgradeable KAMI721C contract. * Matches the DeployArgs for the standard version in this case. */ export type KAMI721CInitializeArgs = KAMI721CDeployArgs; export declare class KAMI721CFactory { /** * Attaches to an existing standard KAMI721C contract. * @param address The address of the deployed KAMI721C contract. * @param signerOrProvider A Signer (for transactions) or Provider (for read-only). * @returns A KAMI721CWrapper instance using the standard ABI. */ static attach(address: string, signerOrProvider: SignerOrProvider): KAMI721CWrapper; /** * Attaches to an existing upgradeable KAMI721C contract (proxy). * @param proxyAddress The address of the deployed proxy contract. * @param signerOrProvider A Signer (for transactions) or Provider (for read-only). * @returns A KAMI721CWrapper instance using the upgradeable ABI. */ static attachUpgradeable(proxyAddress: string, signerOrProvider: SignerOrProvider): KAMI721CWrapper; /** * Deploys a new standard (non-upgradeable) KAMI721C contract. * @param args The deployment arguments based on the contract constructor. * @param signer The signer to use for deployment. * @returns A Promise resolving to a KAMI721CWrapper instance of the deployed contract. */ static deploy(args: KAMI721CDeployArgs, signer: Signer): Promise<KAMI721CWrapper>; /** * Deploys a new upgradeable KAMI721C 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 a KAMI721CWrapper instance attached to the proxy address. */ static deployUpgradeable(initArgs: KAMI721CInitializeArgs, signer: Signer, proxyAdminOwner?: string): Promise<KAMI721CWrapper>; /** * Initiates an upgrade of a transparent proxy to a new implementation contract. * This method deploys a new implementation contract but does not perform the upgrade itself. * The actual upgrade must be performed through the ProxyAdmin contract. * @param signer The signer to use for deployment. * @returns A Promise resolving to the address of the new implementation contract. */ static deployNewImplementation(signer: Signer): Promise<string>; } //# sourceMappingURL=KAMI721CFactory.d.ts.map