-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: implement chainfile * fix lock file * add read permission * fix imports
- Loading branch information
Showing
32 changed files
with
701 additions
and
1,263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' | ||
- package-ecosystem: npm | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' | ||
groups: | ||
eslint: | ||
patterns: | ||
- 'eslint' | ||
- '@eslint/*' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,18 +15,20 @@ | |
}, | ||
"devDependencies": { | ||
"@jest/globals": "^29.7.0", | ||
"@swc/core": "^1.5.24", | ||
"@swc/jest": "^0.2.36", | ||
"@types/node": "^20.11.30", | ||
"@swc/core": "^1.5.28", | ||
"@swc/jest": "0.2.36", | ||
"@types/node": "^20.14.2", | ||
"@workspace/eslint-config": "workspace:*", | ||
"@workspace/jest-preset": "workspace:*", | ||
"@workspace/prettier-config": "workspace:*", | ||
"@workspace/tsconfig": "workspace:*", | ||
"eslint": "^8.57.0", | ||
"husky": "^9.0.11", | ||
"jest": "29.7.0", | ||
"lint-staged": "^15.2.5", | ||
"prettier": "^3.2.5", | ||
"turbo": "^1.13.3", | ||
"typescript": "5.4.3", | ||
"prettier": "^3.3.2", | ||
"turbo": "^2.0.3", | ||
"typescript": "5.4.5", | ||
"wait-for-expect": "^3.0.2" | ||
}, | ||
"packageManager": "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "chainfile-solana", | ||
"version": "0.0.0", | ||
"private": false, | ||
"repository": { | ||
"url": "git+https://github.com/vetumorg/chainfile-solana" | ||
}, | ||
"license": "MPL-2.0", | ||
"files": [ | ||
"*.json" | ||
], | ||
"scripts": { | ||
"lint": "eslint .", | ||
"test": "jest" | ||
}, | ||
"jest": { | ||
"preset": "@workspace/jest-preset" | ||
}, | ||
"devDependencies": { | ||
"@chainfile/testcontainers": "^0.5.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"$schema": "https://chainfile.org/schema.json", | ||
"caip2": "solana:00000000000000000000000000000000", | ||
"name": "Solana Test Validator", | ||
"values": { | ||
"version": "1.18.15" | ||
}, | ||
"containers": { | ||
"solana": { | ||
"image": "ghcr.io/vetumorg/solana-test-validator", | ||
"tag": { | ||
"$value": "version" | ||
}, | ||
"source": "https://github.com/vetumorg/chainfile-solana", | ||
"resources": { | ||
"cpu": 0.25, | ||
"memory": 256 | ||
}, | ||
"endpoints": { | ||
"rpc": { | ||
"port": 8899, | ||
"protocol": "HTTP JSON-RPC 2.0", | ||
"probes": { | ||
"readiness": { | ||
"params": [], | ||
"method": "getBlockHeight", | ||
"match": { | ||
"result": { | ||
"type": "number" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { ChainfileTestcontainers } from '@chainfile/testcontainers'; | ||
import { afterAll, beforeAll, describe, expect, it } from '@jest/globals'; | ||
|
||
import test from './test-validator.json'; | ||
|
||
const testcontainers = new ChainfileTestcontainers(test); | ||
|
||
beforeAll(async () => { | ||
await testcontainers.start(); | ||
}); | ||
|
||
afterAll(async () => { | ||
await testcontainers.stop(); | ||
}); | ||
|
||
describe('solana', () => { | ||
it('should rpc(getBlockHeight)', async () => { | ||
const response = await testcontainers.get('solana').rpc({ | ||
method: 'getBlockHeight', | ||
}); | ||
|
||
expect(response.status).toStrictEqual(200); | ||
expect(await response.json()).toMatchObject({ | ||
result: 0, | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.