Skip to content

Commit

Permalink
scene on chain validations
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Arregui committed Dec 23, 2022
1 parent bc03010 commit 1f1c000
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 340 deletions.
9 changes: 7 additions & 2 deletions etc/content-validator.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export type BlockInformation = {
// @public (undocumented)
export const calculateDeploymentSize: (deployment: DeploymentToValidate, externalCalls: ExternalCalls) => Promise<number | string>;

// @public (undocumented)
export type Checker = {
checkLAND(address: string, x: number, y: number, block: number): Promise<boolean>;
};

// @public (undocumented)
export type ConditionalValidation = {
predicate: (components: ContentValidatorComponents, deployment: DeploymentToValidate) => ValidationResponse | Promise<ValidationResponse>;
Expand Down Expand Up @@ -92,7 +97,7 @@ export const statelessValidations: readonly [Validation, Validation, Validation]
// @public
export type SubGraphs = {
L1: {
landManager: ISubgraphComponent;
checker: Checker;
collections: ISubgraphComponent;
ensOwner: ISubgraphComponent;
};
Expand Down Expand Up @@ -144,7 +149,7 @@ export type Warnings = string[];

// Warnings were encountered during analysis:
//
// src/types.ts:147:3 - (ae-forgotten-export) The symbol "PermissionResult" needs to be exported by the entry point index.d.ts
// src/types.ts:154:3 - (ae-forgotten-export) The symbol "PermissionResult" needs to be exported by the entry point index.d.ts

// (No @packageDocumentation comment for this package)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"typescript": "^4.7.3"
},
"dependencies": {
"@dcl/block-indexer": "1.0.0-20221219151053.commit-69f0ed7",
"@dcl/block-indexer": "^1.0.0-20221223191317.commit-2d753e7",
"@dcl/content-hash-tree": "^1.1.3",
"@dcl/hashing": "1.1.2",
"@dcl/schemas": "^5.4.2",
Expand Down
9 changes: 8 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,20 @@ export const fromErrors = (...errors: Errors): ValidationResponse => ({
errors: errors.length > 0 ? errors : undefined
})

/**
* @public
*/
export type Checker = {
checkLAND(address: string, x: number, y: number, block: number): Promise<boolean>
}

/**
* A list with all sub-graphs used for validations.
* @public
*/
export type SubGraphs = {
L1: {
landManager: ISubgraphComponent
checker: Checker
collections: ISubgraphComponent
ensOwner: ISubgraphComponent
}
Expand Down
Loading

0 comments on commit 1f1c000

Please sign in to comment.