Skip to content

Commit

Permalink
feat: add support to deployment metadata (#532)
Browse files Browse the repository at this point in the history
* add support to deployment notes

* add metadata field to deployments instead of note
  • Loading branch information
MCarlomagno authored Sep 4, 2024
1 parent cecac6f commit 7d969a1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/deploy-contract/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 10 additions & 0 deletions packages/deploy/src/models/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7d969a1

Please sign in to comment.