Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

Commit

Permalink
Deploy indra-7.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
LayneHaber committed Aug 21, 2020
2 parents e2a4f01 + ad66bc4 commit 705fb8a
Show file tree
Hide file tree
Showing 22 changed files with 234 additions and 64 deletions.
6 changes: 3 additions & 3 deletions modules/apps/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@connext/apps",
"version": "7.3.4",
"version": "7.3.5",
"description": "Connext Counterfactual Apps",
"main": "dist/index.js",
"module": "dist/index.esm.js",
Expand All @@ -19,8 +19,8 @@
},
"devDependencies": {
"@connext/contracts": "3.5.0",
"@connext/types": "7.3.4",
"@connext/utils": "7.3.4",
"@connext/types": "7.3.5",
"@connext/utils": "7.3.5",
"@rollup/plugin-json": "4.1.0",
"ethers": "5.0.8",
"rollup": "2.23.0",
Expand Down
8 changes: 4 additions & 4 deletions modules/bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"author": "",
"license": "ISC",
"dependencies": {
"@connext/client": "7.3.4",
"@connext/client": "7.3.5",
"@connext/contracts": "3.5.0",
"@connext/store": "7.3.4",
"@connext/types": "7.3.4",
"@connext/utils": "7.3.4",
"@connext/store": "7.3.5",
"@connext/types": "7.3.5",
"@connext/utils": "7.3.5",
"axios": "0.19.2",
"body-parser": "1.19.0",
"ethers": "5.0.8",
Expand Down
8 changes: 4 additions & 4 deletions modules/cf-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@connext/cf-core",
"version": "7.3.4",
"version": "7.3.5",
"main": "dist/index.js",
"iife": "dist/index.iife.js",
"types": "dist/index.d.ts",
Expand All @@ -20,8 +20,8 @@
"dependencies": {
"@connext/contracts": "3.5.0",
"@connext/pure-evm-wasm": "0.1.4",
"@connext/types": "7.3.4",
"@connext/utils": "7.3.4",
"@connext/types": "7.3.5",
"@connext/utils": "7.3.5",
"@openzeppelin/contracts": "3.0.2",
"async-mutex": "0.2.4",
"ethers": "5.0.8",
Expand All @@ -32,7 +32,7 @@
},
"devDependencies": {
"@babel/core": "7.11.1",
"@connext/store": "7.3.4",
"@connext/store": "7.3.5",
"@ethereum-waffle/chai": "3.0.2",
"@types/chai": "4.2.12",
"@types/chai-as-promised": "7.1.3",
Expand Down
4 changes: 2 additions & 2 deletions modules/channel-provider/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@connext/channel-provider",
"version": "7.3.4",
"version": "7.3.5",
"description": "Channel Provider module for Connext client",
"main": "dist/index.js",
"files": [
Expand All @@ -16,7 +16,7 @@
"test": "./node_modules/.bin/ts-mocha --watch"
},
"dependencies": {
"@connext/types": "7.3.4",
"@connext/types": "7.3.5",
"eventemitter3": "4.0.4"
},
"devDependencies": {
Expand Down
16 changes: 8 additions & 8 deletions modules/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@connext/client",
"version": "7.3.4",
"version": "7.3.5",
"description": "Client for Connext Network",
"main": "dist/index.js",
"files": [
Expand All @@ -16,14 +16,14 @@
},
"dependencies": {
"axios": "0.19.2",
"@connext/apps": "7.3.4",
"@connext/cf-core": "7.3.4",
"@connext/channel-provider": "7.3.4",
"@connext/utils": "7.3.4",
"@connext/apps": "7.3.5",
"@connext/cf-core": "7.3.5",
"@connext/channel-provider": "7.3.5",
"@connext/utils": "7.3.5",
"@connext/contracts": "3.5.0",
"@connext/messaging": "7.3.4",
"@connext/store": "7.3.4",
"@connext/types": "7.3.4",
"@connext/messaging": "7.3.5",
"@connext/store": "7.3.5",
"@connext/types": "7.3.5",
"core-js": "3.6.5",
"ethers": "5.0.8",
"evt": "1.8.4",
Expand Down
4 changes: 2 additions & 2 deletions modules/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"transpile": "tsc -p tsconfig.json"
},
"dependencies": {
"@connext/types": "7.3.4",
"@connext/utils": "7.3.4",
"@connext/types": "7.3.5",
"@connext/utils": "7.3.5",
"@nomiclabs/buidler": "1.4.3",
"@openzeppelin/contracts": "3.0.2",
"ethers": "5.0.8",
Expand Down
8 changes: 4 additions & 4 deletions modules/daicard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"format": "prettier --write 'src/**/*.js'"
},
"dependencies": {
"@connext/client": "7.3.4",
"@connext/client": "7.3.5",
"@connext/contracts": "3.5.0",
"@connext/utils": "7.3.4",
"@connext/store": "7.3.4",
"@connext/types": "7.3.4",
"@connext/utils": "7.3.5",
"@connext/store": "7.3.5",
"@connext/types": "7.3.5",
"@material-ui/core": "4.11.0",
"@material-ui/icons": "4.9.1",
"@walletconnect/browser": "1.0.0",
Expand Down
6 changes: 3 additions & 3 deletions modules/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"eject": "./node_modules/.bin/react-scripts eject"
},
"dependencies": {
"@connext/cf-core": "7.3.4",
"@connext/messaging": "7.3.4",
"@connext/types": "7.3.4",
"@connext/cf-core": "7.3.5",
"@connext/messaging": "7.3.5",
"@connext/types": "7.3.5",
"@material-ui/core": "4.11.0",
"@material-ui/icons": "4.9.1",
"react": "16.13.1",
Expand Down
6 changes: 3 additions & 3 deletions modules/messaging/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@connext/messaging",
"description": "Messaging module for Connext client",
"version": "7.3.4",
"version": "7.3.5",
"main": "dist/index.js",
"iife": "dist/index.iife.js",
"types": "dist/index.d.ts",
Expand All @@ -16,8 +16,8 @@
"lint": "../../node_modules/.bin/eslint -c '../../.eslintrc.js' --fix 'src/**/*'"
},
"dependencies": {
"@connext/types": "7.3.4",
"@connext/utils": "7.3.4",
"@connext/types": "7.3.5",
"@connext/utils": "7.3.5",
"ts-natsutil": "1.1.1"
},
"devDependencies": {
Expand Down
154 changes: 154 additions & 0 deletions modules/node/migrations/1597957131361-store-latest-action.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
import { MigrationInterface, QueryRunner } from "typeorm";

export class storeLatestAction1597957131361 implements MigrationInterface {
name = "storeLatestAction1597957131361";

public async up(queryRunner: QueryRunner): Promise<void> {
// Update remove app instance to set the latest state of the app
await queryRunner.query(
`DROP FUNCTION IF EXISTS remove_app_instance(jsonb,jsonb,jsonb);`,
undefined,
);

await queryRunner.query(
`
CREATE OR REPLACE FUNCTION remove_app_instance(
removed_app JSONB,
free_balance_app_instance JSONB,
signed_free_balance_update JSONB
) RETURNS TEXT AS $$
DECLARE
remove_app_result TEXT;
remove_set_state_result TEXT;
remove_conditional_result TEXT;
update_free_balance_result TEXT;
update_set_state_result TEXT;
BEGIN
UPDATE "app_instance" SET
"type" = 'UNINSTALLED',
"channelMultisigAddress" = NULL,
"updatedAt" = CURRENT_TIMESTAMP,
"latestState" = removed_app->'latestState',
"latestAction" = removed_app->'latestAction',
"stateTimeout" = removed_app->>'stateTimeout',
"latestVersionNumber" = (removed_app->>'latestVersionNumber')::INTEGER
WHERE "identityHash" = removed_app->>'identityHash'
RETURNING "identityHash" INTO remove_app_result;
DELETE FROM "set_state_commitment"
WHERE "appIdentityHash" = removed_app->>'identityHash';
DELETE FROM "conditional_transaction_commitment"
WHERE "appIdentityHash" = removed_app->>'identityHash';
UPDATE "app_instance" SET
"latestState" = free_balance_app_instance->'latestState',
"stateTimeout" = free_balance_app_instance->>'stateTimeout',
"latestVersionNumber" = (free_balance_app_instance->>'latestVersionNumber')::INTEGER,
"updatedAt" = CURRENT_TIMESTAMP
WHERE "identityHash" = free_balance_app_instance->>'identityHash'
RETURNING "identityHash" INTO update_free_balance_result;
UPDATE "set_state_commitment" SET
"appIdentity" = signed_free_balance_update->'appIdentity',
"appStateHash" = signed_free_balance_update->>'appStateHash',
"challengeRegistryAddress" = signed_free_balance_update->>'challengeRegistryAddress',
"signatures" = signed_free_balance_update->'signatures',
"stateTimeout" = signed_free_balance_update->>'stateTimeout',
"versionNumber" = (signed_free_balance_update->>'versionNumber')::INTEGER,
"transactionData" = signed_free_balance_update->>'transactionData',
"updatedAt" = CURRENT_TIMESTAMP
WHERE "appIdentityHash" = free_balance_app_instance->>'identityHash'
RETURNING "appIdentityHash" INTO update_set_state_result;
IF remove_app_result IS NULL OR update_free_balance_result IS NULL OR update_set_state_result IS NULL
THEN
RAISE EXCEPTION
'Operation could not be completed: remove_app_result -> %, update_free_balance_result -> %, update_set_state_result -> %',
remove_app_result,
update_free_balance_result,
update_set_state_result;
END IF;
RETURN remove_app_result;
END;
$$ LANGUAGE plpgsql;
`,
undefined,
);
}

public async down(queryRunner: QueryRunner): Promise<void> {
// Return procedure to previous migration (remove-app-commitments)
await queryRunner.query(
`DROP FUNCTION IF EXISTS remove_app_instance(jsonb,jsonb,jsonb);`,
undefined,
);

await queryRunner.query(
`
CREATE OR REPLACE FUNCTION remove_app_instance(
removed_app JSONB,
free_balance_app_instance JSONB,
signed_free_balance_update JSONB
) RETURNS TEXT AS $$
DECLARE
remove_app_result TEXT;
remove_set_state_result TEXT;
remove_conditional_result TEXT;
update_free_balance_result TEXT;
update_set_state_result TEXT;
BEGIN
UPDATE "app_instance" SET
"type" = 'UNINSTALLED',
"channelMultisigAddress" = NULL,
"updatedAt" = CURRENT_TIMESTAMP,
"latestState" = removed_app->'latestState',
"stateTimeout" = removed_app->>'stateTimeout',
"latestVersionNumber" = (removed_app->>'latestVersionNumber')::INTEGER
WHERE "identityHash" = removed_app->>'identityHash'
RETURNING "identityHash" INTO remove_app_result;
DELETE FROM "set_state_commitment"
WHERE "appIdentityHash" = removed_app->>'identityHash';
DELETE FROM "conditional_transaction_commitment"
WHERE "appIdentityHash" = removed_app->>'identityHash';
UPDATE "app_instance" SET
"latestState" = free_balance_app_instance->'latestState',
"stateTimeout" = free_balance_app_instance->>'stateTimeout',
"latestVersionNumber" = (free_balance_app_instance->>'latestVersionNumber')::INTEGER,
"updatedAt" = CURRENT_TIMESTAMP
WHERE "identityHash" = free_balance_app_instance->>'identityHash'
RETURNING "identityHash" INTO update_free_balance_result;
UPDATE "set_state_commitment" SET
"appIdentity" = signed_free_balance_update->'appIdentity',
"appStateHash" = signed_free_balance_update->>'appStateHash',
"challengeRegistryAddress" = signed_free_balance_update->>'challengeRegistryAddress',
"signatures" = signed_free_balance_update->'signatures',
"stateTimeout" = signed_free_balance_update->>'stateTimeout',
"versionNumber" = (signed_free_balance_update->>'versionNumber')::INTEGER,
"transactionData" = signed_free_balance_update->>'transactionData',
"updatedAt" = CURRENT_TIMESTAMP
WHERE "appIdentityHash" = free_balance_app_instance->>'identityHash'
RETURNING "appIdentityHash" INTO update_set_state_result;
IF remove_app_result IS NULL OR update_free_balance_result IS NULL OR update_set_state_result IS NULL
THEN
RAISE EXCEPTION
'Operation could not be completed: remove_app_result -> %, update_free_balance_result -> %, update_set_state_result -> %',
remove_app_result,
update_free_balance_result,
update_set_state_result;
END IF;
RETURN remove_app_result;
END;
$$ LANGUAGE plpgsql;
`,
undefined,
);
}
}
16 changes: 8 additions & 8 deletions modules/node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "indra-node",
"version": "7.3.4",
"version": "7.3.5",
"description": "",
"author": "",
"license": "MIT",
Expand All @@ -15,14 +15,14 @@
"watch": "ts-mocha --bail --check-leaks --watch --timeout 60000 'src/**/*.spec.ts'"
},
"dependencies": {
"@connext/apps": "7.3.4",
"@connext/cf-core": "7.3.4",
"@connext/apps": "7.3.5",
"@connext/cf-core": "7.3.5",
"@connext/contracts": "3.5.0",
"@connext/messaging": "7.3.4",
"@connext/messaging": "7.3.5",
"@connext/pure-evm-wasm": "0.1.4",
"@connext/store": "7.3.4",
"@connext/types": "7.3.4",
"@connext/utils": "7.3.4",
"@connext/store": "7.3.5",
"@connext/types": "7.3.5",
"@connext/utils": "7.3.5",
"@nestjs/common": "7.4.2",
"@nestjs/core": "7.4.2",
"@nestjs/microservices": "7.4.2",
Expand All @@ -49,7 +49,7 @@
"wasm-loader": "1.3.0"
},
"devDependencies": {
"@connext/client": "7.3.4",
"@connext/client": "7.3.5",
"@ethereum-waffle/chai": "3.0.2",
"@nestjs/testing": "7.4.2",
"@openzeppelin/contracts": "3.0.2",
Expand Down
2 changes: 1 addition & 1 deletion modules/node/src/appInstance/appInstance.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
MultiAssetMultiPartyCoinTransferInterpreterParamsJson,
SingleAssetTwoPartyCoinTransferInterpreterParamsJson,
} from "@connext/types";
import { BigNumber, constants } from "ethers";
import { BigNumber } from "ethers";
import {
Column,
CreateDateColumn,
Expand Down
Loading

0 comments on commit 705fb8a

Please sign in to comment.