Skip to content

Commit

Permalink
751 0212 (#755)
Browse files Browse the repository at this point in the history
* Pin all polkadot stuff to versions 10.9.1 and 12.3.2

* import contracts and lint

* switch to prosopo typechain

* Overrides

* package-lock.json

* Consistent versions

* Switch back to typechain

* Update package-lock

* package-lock.json

* Fix contract importing

* Remove brackets from regex

* Fix imports

* import contracts

* import contracts

* package-lock.json

* use most recent prosopo versions

* package-lock.json

* remove npm as dep

* reset npm version
  • Loading branch information
forgetso authored Nov 1, 2023
1 parent 5566d5c commit 0399c82
Show file tree
Hide file tree
Showing 44 changed files with 686 additions and 3,341 deletions.
6 changes: 3 additions & 3 deletions contracts/captcha/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/captcha-contract",
"version": "0.2.11",
"version": "0.2.12",
"description": "The captcha contract",
"main": "dist/index.js",
"type": "module",
Expand Down Expand Up @@ -31,8 +31,8 @@
"@polkadot/rpc-provider": "10.10.1",
"@polkadot/typegen": "10.10.1",
"@polkadot/types-create": "10.10.1",
"@polkadot/util": "12.3.2",
"@polkadot/util-crypto": "12.3.2"
"@polkadot/util": "12.5.1",
"@polkadot/util-crypto": "12.5.1"
},
"devDependencies": {
"tslib": "2.6.2",
Expand Down
4 changes: 2 additions & 2 deletions contracts/captcha/src/captcha.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": {
"hash": "0xf1782055adbb2e706c722735dd41ad6e34d28ac55a8b3c8fc833b2d0c4f723d1",
"hash": "0xb8c0e0578fcd0aa7510191699c40953d04c564cf3a95ce1f21e59fa52115405e",
"language": "ink! 4.3.0",
"compiler": "rustc 1.69.0",
"build_info": {
Expand All @@ -15,7 +15,7 @@
},
"contract": {
"name": "captcha",
"version": "0.2.11",
"version": "0.2.12",
"authors": [
"Chris Taylor <chris@prosopo.io>",
"George Oastler <george@prosopo.io>",
Expand Down
4 changes: 2 additions & 2 deletions contracts/captcha/src/contract-info/captcha.ts

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions contracts/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/common-contract",
"version": "0.2.11",
"version": "0.2.12",
"description": "The common contract",
"main": "dist/index.js",
"type": "module",
Expand Down Expand Up @@ -31,8 +31,8 @@
"@polkadot/rpc-provider": "10.10.1",
"@polkadot/typegen": "10.10.1",
"@polkadot/types-create": "10.10.1",
"@polkadot/util": "12.3.2",
"@polkadot/util-crypto": "12.3.2"
"@polkadot/util": "12.5.1",
"@polkadot/util-crypto": "12.5.1"
},
"devDependencies": {
"tslib": "2.6.2",
Expand Down
4 changes: 2 additions & 2 deletions contracts/common/src/common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": {
"hash": "0xa40aeb6a6a0a544b3c9fc2143e8fceacf982015a3ef5f4ccd269ed486bedc4b8",
"hash": "0x82775471a8dafe2a1b7d455d9559d3cda65b71c6b44639c5f8a3a1e8623cf831",
"language": "ink! 4.3.0",
"compiler": "rustc 1.69.0",
"build_info": {
Expand All @@ -15,7 +15,7 @@
},
"contract": {
"name": "common",
"version": "0.2.11",
"version": "0.2.12",
"authors": [
"Chris Taylor <chris@prosopo.io>",
"George Oastler <george@prosopo.io>",
Expand Down
4 changes: 2 additions & 2 deletions contracts/common/src/contract-info/common.ts

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions contracts/proxy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/proxy-contract",
"version": "0.2.11",
"version": "0.2.12",
"description": "The proxy contract",
"main": "dist/index.js",
"type": "module",
Expand Down Expand Up @@ -31,8 +31,8 @@
"@polkadot/rpc-provider": "10.10.1",
"@polkadot/typegen": "10.10.1",
"@polkadot/types-create": "10.10.1",
"@polkadot/util": "12.3.2",
"@polkadot/util-crypto": "12.3.2"
"@polkadot/util": "12.5.1",
"@polkadot/util-crypto": "12.5.1"
},
"devDependencies": {
"tslib": "2.6.2",
Expand Down
4 changes: 2 additions & 2 deletions contracts/proxy/src/contract-info/proxy.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions contracts/proxy/src/proxy.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": {
"hash": "0x0fc56b50ed7b85e24dad369e87cd1f1d76d0cc86b55d0fbfa936899962f2ad35",
"hash": "0x5d0b97f12b9bb73b244a335d40ae7adc147e7c38cfc1b0db210eede9d6cf714e",
"language": "ink! 4.3.0",
"compiler": "rustc 1.69.0",
"build_info": {
Expand All @@ -15,7 +15,7 @@
},
"contract": {
"name": "proxy",
"version": "0.2.11",
"version": "0.2.12",
"authors": ["Chris Taylor <chris@prosopo.io>", "George Oastler <george@prosopo.io>"]
},
"spec": {
Expand Down
2 changes: 1 addition & 1 deletion demos/client-bundle-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dotenv": "^16.0.1",
"light-server": "^2.9.1"
},
"version": "0.2.11",
"version": "0.2.12",
"devDependencies": {
"tslib": "2.6.2",
"typescript": "5.1.6"
Expand Down
18 changes: 9 additions & 9 deletions demos/client-example-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/client-example-server",
"version": "0.2.11",
"version": "0.2.12",
"description": "Backend for client-example",
"main": "dist/app.js",
"type": "module",
Expand Down Expand Up @@ -30,13 +30,13 @@
"homepage": "https://github.com/prosopo/client-example-server#readme",
"dependencies": {
"@noble/hashes": "^1.3.1",
"@polkadot/util": "12.3.2",
"@polkadot/util-crypto": "12.3.2",
"@prosopo/api": "0.2.11",
"@prosopo/contract": "0.2.11",
"@prosopo/procaptcha": "0.2.11",
"@prosopo/server": "0.2.11",
"@prosopo/types": "0.2.11",
"@polkadot/util": "12.5.1",
"@polkadot/util-crypto": "12.5.1",
"@prosopo/api": "0.2.12",
"@prosopo/contract": "0.2.12",
"@prosopo/procaptcha": "0.2.12",
"@prosopo/server": "0.2.12",
"@prosopo/types": "0.2.12",
"@typegoose/auto-increment": "3.3.0",
"cors": "^2.8.5",
"jsonwebtoken": "^9.0.0",
Expand All @@ -51,6 +51,6 @@
"tslib": "2.6.2",
"typescript": "5.1.6",
"vite": "^4.4.9",
"@prosopo/config": "0.2.11"
"@prosopo/config": "0.2.12"
}
}
14 changes: 7 additions & 7 deletions demos/client-example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/client-example",
"version": "0.2.11",
"version": "0.2.12",
"private": true,
"type": "module",
"engines": {
Expand All @@ -11,10 +11,10 @@
"@emotion/react": "^11.9.3",
"@emotion/styled": "^11.9.3",
"@mui/material": "^5.9.1",
"@prosopo/common": "0.2.11",
"@prosopo/procaptcha-react": "0.2.11",
"@prosopo/procaptcha": "0.2.11",
"@prosopo/types": "0.2.11",
"@prosopo/common": "0.2.12",
"@prosopo/procaptcha-react": "0.2.12",
"@prosopo/procaptcha": "0.2.12",
"@prosopo/types": "0.2.12",
"@types/react-dom": "^18.2.4",
"electron": "25.8.4",
"react": "^18.2.0",
Expand All @@ -23,8 +23,8 @@
},
"devDependencies": {
"@cypress/xpath": "^2.0.3",
"@prosopo/cli": "0.2.11",
"@prosopo/config": "0.2.11",
"@prosopo/cli": "0.2.12",
"@prosopo/config": "0.2.12",
"@types/node": "^20.3.1",
"css-loader": "^6.8.1",
"cypress": "^12.14.0",
Expand Down
2 changes: 1 addition & 1 deletion demos/dapp-example/contracts/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dapp"
version = "0.2.11"
version = "0.2.12"
authors = [ "Chris Taylor chris@prosopo.io" ]
edition = "2021"

Expand Down
11 changes: 6 additions & 5 deletions dev/config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/config",
"version": "0.2.11",
"version": "0.2.12",
"description": "Prosopo config library",
"main": "./dist/index.js",
"type": "module",
Expand All @@ -17,13 +17,14 @@
"author": "Prosopo Limited",
"license": "Apache-2.0",
"dependencies": {
"@prosopo/common": "0.2.11",
"@prosopo/types": "0.2.11",
"glob": "^10.0.0"
"@prosopo/common": "0.2.12",
"@prosopo/types": "0.2.12",
"glob": "^10.0.0",
"path-scurry": "^1.10.0"
},
"devDependencies": {
"@polkadot/dev": "^0.76.11",
"@prosopo/util": "0.2.11",
"@prosopo/util": "0.2.12",
"@rollup/plugin-alias": "^5.0.0",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^24.1.0",
Expand Down
47 changes: 25 additions & 22 deletions dev/scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/scripts",
"version": "0.2.11",
"version": "0.2.12",
"description": "Dev scripts for working with prosopo packages",
"main": "dist/index.js",
"type": "module",
Expand All @@ -24,27 +24,27 @@
"@polkadot/api": "10.10.1",
"@polkadot/api-contract": "10.10.1",
"@polkadot/types": "10.10.1",
"@polkadot/util-crypto": "12.3.2",
"@prosopo/api": "0.2.11",
"@prosopo/cli": "0.2.11",
"@prosopo/common": "0.2.11",
"@prosopo/config": "0.2.11",
"@prosopo/contract": "0.2.11",
"@prosopo/database": "0.2.11",
"@prosopo/datasets": "0.2.11",
"@prosopo/datasets-fs": "0.2.11",
"@prosopo/env": "0.2.11",
"@prosopo/file-server": "0.2.11",
"@prosopo/procaptcha": "0.2.11",
"@prosopo/procaptcha-bundle": "0.2.11",
"@prosopo/procaptcha-react": "0.2.11",
"@prosopo/provider": "0.2.11",
"@prosopo/server": "0.2.11",
"@prosopo/types": "0.2.11",
"@prosopo/types-database": "0.2.11",
"@prosopo/types-env": "0.2.11",
"@prosopo/captcha-contract": "0.2.11",
"@prosopo/util": "0.2.11",
"@polkadot/util-crypto": "12.5.1",
"@prosopo/api": "0.2.12",
"@prosopo/cli": "0.2.12",
"@prosopo/common": "0.2.12",
"@prosopo/config": "0.2.12",
"@prosopo/contract": "0.2.12",
"@prosopo/database": "0.2.12",
"@prosopo/datasets": "0.2.12",
"@prosopo/datasets-fs": "0.2.12",
"@prosopo/env": "0.2.12",
"@prosopo/file-server": "0.2.12",
"@prosopo/procaptcha": "0.2.12",
"@prosopo/procaptcha-bundle": "0.2.12",
"@prosopo/procaptcha-react": "0.2.12",
"@prosopo/provider": "0.2.12",
"@prosopo/server": "0.2.12",
"@prosopo/types": "0.2.12",
"@prosopo/types-database": "0.2.12",
"@prosopo/types-env": "0.2.12",
"@prosopo/captcha-contract": "0.2.12",
"@prosopo/util": "0.2.12",
"consola": "^3.2.3",
"dotenv": "^16.0.3",
"es-main": "^1.2.0",
Expand All @@ -54,6 +54,9 @@
"yargs": "^17.5.1",
"yargs-parser": "^21.0.1"
},
"overrides": {
"@polkadot/keyring": "12.5.1"
},
"devDependencies": {
"@esm-bundle/chai": "^4.3.4-fix.0",
"ts-node": "^10.9.1",
Expand Down
6 changes: 3 additions & 3 deletions dev/scripts/src/contract/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,16 @@ async function importContract(pathToAbis: string, pathToOutput: string) {

// replace EventRecord with EventRecord[]
// eslint-disable-next-line no-useless-escape
replaced = replaced.replace(/EventRecord/g, (match) => {
const result = `EventRecord[]`
replaced = replaced.replace(/: EventRecord\)/g, (match) => {
const result = `: EventRecord[])`
if (verbose) console.log(`Replacing \n\t${match}\nwith\n\t${result}\nin ${filePath}`)
return result
})

// replace EventRecord incorrect imports
// eslint-disable-next-line no-useless-escape
replaced = replaced.replace(
/import\s+type\s+\{\s*EventRecord\[\]\s*\}\s+from\s+['"]@polkadot\/api\/submittable["']/g,
/import\s+type\s+\{\s*EventRecord\s*\}\s+from\s+['"]@polkadot\/api\/submittable["']/g,
(match) => {
const result = `import type { EventRecord } from '@polkadot/types/interfaces'`
if (verbose) console.log(`Replacing \n\t${match}\nwith\n\t${result}\nin ${filePath}`)
Expand Down
Loading

0 comments on commit 0399c82

Please sign in to comment.