@ocap/tx-protocols 1.18.128 → 1.18.129

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/execute.js CHANGED
@@ -10,6 +10,7 @@ const { Runner, pipes } = require('@ocap/tx-pipeline');
10
10
  const createEnsureGasFn = require('./pipes/ensure-gas');
11
11
  const createEnsureCostFn = require('./pipes/ensure-cost');
12
12
 
13
+ // FIXME: DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
13
14
  const ensureTxGas = promisify(createEnsureGasFn(() => ({ create: 0, update: 2 })));
14
15
  const ensureTxCost = promisify(createEnsureCostFn({ attachSenderChanges: true, gasOnly: true }));
15
16
 
@@ -29,6 +30,7 @@ module.exports = ({ filter, runAsLambda }) => {
29
30
  // pipeline before executing the transaction
30
31
  const pre = new Runner();
31
32
  pre.use(pipes.DecodeTx);
33
+ pre.use(pipes.VerifyBlocked(filter));
32
34
  pre.use(pipes.DecodeItx);
33
35
  pre.use(pipes.VerifyTx);
34
36
  pre.use(pipes.VerifyServiceFee);
@@ -127,6 +127,7 @@ runner.use(pipes.VerifyMultiSigV2({ signersKey: 'senders' }));
127
127
  runner.use(pipes.ExtractState({ from: 'tx.from', to: 'senderState', status: 'OK', table: 'account' }));
128
128
  runner.use(pipes.ExtractState({ from: 'senders', to: 'signerStates', status: 'INVALID_SIGNER_STATE', table: 'account' })); // prettier-ignore
129
129
  runner.use(pipes.ExtractState({ from: 'receivers', to: 'receiverStates', status: 'OK', table: 'account' }));
130
+ runner.use(pipes.AntiLandAttack({ senderState: 'signerStates', receiverState: 'receiverStates' }));
130
131
  runner.use(pipes.VerifyAccountMigration({ signerKey: 'signerStates', stateKey: 'senderState', addressKey: 'tx.from' }));
131
132
 
132
133
  // 5. verify token state and balance
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.18.128",
6
+ "version": "1.18.129",
7
7
  "description": "Predefined tx pipeline sets to execute certain type of transactions",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -21,18 +21,18 @@
21
21
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@arcblock/did": "1.18.128",
25
- "@arcblock/did-util": "1.18.128",
26
- "@arcblock/jwt": "1.18.128",
27
- "@arcblock/validator": "1.18.128",
28
- "@ocap/asset": "1.18.128",
29
- "@ocap/mcrypto": "1.18.128",
30
- "@ocap/merkle-tree": "1.18.128",
31
- "@ocap/message": "1.18.128",
32
- "@ocap/state": "1.18.128",
33
- "@ocap/tx-pipeline": "1.18.128",
34
- "@ocap/util": "1.18.128",
35
- "@ocap/wallet": "1.18.128",
24
+ "@arcblock/did": "1.18.129",
25
+ "@arcblock/did-util": "1.18.129",
26
+ "@arcblock/jwt": "1.18.129",
27
+ "@arcblock/validator": "1.18.129",
28
+ "@ocap/asset": "1.18.129",
29
+ "@ocap/mcrypto": "1.18.129",
30
+ "@ocap/merkle-tree": "1.18.129",
31
+ "@ocap/message": "1.18.129",
32
+ "@ocap/state": "1.18.129",
33
+ "@ocap/tx-pipeline": "1.18.129",
34
+ "@ocap/util": "1.18.129",
35
+ "@ocap/wallet": "1.18.129",
36
36
  "debug": "^4.3.4",
37
37
  "deep-diff": "^1.0.2",
38
38
  "empty-value": "^1.0.1",
@@ -47,5 +47,5 @@
47
47
  "jest": "^27.5.1",
48
48
  "start-server-and-test": "^1.14.0"
49
49
  },
50
- "gitHead": "97c217e51a0c250f8804c67c893c09d9f4c127c8"
50
+ "gitHead": "422e48b5668be8d25d76037d86926a625b194758"
51
51
  }