Skip to content

Commit

Permalink
Change componentType model for approval process (#120)
Browse files Browse the repository at this point in the history
* Apply changes to componentType

* Align deploy request and response models
  • Loading branch information
shahnami authored Oct 13, 2023
1 parent f2eda8a commit dd6cf53
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/deploy/src/models/approval-process.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Network } from '@openzeppelin/defender-sdk-base-client';
import { Address } from '.';

export type ComponentType = 'deploy' | 'upgrade';
export type ComponentType = ('deploy' | 'upgrade')[];
export interface ApprovalProcessResponse {
approvalProcessId: string;
createdAt: string;
Expand Down
16 changes: 10 additions & 6 deletions packages/deploy/src/models/deployment.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Network } from '@openzeppelin/defender-sdk-base-client';
import { Address } from '.';

export type DeploymentStatus = 'submitted' | 'completed' | 'failed' | 'pending';
export type SourceCodeLicense =
| 'None'
| 'Unlicense'
Expand Down Expand Up @@ -30,6 +31,7 @@ export interface DeployContractRequest {
libraries?: DeployRequestLibraries;
constructorInputs?: (string | boolean | number)[];
relayerId?: string;
approvalProcessId?: string;
}
export interface DeployRequestLibraries {
[k: string]: string;
Expand All @@ -41,20 +43,22 @@ export interface DeploymentResponse {
contractName: string;
contractPath: string;
network: Network;
relayerId: string;
address: Address;
status: string;
relayerId?: string;
approvalProcessId?: string;
address?: Address;
status: DeploymentStatus;
pending?: number;
blockExplorerVerification: BlockExplorerVerification;
deployDataVerification: string;
bytecodeVerification: string;
deploymentArtifactId?: string;
transactionId: string;
txHash: string;
transactionId?: string;
txHash?: string;
abi: string;
bytecode: string;
constructorBytecode: string;
value: string;
salt: string;
salt?: string;
licenseType?: SourceCodeLicense;
libraries?: {
[k: string]: string;
Expand Down

0 comments on commit dd6cf53

Please sign in to comment.