diff --git a/src/contract/deploy/CreateContract.ts b/src/contract/deploy/CreateContract.ts index a966a5f8..60f9241f 100644 --- a/src/contract/deploy/CreateContract.ts +++ b/src/contract/deploy/CreateContract.ts @@ -27,8 +27,8 @@ export type EvaluationManifest = { plugins?: WarpPluginType[]; }; -export const BUNDLR_NODES = ['node1', 'node2'] as const; -export type BundlrNodeType = (typeof BUNDLR_NODES)[number]; +export const REGISTER_PROVIDER = ['node1', 'node2', 'arweave'] as const; +export type RegisterProviderType = (typeof REGISTER_PROVIDER)[number]; export interface CommonContractData { wallet: ArWallet | CustomSignature | Signer; @@ -92,10 +92,13 @@ export interface CreateContract extends Source { deployBundled(rawDataItem: Buffer): Promise; /** - * Registers Bundlr transaction in Warp Gateway. One needs to upload contract transaction to Bundlr and pass its id in the method along - * with {@link BundlrNodeType}. For now, only AtomicNFTs contracts are accepted (dedicated tags are verified in the gateway). - * @param id - Bunldr's id of the uploaded contract transaction - * @param bundlrNode - {@link BundlrNodeType} + * Registers contract transaction in Warp Gateway. One needs to upload contract transaction using e.g. Irys, Turbo + * or arbundles and pass its id in the method along with {@link RegisterProviderType} - 'node1' and 'node2' for contracts + * deployed using Irys and 'arweave' for contracts deployed through other providers (contracts metadata is then queried + * from Arweave gql). + * Contract dedicated tags are verified in the gateway. + * @param id - id of the uploaded contract transaction + * @param registerProvider - {@link RegisterProviderType} */ - register(id: string, bundlrNode: BundlrNodeType): Promise; + register(id: string, registerProvider: RegisterProviderType): Promise; } diff --git a/src/core/Warp.ts b/src/core/Warp.ts index 1258fe38..441568bd 100644 --- a/src/core/Warp.ts +++ b/src/core/Warp.ts @@ -2,7 +2,7 @@ import Arweave from 'arweave'; import { Contract, InnerCallData } from '../contract/Contract'; import { ArWallet, - BundlrNodeType, + RegisterProviderType, ContractData, ContractDeploy, CreateContract, @@ -117,8 +117,8 @@ export class Warp { return await this.createContract.deployBundled(rawDataItem); } - async register(id: string, bundlrNode: BundlrNodeType): Promise { - return await this.createContract.register(id, bundlrNode); + async register(id: string, registerProvider: RegisterProviderType): Promise { + return await this.createContract.register(id, registerProvider); } async createSource(