Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,7 @@ model CreditTransfer {
model ContractCall {
id String @id @default(cuid())
companyId String
workflowId String
contractId String
methodName String
transactionHash String @unique
Expand All @@ -1363,6 +1364,7 @@ model ContractCall {
submittedAt DateTime @default(now())
confirmedAt DateTime?

@@unique([workflowId, contractId, methodName])
@@index([companyId])
@@index([contractId])
@@index([status])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type ContractAlias = 'carbonAsset' | 'retirementTracker';

export interface ContractInvocation {
companyId: string;
workflowId: string;
contractId: string;
methodName: string;
args?: unknown[];
Expand All @@ -17,6 +18,7 @@ export interface ContractSimulation {
contractId: string;
methodName: string;
args?: unknown[];
workflowId?: string;
}

export interface ContractExecutionResult {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { IsArray, IsIn, IsOptional, IsString } from 'class-validator';
import { IsArray, IsIn, IsNotEmpty, IsOptional, IsString } from 'class-validator';

export class ContractCallDto {
@IsNotEmpty()
@IsString()
workflowId: string;

@IsOptional()
@IsString()
contractId?: string;
Expand Down
Loading
Loading