diff --git a/examples/deploy-contract/index.js b/examples/deploy-contract/index.js index 8315cc09..8d093bd2 100644 --- a/examples/deploy-contract/index.js +++ b/examples/deploy-contract/index.js @@ -35,6 +35,11 @@ async function main() { licenseType: 'MIT', verifySourceCode: true, constructorBytecode: AbiCoder.defaultAbiCoder().encode(['uint'], ['5']), // or constructorInputs: [5], + metadata: { + commitHash: '1234567890abcdef', + tag: 'v1.0.0', + anyOtherField: 'anyValue', + }, }); const deploymentStatus = await client.deploy.getDeployedContract(deployment.deploymentId); diff --git a/packages/deploy/src/models/deployment.ts b/packages/deploy/src/models/deployment.ts index 4c531137..5d5be2f1 100644 --- a/packages/deploy/src/models/deployment.ts +++ b/packages/deploy/src/models/deployment.ts @@ -50,11 +50,21 @@ export interface DeployContractRequest { * @default undefined */ txOverrides?: TxOverrides; + /* + * A note to be included in the deployment. + */ + metadata?: DeployMetadata; } export interface DeployRequestLibraries { [k: `${string}:${string}`]: string; } +export interface DeployMetadata { + commitHash?: string; + tag?: string; + [k: string]: any; +} + export interface DeploymentResponse { deploymentId: string; createdAt: string;