kamiweb3-sdk
Version:
TypeScript SDK for KAMI721-C, KAMI721-AC, and KAMI1155-C smart contracts
51 lines (50 loc) • 2.17 kB
TypeScript
import { Signer, BigNumberish, AddressLike } from 'ethers';
import { ERC1155CWrapper } from '../contracts/ERC1155CWrapper';
import { SignerOrProvider } from '../types';
/**
* Arguments required for deploying a standard KAMI1155C contract.
*/
export interface ERC1155CDeployArgs {
usdcAddress: string;
baseURI: string;
name: string;
symbol: string;
initialMintPrice: BigNumberish;
platformAddress: string;
platformCommissionPercentage: BigNumberish;
}
/**
* Arguments required for initializing the upgradeable ERC1155C contract.
* Matches the DeployArgs for the standard version in this case.
*/
export type ERC1155CInitializeArgs = ERC1155CDeployArgs;
export declare class ERC1155CFactory {
/**
* Attaches to an existing standard KAMI1155C contract.
*/
static attach(address: string, signerOrProvider: SignerOrProvider): ERC1155CWrapper;
/**
* Attaches to an existing upgradeable ERC1155C contract (proxy).
* Uses the KAMI1155CUpgradeable ABI.
*/
static attachUpgradeable(proxyAddress: string, signerOrProvider: SignerOrProvider): ERC1155CWrapper;
/**
* Deploys a new standard KAMI1155C contract.
*/
static deploy(args: ERC1155CDeployArgs, signer: Signer): Promise<ERC1155CWrapper>;
/**
* Deploys a new upgradeable ERC1155C 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 ERC1155CWrapper instance attached to the proxy address.
*/
static deployUpgradeable(initArgs: ERC1155CInitializeArgs, signer: Signer, proxyAdminOwner?: AddressLike): Promise<ERC1155CWrapper>;
/**
* Initiates an upgrade of a KAMI1155C transparent proxy.
* Deploys the new KAMI1155CUpgradeable implementation.
* @param signer The signer for deployment.
* @returns The address of the newly deployed implementation contract.
*/
static deployNewImplementation(signer: Signer): Promise<string>;
}