@ocap/tx-protocols 1.28.8 → 1.29.0
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/esm/execute.d.mts +53 -0
- package/esm/execute.mjs +225 -0
- package/esm/index.d.mts +95 -0
- package/esm/index.mjs +100 -0
- package/esm/pipes/ensure-cost.d.mts +18 -0
- package/esm/pipes/ensure-cost.mjs +136 -0
- package/esm/pipes/ensure-gas.d.mts +14 -0
- package/esm/pipes/ensure-gas.mjs +38 -0
- package/esm/protocols/account/delegate.d.mts +4 -0
- package/esm/protocols/account/delegate.mjs +195 -0
- package/esm/protocols/account/migrate.d.mts +4 -0
- package/esm/protocols/account/migrate.mjs +130 -0
- package/esm/protocols/account/revoke-delegate.d.mts +4 -0
- package/esm/protocols/account/revoke-delegate.mjs +102 -0
- package/esm/protocols/asset/acquire-v2.d.mts +9 -0
- package/esm/protocols/asset/acquire-v2.mjs +213 -0
- package/esm/protocols/asset/acquire-v3.d.mts +17 -0
- package/esm/protocols/asset/acquire-v3.mjs +265 -0
- package/esm/protocols/asset/calls/transfer-token.d.mts +4 -0
- package/esm/protocols/asset/calls/transfer-token.mjs +36 -0
- package/esm/protocols/asset/calls/transfer.d.mts +4 -0
- package/esm/protocols/asset/calls/transfer.mjs +32 -0
- package/esm/protocols/asset/consume.d.mts +4 -0
- package/esm/protocols/asset/consume.mjs +92 -0
- package/esm/protocols/asset/create.d.mts +4 -0
- package/esm/protocols/asset/create.mjs +136 -0
- package/esm/protocols/asset/mint.d.mts +4 -0
- package/esm/protocols/asset/mint.mjs +156 -0
- package/esm/protocols/asset/pipes/exec-mint-hook.d.mts +24 -0
- package/esm/protocols/asset/pipes/exec-mint-hook.mjs +54 -0
- package/esm/protocols/asset/pipes/extract-factory-tokens.d.mts +21 -0
- package/esm/protocols/asset/pipes/extract-factory-tokens.mjs +22 -0
- package/esm/protocols/asset/pipes/verify-itx-address.d.mts +32 -0
- package/esm/protocols/asset/pipes/verify-itx-address.mjs +56 -0
- package/esm/protocols/asset/pipes/verify-itx-assets.d.mts +18 -0
- package/esm/protocols/asset/pipes/verify-itx-assets.mjs +27 -0
- package/esm/protocols/asset/pipes/verify-itx-variables.d.mts +17 -0
- package/esm/protocols/asset/pipes/verify-itx-variables.mjs +20 -0
- package/esm/protocols/asset/pipes/verify-mint-limit.d.mts +15 -0
- package/esm/protocols/asset/pipes/verify-mint-limit.mjs +14 -0
- package/esm/protocols/asset/update.d.mts +4 -0
- package/esm/protocols/asset/update.mjs +111 -0
- package/esm/protocols/factory/create.d.mts +29 -0
- package/esm/protocols/factory/create.mjs +155 -0
- package/esm/protocols/governance/claim-stake.d.mts +27 -0
- package/esm/protocols/governance/claim-stake.mjs +220 -0
- package/esm/protocols/governance/return-stake.d.mts +27 -0
- package/esm/protocols/governance/return-stake.mjs +211 -0
- package/esm/protocols/governance/revoke-stake.d.mts +27 -0
- package/esm/protocols/governance/revoke-stake.mjs +178 -0
- package/esm/protocols/governance/slash-stake.d.mts +17 -0
- package/esm/protocols/governance/slash-stake.mjs +213 -0
- package/esm/protocols/governance/stake.d.mts +15 -0
- package/esm/protocols/governance/stake.mjs +270 -0
- package/esm/protocols/rollup/claim-reward.d.mts +11 -0
- package/esm/protocols/rollup/claim-reward.mjs +322 -0
- package/esm/protocols/rollup/close.d.mts +4 -0
- package/esm/protocols/rollup/close.mjs +105 -0
- package/esm/protocols/rollup/create-block.d.mts +11 -0
- package/esm/protocols/rollup/create-block.mjs +303 -0
- package/esm/protocols/rollup/create.d.mts +4 -0
- package/esm/protocols/rollup/create.mjs +164 -0
- package/esm/protocols/rollup/join.d.mts +4 -0
- package/esm/protocols/rollup/join.mjs +152 -0
- package/esm/protocols/rollup/leave.d.mts +4 -0
- package/esm/protocols/rollup/leave.mjs +137 -0
- package/esm/protocols/rollup/migrate.d.mts +4 -0
- package/esm/protocols/rollup/migrate.mjs +85 -0
- package/esm/protocols/rollup/pause.d.mts +4 -0
- package/esm/protocols/rollup/pause.mjs +76 -0
- package/esm/protocols/rollup/pipes/ensure-validator.d.mts +6 -0
- package/esm/protocols/rollup/pipes/ensure-validator.mjs +12 -0
- package/esm/protocols/rollup/pipes/verify-evidence.d.mts +15 -0
- package/esm/protocols/rollup/pipes/verify-evidence.mjs +29 -0
- package/esm/protocols/rollup/pipes/verify-signers.d.mts +15 -0
- package/esm/protocols/rollup/pipes/verify-signers.mjs +36 -0
- package/esm/protocols/rollup/pipes/verify-status.d.mts +13 -0
- package/esm/protocols/rollup/pipes/verify-status.mjs +26 -0
- package/esm/protocols/rollup/resume.d.mts +4 -0
- package/esm/protocols/rollup/resume.mjs +79 -0
- package/esm/protocols/rollup/update.d.mts +4 -0
- package/esm/protocols/rollup/update.mjs +111 -0
- package/esm/protocols/token/create.d.mts +4 -0
- package/esm/protocols/token/create.mjs +150 -0
- package/esm/protocols/token/deposit-v2.d.mts +11 -0
- package/esm/protocols/token/deposit-v2.mjs +216 -0
- package/esm/protocols/token/withdraw-v2.d.mts +9 -0
- package/esm/protocols/token/withdraw-v2.mjs +222 -0
- package/esm/protocols/token-factory/burn.d.mts +15 -0
- package/esm/protocols/token-factory/burn.mjs +233 -0
- package/esm/protocols/token-factory/create.d.mts +4 -0
- package/esm/protocols/token-factory/create.mjs +254 -0
- package/esm/protocols/token-factory/mint.d.mts +15 -0
- package/esm/protocols/token-factory/mint.mjs +234 -0
- package/esm/protocols/token-factory/pipes/calc-reserve.d.mts +21 -0
- package/esm/protocols/token-factory/pipes/calc-reserve.mjs +34 -0
- package/esm/protocols/token-factory/pipes/verify-icon.d.mts +14 -0
- package/esm/protocols/token-factory/pipes/verify-icon.mjs +18 -0
- package/esm/protocols/token-factory/pipes/verify-ownership.d.mts +12 -0
- package/esm/protocols/token-factory/pipes/verify-ownership.mjs +63 -0
- package/esm/protocols/token-factory/pipes/verify-url.d.mts +12 -0
- package/esm/protocols/token-factory/pipes/verify-url.mjs +26 -0
- package/esm/protocols/token-factory/update.d.mts +10 -0
- package/esm/protocols/token-factory/update.mjs +152 -0
- package/esm/protocols/trade/exchange-v2.d.mts +9 -0
- package/esm/protocols/trade/exchange-v2.mjs +239 -0
- package/esm/protocols/trade/transfer-v2.d.mts +9 -0
- package/esm/protocols/trade/transfer-v2.mjs +226 -0
- package/esm/protocols/trade/transfer-v3.d.mts +17 -0
- package/esm/protocols/trade/transfer-v3.mjs +270 -0
- package/esm/util.d.mts +141 -0
- package/esm/util.mjs +278 -0
- package/lib/_virtual/rolldown_runtime.cjs +29 -0
- package/lib/execute.cjs +231 -0
- package/lib/execute.d.cts +53 -0
- package/lib/index.cjs +105 -0
- package/lib/index.d.cts +95 -0
- package/lib/pipes/ensure-cost.cjs +141 -0
- package/lib/pipes/ensure-cost.d.cts +18 -0
- package/lib/pipes/ensure-gas.cjs +41 -0
- package/lib/pipes/ensure-gas.d.cts +14 -0
- package/lib/protocols/account/delegate.cjs +201 -0
- package/lib/protocols/account/delegate.d.cts +4 -0
- package/lib/protocols/account/migrate.cjs +135 -0
- package/lib/protocols/account/migrate.d.cts +4 -0
- package/lib/protocols/account/revoke-delegate.cjs +107 -0
- package/lib/protocols/account/revoke-delegate.d.cts +4 -0
- package/lib/protocols/asset/acquire-v2.cjs +216 -0
- package/lib/protocols/asset/acquire-v2.d.cts +9 -0
- package/lib/protocols/asset/acquire-v3.cjs +269 -0
- package/lib/protocols/asset/acquire-v3.d.cts +17 -0
- package/lib/protocols/asset/calls/transfer-token.cjs +40 -0
- package/lib/protocols/asset/calls/transfer-token.d.cts +4 -0
- package/lib/protocols/asset/calls/transfer.cjs +35 -0
- package/lib/protocols/asset/calls/transfer.d.cts +4 -0
- package/lib/protocols/asset/consume.cjs +95 -0
- package/lib/protocols/asset/consume.d.cts +4 -0
- package/lib/protocols/asset/create.cjs +140 -0
- package/lib/protocols/asset/create.d.cts +4 -0
- package/lib/protocols/asset/mint.cjs +159 -0
- package/lib/protocols/asset/mint.d.cts +4 -0
- package/lib/protocols/asset/pipes/exec-mint-hook.cjs +57 -0
- package/lib/protocols/asset/pipes/exec-mint-hook.d.cts +24 -0
- package/lib/protocols/asset/pipes/extract-factory-tokens.cjs +25 -0
- package/lib/protocols/asset/pipes/extract-factory-tokens.d.cts +21 -0
- package/lib/protocols/asset/pipes/verify-itx-address.cjs +59 -0
- package/lib/protocols/asset/pipes/verify-itx-address.d.cts +32 -0
- package/lib/protocols/asset/pipes/verify-itx-assets.cjs +29 -0
- package/lib/protocols/asset/pipes/verify-itx-assets.d.cts +18 -0
- package/lib/protocols/asset/pipes/verify-itx-variables.cjs +22 -0
- package/lib/protocols/asset/pipes/verify-itx-variables.d.cts +17 -0
- package/lib/protocols/asset/pipes/verify-mint-limit.cjs +16 -0
- package/lib/protocols/asset/pipes/verify-mint-limit.d.cts +15 -0
- package/lib/protocols/asset/update.cjs +114 -0
- package/lib/protocols/asset/update.d.cts +4 -0
- package/lib/protocols/factory/create.cjs +161 -0
- package/lib/protocols/factory/create.d.cts +29 -0
- package/lib/protocols/governance/claim-stake.cjs +223 -0
- package/lib/protocols/governance/claim-stake.d.cts +27 -0
- package/lib/protocols/governance/return-stake.cjs +215 -0
- package/lib/protocols/governance/return-stake.d.cts +27 -0
- package/lib/protocols/governance/revoke-stake.cjs +182 -0
- package/lib/protocols/governance/revoke-stake.d.cts +27 -0
- package/lib/protocols/governance/slash-stake.cjs +217 -0
- package/lib/protocols/governance/slash-stake.d.cts +17 -0
- package/lib/protocols/governance/stake.cjs +275 -0
- package/lib/protocols/governance/stake.d.cts +15 -0
- package/lib/protocols/rollup/claim-reward.cjs +328 -0
- package/lib/protocols/rollup/claim-reward.d.cts +11 -0
- package/lib/protocols/rollup/close.cjs +107 -0
- package/lib/protocols/rollup/close.d.cts +4 -0
- package/lib/protocols/rollup/create-block.cjs +309 -0
- package/lib/protocols/rollup/create-block.d.cts +11 -0
- package/lib/protocols/rollup/create.cjs +169 -0
- package/lib/protocols/rollup/create.d.cts +4 -0
- package/lib/protocols/rollup/join.cjs +157 -0
- package/lib/protocols/rollup/join.d.cts +4 -0
- package/lib/protocols/rollup/leave.cjs +141 -0
- package/lib/protocols/rollup/leave.d.cts +4 -0
- package/lib/protocols/rollup/migrate.cjs +87 -0
- package/lib/protocols/rollup/migrate.d.cts +4 -0
- package/lib/protocols/rollup/pause.cjs +78 -0
- package/lib/protocols/rollup/pause.d.cts +4 -0
- package/lib/protocols/rollup/pipes/ensure-validator.cjs +14 -0
- package/lib/protocols/rollup/pipes/ensure-validator.d.cts +6 -0
- package/lib/protocols/rollup/pipes/verify-evidence.cjs +32 -0
- package/lib/protocols/rollup/pipes/verify-evidence.d.cts +15 -0
- package/lib/protocols/rollup/pipes/verify-signers.cjs +39 -0
- package/lib/protocols/rollup/pipes/verify-signers.d.cts +15 -0
- package/lib/protocols/rollup/pipes/verify-status.cjs +28 -0
- package/lib/protocols/rollup/pipes/verify-status.d.cts +13 -0
- package/lib/protocols/rollup/resume.cjs +81 -0
- package/lib/protocols/rollup/resume.d.cts +4 -0
- package/lib/protocols/rollup/update.cjs +114 -0
- package/lib/protocols/rollup/update.d.cts +4 -0
- package/lib/protocols/token/create.cjs +156 -0
- package/lib/protocols/token/create.d.cts +4 -0
- package/lib/protocols/token/deposit-v2.cjs +219 -0
- package/lib/protocols/token/deposit-v2.d.cts +11 -0
- package/lib/protocols/token/withdraw-v2.cjs +225 -0
- package/lib/protocols/token/withdraw-v2.d.cts +9 -0
- package/lib/protocols/token-factory/burn.cjs +236 -0
- package/lib/protocols/token-factory/burn.d.cts +15 -0
- package/lib/protocols/token-factory/create.cjs +260 -0
- package/lib/protocols/token-factory/create.d.cts +4 -0
- package/lib/protocols/token-factory/mint.cjs +237 -0
- package/lib/protocols/token-factory/mint.d.cts +15 -0
- package/lib/protocols/token-factory/pipes/calc-reserve.cjs +38 -0
- package/lib/protocols/token-factory/pipes/calc-reserve.d.cts +21 -0
- package/lib/protocols/token-factory/pipes/verify-icon.cjs +22 -0
- package/lib/protocols/token-factory/pipes/verify-icon.d.cts +14 -0
- package/lib/protocols/token-factory/pipes/verify-ownership.cjs +66 -0
- package/lib/protocols/token-factory/pipes/verify-ownership.d.cts +12 -0
- package/lib/protocols/token-factory/pipes/verify-url.cjs +29 -0
- package/lib/protocols/token-factory/pipes/verify-url.d.cts +12 -0
- package/lib/protocols/token-factory/update.cjs +155 -0
- package/lib/protocols/token-factory/update.d.cts +10 -0
- package/lib/protocols/trade/exchange-v2.cjs +243 -0
- package/lib/protocols/trade/exchange-v2.d.cts +9 -0
- package/lib/protocols/trade/transfer-v2.cjs +229 -0
- package/lib/protocols/trade/transfer-v2.d.cts +9 -0
- package/lib/protocols/trade/transfer-v3.cjs +274 -0
- package/lib/protocols/trade/transfer-v3.d.cts +17 -0
- package/lib/util.cjs +296 -0
- package/lib/util.d.cts +141 -0
- package/package.json +49 -22
- package/tools/fixtures.ts +564 -0
- package/lib/execute.js +0 -254
- package/lib/index.js +0 -117
- package/lib/pipes/ensure-cost.js +0 -193
- package/lib/pipes/ensure-gas.js +0 -48
- package/lib/protocols/account/delegate.js +0 -223
- package/lib/protocols/account/migrate.js +0 -153
- package/lib/protocols/account/revoke-delegate.js +0 -110
- package/lib/protocols/asset/acquire-v2.js +0 -262
- package/lib/protocols/asset/acquire-v3.js +0 -330
- package/lib/protocols/asset/calls/README.md +0 -5
- package/lib/protocols/asset/calls/transfer-token.js +0 -36
- package/lib/protocols/asset/calls/transfer.js +0 -28
- package/lib/protocols/asset/consume.js +0 -105
- package/lib/protocols/asset/create.js +0 -151
- package/lib/protocols/asset/mint.js +0 -199
- package/lib/protocols/asset/pipes/exec-mint-hook.js +0 -62
- package/lib/protocols/asset/pipes/extract-factory-tokens.js +0 -18
- package/lib/protocols/asset/pipes/verify-itx-address.js +0 -54
- package/lib/protocols/asset/pipes/verify-itx-assets.js +0 -51
- package/lib/protocols/asset/pipes/verify-itx-variables.js +0 -26
- package/lib/protocols/asset/pipes/verify-mint-limit.js +0 -13
- package/lib/protocols/asset/update.js +0 -131
- package/lib/protocols/factory/create.js +0 -191
- package/lib/protocols/governance/claim-stake.js +0 -266
- package/lib/protocols/governance/return-stake.js +0 -248
- package/lib/protocols/governance/revoke-stake.js +0 -172
- package/lib/protocols/governance/slash-stake.js +0 -271
- package/lib/protocols/governance/stake.js +0 -303
- package/lib/protocols/rollup/claim-reward.js +0 -342
- package/lib/protocols/rollup/close.js +0 -104
- package/lib/protocols/rollup/create-block.js +0 -413
- package/lib/protocols/rollup/create.js +0 -197
- package/lib/protocols/rollup/join.js +0 -182
- package/lib/protocols/rollup/leave.js +0 -145
- package/lib/protocols/rollup/migrate.js +0 -85
- package/lib/protocols/rollup/pause.js +0 -75
- package/lib/protocols/rollup/pipes/ensure-validator.js +0 -12
- package/lib/protocols/rollup/pipes/verify-evidence.js +0 -37
- package/lib/protocols/rollup/pipes/verify-signers.js +0 -87
- package/lib/protocols/rollup/pipes/verify-status.js +0 -30
- package/lib/protocols/rollup/resume.js +0 -75
- package/lib/protocols/rollup/update.js +0 -122
- package/lib/protocols/token/create.js +0 -199
- package/lib/protocols/token/deposit-v2.js +0 -290
- package/lib/protocols/token/withdraw-v2.js +0 -305
- package/lib/protocols/token-factory/burn.js +0 -371
- package/lib/protocols/token-factory/create.js +0 -342
- package/lib/protocols/token-factory/mint.js +0 -385
- package/lib/protocols/token-factory/pipes/calc-reserve.js +0 -37
- package/lib/protocols/token-factory/pipes/verify-icon.js +0 -27
- package/lib/protocols/token-factory/pipes/verify-ownership.js +0 -93
- package/lib/protocols/token-factory/pipes/verify-url.js +0 -32
- package/lib/protocols/token-factory/update.js +0 -208
- package/lib/protocols/trade/exchange-v2.js +0 -239
- package/lib/protocols/trade/transfer-v2.js +0 -233
- package/lib/protocols/trade/transfer-v3.js +0 -333
- package/lib/util.js +0 -442
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
const { CustomError: Error } = require('@ocap/util/lib/error');
|
|
2
|
-
const { Joi } = require('@arcblock/validator');
|
|
3
|
-
const { Runner, pipes } = require('@ocap/tx-pipeline');
|
|
4
|
-
const { account, rollup, stake } = require('@ocap/state');
|
|
5
|
-
|
|
6
|
-
const { toStakeAddress } = require('@arcblock/did-util');
|
|
7
|
-
const VerifySigners = require('./pipes/verify-signers');
|
|
8
|
-
const VerifyStatus = require('./pipes/verify-status');
|
|
9
|
-
const EnsureValidator = require('./pipes/ensure-validator');
|
|
10
|
-
const EnsureTxGas = require('../../pipes/ensure-gas');
|
|
11
|
-
const EnsureTxCost = require('../../pipes/ensure-cost');
|
|
12
|
-
|
|
13
|
-
const runner = new Runner();
|
|
14
|
-
|
|
15
|
-
// 1. verify itx
|
|
16
|
-
const schema = Joi.object({
|
|
17
|
-
rollup: Joi.DID().prefix().role('ROLE_ROLLUP').required(),
|
|
18
|
-
message: Joi.string().trim().min(1).max(512).required(),
|
|
19
|
-
token: Joi.object({
|
|
20
|
-
address: Joi.DID().prefix().wallet('ethereum').required(),
|
|
21
|
-
value: Joi.BN().positive().required(),
|
|
22
|
-
}),
|
|
23
|
-
data: Joi.any().optional().allow(null),
|
|
24
|
-
}).options({ stripUnknown: true, noDefaults: false });
|
|
25
|
-
runner.use(({ itx }, next) => {
|
|
26
|
-
const { error } = schema.validate(itx);
|
|
27
|
-
return next(error ? new Error('INVALID_TX', `Invalid itx: ${error.message}`) : null);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
// 2. verify rollup
|
|
31
|
-
runner.use(pipes.ExtractState({ from: 'itx.rollup', to: 'rollupState', status: 'INVALID_ROLLUP', table: 'rollup' }));
|
|
32
|
-
runner.use(EnsureValidator(true));
|
|
33
|
-
runner.use(VerifyStatus({ paused: true, closed: false }));
|
|
34
|
-
|
|
35
|
-
// 3. verify tx signers and signatures
|
|
36
|
-
runner.use(VerifySigners({ signersKey: 'tx.signaturesList', allowSender: true }));
|
|
37
|
-
runner.use(pipes.VerifyMultiSigV2({ signersKey: 'signers' }));
|
|
38
|
-
|
|
39
|
-
// 4. verify sender and signer states
|
|
40
|
-
runner.use(
|
|
41
|
-
pipes.ExtractState({ from: 'tx.from', to: 'senderState', status: 'INVALID_SENDER_STATE', table: 'account' })
|
|
42
|
-
);
|
|
43
|
-
runner.use(
|
|
44
|
-
pipes.ExtractState({ from: 'signers', to: 'signerStates', status: 'INVALID_SIGNER_STATE', table: 'account' })
|
|
45
|
-
);
|
|
46
|
-
runner.use(pipes.VerifyAccountMigration({ signerKey: 'signerStates', stateKey: 'senderState', addressKey: 'tx.from' }));
|
|
47
|
-
|
|
48
|
-
// 5. extract validator stake stakes
|
|
49
|
-
runner.use((context, next) => {
|
|
50
|
-
const { validators, address } = context.rollupState;
|
|
51
|
-
context.stakes = validators.map((x) => toStakeAddress(x.address, address));
|
|
52
|
-
return next();
|
|
53
|
-
});
|
|
54
|
-
runner.use(pipes.ExtractState({ from: 'stakes', to: 'stakeStates', status: 'INVALID_STAKE_STATE', table: 'stake' }));
|
|
55
|
-
|
|
56
|
-
// 6. Ensure tx fee and gas
|
|
57
|
-
runner.use(EnsureTxGas((context) => ({ create: 0, update: context.stakeStates.length + 2, payment: 0 })));
|
|
58
|
-
runner.use(EnsureTxCost({ attachSenderChanges: true }));
|
|
59
|
-
|
|
60
|
-
// Save context snapshot before updating states
|
|
61
|
-
runner.use(pipes.TakeStateSnapshot());
|
|
62
|
-
|
|
63
|
-
// 7. update rollup state
|
|
64
|
-
runner.use(
|
|
65
|
-
async (context, next) => {
|
|
66
|
-
const { tx, itx, rollupState, statedb, senderState, stakeStates, senderUpdates, updateVaults } = context;
|
|
67
|
-
|
|
68
|
-
const [newSenderState, newRollupState, newStakeStates] = await Promise.all([
|
|
69
|
-
// update sender state
|
|
70
|
-
statedb.account.update(
|
|
71
|
-
senderState.address,
|
|
72
|
-
account.update(senderState, { nonce: tx.nonce, ...senderUpdates }, context),
|
|
73
|
-
context
|
|
74
|
-
),
|
|
75
|
-
|
|
76
|
-
// update rollup
|
|
77
|
-
statedb.rollup.update(itx.rollup, rollup.close(rollupState, context), context),
|
|
78
|
-
|
|
79
|
-
// update stake states
|
|
80
|
-
Promise.all(
|
|
81
|
-
stakeStates.map((x) =>
|
|
82
|
-
statedb.stake.update(
|
|
83
|
-
x.address,
|
|
84
|
-
stake.update(x, { revocable: true, leaveWaitingPeriod: rollupState.leaveWaitingPeriod }, context),
|
|
85
|
-
context
|
|
86
|
-
)
|
|
87
|
-
)
|
|
88
|
-
),
|
|
89
|
-
]);
|
|
90
|
-
|
|
91
|
-
await updateVaults();
|
|
92
|
-
|
|
93
|
-
context.senderState = newSenderState;
|
|
94
|
-
context.rollupState = newRollupState;
|
|
95
|
-
context.stakeStates = newStakeStates;
|
|
96
|
-
|
|
97
|
-
next();
|
|
98
|
-
},
|
|
99
|
-
{ persistError: true }
|
|
100
|
-
);
|
|
101
|
-
|
|
102
|
-
runner.use(pipes.VerifyStateDiff());
|
|
103
|
-
|
|
104
|
-
module.exports = runner;
|
|
@@ -1,413 +0,0 @@
|
|
|
1
|
-
const pick = require('lodash/pick');
|
|
2
|
-
const cloneDeep = require('lodash/cloneDeep');
|
|
3
|
-
const { CustomError: Error } = require('@ocap/util/lib/error');
|
|
4
|
-
const MerkleTree = require('@ocap/merkle-tree');
|
|
5
|
-
const { Joi, schemas, patterns } = require('@arcblock/validator');
|
|
6
|
-
const { formatMessage } = require('@ocap/message');
|
|
7
|
-
const { toStakeAddress } = require('@arcblock/did-util');
|
|
8
|
-
const { Runner, pipes } = require('@ocap/tx-pipeline');
|
|
9
|
-
const { account, stake, rollup, rollupBlock, tx: Tx } = require('@ocap/state');
|
|
10
|
-
|
|
11
|
-
const debug = require('debug')(`${require('../../../package.json').name}:create-rollup-block`);
|
|
12
|
-
|
|
13
|
-
const VerifySigners = require('./pipes/verify-signers');
|
|
14
|
-
const VerifyEvidence = require('./pipes/verify-evidence');
|
|
15
|
-
const VerifyStatus = require('./pipes/verify-status');
|
|
16
|
-
const EnsureValidator = require('./pipes/ensure-validator');
|
|
17
|
-
const EnsureTxGas = require('../../pipes/ensure-gas');
|
|
18
|
-
const EnsureTxCost = require('../../pipes/ensure-cost');
|
|
19
|
-
|
|
20
|
-
const { applyTokenChange, ensureBlockReward, getRewardLocker } = require('../../util');
|
|
21
|
-
|
|
22
|
-
const runner = new Runner();
|
|
23
|
-
|
|
24
|
-
// 1. verify itx
|
|
25
|
-
const schema = Joi.object({
|
|
26
|
-
hash: Joi.string().regex(patterns.txHash).required(),
|
|
27
|
-
height: Joi.number().integer().greater(0).required(),
|
|
28
|
-
merkleRoot: Joi.string().regex(patterns.txHash).required(),
|
|
29
|
-
previousHash: Joi.string().when('height', {
|
|
30
|
-
is: 1,
|
|
31
|
-
then: Joi.string().optional().allow(null).allow(''),
|
|
32
|
-
otherwise: Joi.string().regex(patterns.txHash).required(),
|
|
33
|
-
}),
|
|
34
|
-
txsHash: Joi.string().regex(patterns.txHash).required(),
|
|
35
|
-
txsList: Joi.array().items(Joi.string().regex(patterns.txHash).required()).min(1).unique().required(),
|
|
36
|
-
proposer: Joi.DID().prefix().wallet('ethereum').required(),
|
|
37
|
-
signaturesList: schemas.multiSig.min(1).required(),
|
|
38
|
-
rollup: Joi.DID().prefix().role('ROLE_ROLLUP').required(),
|
|
39
|
-
minReward: Joi.BN().min(0).required(),
|
|
40
|
-
governance: Joi.boolean().default(false),
|
|
41
|
-
data: Joi.any().optional().allow(null),
|
|
42
|
-
}).options({ stripUnknown: true, noDefaults: false });
|
|
43
|
-
|
|
44
|
-
runner.use((context, next) => {
|
|
45
|
-
const { tx, itx } = context;
|
|
46
|
-
|
|
47
|
-
context.formattedItx = formatMessage('CreateRollupBlockTx', itx);
|
|
48
|
-
|
|
49
|
-
const { error } = schema.validate(itx);
|
|
50
|
-
if (error) {
|
|
51
|
-
return next(new Error('INVALID_TX', error.message));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// ensure proposer same with tx.from
|
|
55
|
-
if (tx.from !== itx.proposer) {
|
|
56
|
-
return next(new Error('INVALID_TX', 'itx.proposer must be same with tx.from'));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// ensure proposer in signer list
|
|
60
|
-
if (tx.signaturesList.some((x) => x.signer === itx.proposer) === false) {
|
|
61
|
-
return next(new Error('INVALID_TX', 'itx.proposer must exist in signatures'));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// ensure tx hash match with txs
|
|
65
|
-
const txsHash = MerkleTree.getListHash(itx.txsList);
|
|
66
|
-
if (txsHash !== itx.txsHash) {
|
|
67
|
-
return next(new Error('INVALID_TX', 'itx.txsHash does not match with itx.txs'));
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// ensure block hash is correct
|
|
71
|
-
const blockHash = MerkleTree.getBlockHash({
|
|
72
|
-
...pick(itx, ['height', 'merkleRoot', 'txsHash']),
|
|
73
|
-
previousHash: itx.height === 1 ? '' : itx.previousHash,
|
|
74
|
-
});
|
|
75
|
-
if (blockHash !== itx.hash) {
|
|
76
|
-
return next(new Error('INVALID_TX', 'itx.hash invalid'));
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return next();
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
// 2. verify rollup state & height
|
|
83
|
-
runner.use(pipes.ExtractState({ from: 'itx.rollup', to: 'rollupState', status: 'INVALID_ROLLUP', table: 'rollup' }));
|
|
84
|
-
runner.use(EnsureValidator());
|
|
85
|
-
runner.use(VerifyStatus({ closed: false }));
|
|
86
|
-
runner.use((context, next) => {
|
|
87
|
-
const { itx, rollupState } = context;
|
|
88
|
-
|
|
89
|
-
if (itx.height !== rollupState.blockHeight + 1) {
|
|
90
|
-
return next(
|
|
91
|
-
new Error('INVALID_TX', `Expect new block height to be ${rollupState.blockHeight + 1}, got ${itx.height}`)
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if (itx.governance) {
|
|
96
|
-
// ensure minReward for governance block
|
|
97
|
-
if (itx.minReward !== '0') {
|
|
98
|
-
return next(new Error('INVALID_TX', 'itx.minReward should be 0 for governance block'));
|
|
99
|
-
}
|
|
100
|
-
// ensure blockSize for governance block
|
|
101
|
-
if (itx.txsList.length !== 1) {
|
|
102
|
-
return next(new Error('INVALID_TX', 'itx.txs should contain only 1 tx for governance block'));
|
|
103
|
-
}
|
|
104
|
-
} else {
|
|
105
|
-
if (rollupState.paused) {
|
|
106
|
-
return next(new Error('INVALID_TX', 'Normal block is only allowed when rollup is not paused'));
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// ensure block size
|
|
110
|
-
const blockSize = itx.txsList.length;
|
|
111
|
-
if (blockSize < rollupState.minBlockSize) {
|
|
112
|
-
return next(
|
|
113
|
-
new Error('INVALID_TX', `Expect at least ${rollupState.minBlockSize} tx in the block, got ${blockSize}`)
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
if (blockSize > rollupState.maxBlockSize) {
|
|
117
|
-
return next(
|
|
118
|
-
new Error('INVALID_TX', `Expect at most ${rollupState.maxBlockSize} tx in the block, got ${blockSize}`)
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return next();
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
// 4. verify evidence signers, signatures, state
|
|
127
|
-
runner.use(VerifySigners({ signersKey: 'itx.signaturesList', allowSender: true }));
|
|
128
|
-
runner.use(VerifyEvidence({ evidenceKey: 'itx.hash', signaturesKey: 'itx.signaturesList', verifyMethod: 'ethVerify' }));
|
|
129
|
-
|
|
130
|
-
// 3. verify signers & signatures
|
|
131
|
-
runner.use(VerifySigners({ signersKey: 'tx.signaturesList', allowSender: true }));
|
|
132
|
-
runner.use(pipes.VerifyMultiSigV2({ signersKey: 'signers' }));
|
|
133
|
-
|
|
134
|
-
// 4. verify sender and signer states
|
|
135
|
-
runner.use(
|
|
136
|
-
pipes.ExtractState({ from: 'tx.from', to: 'senderState', status: 'INVALID_SENDER_STATE', table: 'account' })
|
|
137
|
-
);
|
|
138
|
-
runner.use(
|
|
139
|
-
pipes.ExtractState({ from: 'signers', to: 'signerStates', status: 'INVALID_SIGNER_STATE', table: 'account' })
|
|
140
|
-
);
|
|
141
|
-
runner.use(pipes.VerifyAccountMigration({ signerKey: 'signerStates', stateKey: 'senderState', addressKey: 'tx.from' }));
|
|
142
|
-
|
|
143
|
-
// 5. verify previous block
|
|
144
|
-
runner.use(pipes.ExtractState({ from: 'itx.previousHash', to: 'previousBlock', status: 'OK', table: 'rollupBlock' }));
|
|
145
|
-
runner.use((context, next) => {
|
|
146
|
-
const { txTime, itx, previousBlock, rollupState } = context;
|
|
147
|
-
if (itx.height > 1) {
|
|
148
|
-
if (!previousBlock) {
|
|
149
|
-
return next(new Error('INVALID_TX', `Rollup block with height ${itx.height} does not exist`));
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if (itx.height !== previousBlock.height + 1) {
|
|
153
|
-
return next(
|
|
154
|
-
new Error(
|
|
155
|
-
'INVALID_TX',
|
|
156
|
-
`Unexpected previous block height, expected ${itx.height - 1}, got ${previousBlock.height}`
|
|
157
|
-
)
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// ensure minBlockInterval for normal blocks
|
|
162
|
-
if (itx.governance === false) {
|
|
163
|
-
const minBlockTime = +new Date(previousBlock.context.genesisTime) + rollupState.minBlockInterval * 1000;
|
|
164
|
-
const newBlockTime = +new Date(txTime);
|
|
165
|
-
if (newBlockTime < minBlockTime) {
|
|
166
|
-
return next(
|
|
167
|
-
new Error(
|
|
168
|
-
'INVALID_TX',
|
|
169
|
-
`Block does not comply with minBlockInterval: ${new Date(minBlockTime).toISOString()}`
|
|
170
|
-
)
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return next();
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
// 6. verify new block
|
|
180
|
-
runner.use(pipes.ExtractState({ from: 'itx.hash', to: 'newBlock', status: 'OK', table: 'rollupBlock' }));
|
|
181
|
-
runner.use((context, next) => {
|
|
182
|
-
if (context.newBlock) {
|
|
183
|
-
return next(new Error('INVALID_TX', `Rollup block with height ${context.itx.height} already exists`));
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
return next();
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
// 7. verify token state
|
|
190
|
-
runner.use(
|
|
191
|
-
pipes.ExtractState({ from: 'rollupState.tokenAddress', to: 'tokenState', status: 'INVALID_TOKEN', table: 'token' })
|
|
192
|
-
);
|
|
193
|
-
|
|
194
|
-
// 8. verify txs
|
|
195
|
-
runner.use(pipes.ExtractState({ from: 'itx.txsList', to: 'txStates', status: 'INVALID_TX', table: 'tx' }));
|
|
196
|
-
runner.use(({ itx, txStates }, next) => {
|
|
197
|
-
const normalTxTypes = ['deposit_token_v2', 'withdraw_token_v2'];
|
|
198
|
-
const governanceTxTypes = ['pause_rollup', 'resume_rollup', 'migrate_rollup'];
|
|
199
|
-
|
|
200
|
-
// ensure not finalized
|
|
201
|
-
const finalizedTx = txStates.some((x) => x.finalized);
|
|
202
|
-
if (finalizedTx) {
|
|
203
|
-
return next(new Error('INVALID_TX', 'Should not include finalized tx in later block'));
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
// ensure tx are successfully executed
|
|
207
|
-
const invalidStatusTx = txStates.some((x) => x.code !== 'OK');
|
|
208
|
-
if (invalidStatusTx) {
|
|
209
|
-
return next(new Error('INVALID_TX', 'Rollup block can only include successful executed transactions'));
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
// ensure governance block only contains governance tx
|
|
213
|
-
if (itx.governance) {
|
|
214
|
-
if (txStates.some((x) => governanceTxTypes.includes(x.type) === false)) {
|
|
215
|
-
return next(
|
|
216
|
-
new Error('INVALID_TX', `Governance block can only include governance txs: ${governanceTxTypes.join(',')}`)
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
} else {
|
|
220
|
-
// ensure tx type for normal block
|
|
221
|
-
const invalidTypeTx = txStates.some((x) => normalTxTypes.includes(x.type) === false);
|
|
222
|
-
if (invalidTypeTx) {
|
|
223
|
-
return next(new Error('INVALID_TX', `Rollup block can only include normal txs: ${normalTxTypes.join(',')}`));
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
// ensure rollup belonging
|
|
228
|
-
const invalidRollupTx = txStates.some((x) => x.tx.itxJson.rollup !== itx.rollup);
|
|
229
|
-
if (invalidRollupTx) {
|
|
230
|
-
return next(new Error('INVALID_TX', `Rollup block can only include tx from rollup ${itx.rollup}`));
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// ensure merkleRoot: deposit_token tx not included in the merkleTree
|
|
234
|
-
const merkleTree = MerkleTree.getBlockMerkleTree(
|
|
235
|
-
txStates
|
|
236
|
-
.map((x) => {
|
|
237
|
-
if (x.type === 'withdraw_token_v2') {
|
|
238
|
-
return { hash: x.hash, to: x.tx.itxJson.to, amount: x.tx.itxJson.token.value };
|
|
239
|
-
}
|
|
240
|
-
if (x.type === 'pause_rollup') {
|
|
241
|
-
return { hash: x.hash, to: MerkleTree.BLACK_HOLE, amount: '0' };
|
|
242
|
-
}
|
|
243
|
-
if (x.type === 'resume_rollup') {
|
|
244
|
-
return { hash: x.hash, to: MerkleTree.BLACK_HOLE, amount: '0' };
|
|
245
|
-
}
|
|
246
|
-
if (x.type === 'migrate_rollup') {
|
|
247
|
-
return { hash: x.hash, to: x.tx.itxJson.to, amount: '0' };
|
|
248
|
-
}
|
|
249
|
-
return null;
|
|
250
|
-
})
|
|
251
|
-
.filter(Boolean)
|
|
252
|
-
);
|
|
253
|
-
if (merkleTree.getHexRoot() !== itx.merkleRoot) {
|
|
254
|
-
return next(new Error('INVALID_TX', 'Invalid rollup block merkle root'));
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
return next();
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
// 9. verify staking: used for minting & burning
|
|
261
|
-
runner.use((context, next) => {
|
|
262
|
-
const { itx, txStates } = context;
|
|
263
|
-
|
|
264
|
-
const depositProposerStakeAddr = txStates
|
|
265
|
-
.filter((x) => x.type === 'deposit_token_v2')
|
|
266
|
-
.map((x) => toStakeAddress(x.tx.itxJson.proposer, itx.rollup));
|
|
267
|
-
|
|
268
|
-
const withdrawLockerStakeAddr = txStates
|
|
269
|
-
.filter((x) => x.type === 'withdraw_token_v2')
|
|
270
|
-
.map((x) => toStakeAddress(x.tx.from, itx.rollup));
|
|
271
|
-
|
|
272
|
-
context.stakeAddress = [...depositProposerStakeAddr, ...withdrawLockerStakeAddr, getRewardLocker(itx.rollup)];
|
|
273
|
-
|
|
274
|
-
return next();
|
|
275
|
-
});
|
|
276
|
-
runner.use(
|
|
277
|
-
pipes.ExtractState({ from: 'stakeAddress', to: 'stakeStates', status: 'INVALID_STAKE_STATE', table: 'stake' })
|
|
278
|
-
);
|
|
279
|
-
|
|
280
|
-
// 10. ensure block reward and dynamic tx fees
|
|
281
|
-
runner.use((context, next) => {
|
|
282
|
-
const { itx, txStates, rollupState } = context;
|
|
283
|
-
try {
|
|
284
|
-
const result = ensureBlockReward(rollupState, itx.minReward, txStates);
|
|
285
|
-
context.senders = Object.keys(result.accountUpdates);
|
|
286
|
-
Object.assign(context, result);
|
|
287
|
-
return next();
|
|
288
|
-
} catch (err) {
|
|
289
|
-
return next(err);
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
runner.use(
|
|
293
|
-
pipes.ExtractState({ from: 'senders', to: 'senderStates', status: 'INVALID_SENDER_STATE', table: 'account' })
|
|
294
|
-
);
|
|
295
|
-
|
|
296
|
-
// Ensure tx fee and gas
|
|
297
|
-
runner.use(
|
|
298
|
-
EnsureTxGas((context) => {
|
|
299
|
-
const result = { create: 1, update: 2, payment: 0 };
|
|
300
|
-
|
|
301
|
-
result.update += context.stakeStates.filter((x) => context.stakeUpdates[x.address]).length;
|
|
302
|
-
result.update += context.txStates.length;
|
|
303
|
-
result.update += (context.senderStates || []).length;
|
|
304
|
-
|
|
305
|
-
return result;
|
|
306
|
-
})
|
|
307
|
-
);
|
|
308
|
-
runner.use(EnsureTxCost({ attachSenderChanges: true }));
|
|
309
|
-
|
|
310
|
-
// Save context snapshot before updating states
|
|
311
|
-
runner.use(pipes.TakeStateSnapshot());
|
|
312
|
-
|
|
313
|
-
// 11. update state: mint tokens for deposits, burn tokens for withdraws
|
|
314
|
-
runner.use(
|
|
315
|
-
async (context, next) => {
|
|
316
|
-
const {
|
|
317
|
-
tx,
|
|
318
|
-
itx,
|
|
319
|
-
statedb,
|
|
320
|
-
rollupState,
|
|
321
|
-
senderState,
|
|
322
|
-
stakeStates,
|
|
323
|
-
txStates,
|
|
324
|
-
formattedItx,
|
|
325
|
-
senderUpdates,
|
|
326
|
-
updateVaults,
|
|
327
|
-
} = context;
|
|
328
|
-
const senderStates = context.senderStates || [];
|
|
329
|
-
|
|
330
|
-
const [newSenderState, newStakeStates, newSenderStates, newRollupState, rollupBlockState, newTxStates] =
|
|
331
|
-
await Promise.all([
|
|
332
|
-
// update sender(proposer) account
|
|
333
|
-
statedb.account.update(
|
|
334
|
-
senderState.address,
|
|
335
|
-
account.update(senderState, { nonce: tx.nonce, ...senderUpdates }, context),
|
|
336
|
-
context
|
|
337
|
-
),
|
|
338
|
-
|
|
339
|
-
// update stake states
|
|
340
|
-
Promise.all(
|
|
341
|
-
stakeStates.map((x) =>
|
|
342
|
-
context.stakeUpdates[x.address]
|
|
343
|
-
? statedb.stake.update(
|
|
344
|
-
x.address,
|
|
345
|
-
stake.update(x, applyTokenChange(x, context.stakeUpdates[x.address]), context),
|
|
346
|
-
context
|
|
347
|
-
)
|
|
348
|
-
: Promise.resolve(x)
|
|
349
|
-
)
|
|
350
|
-
),
|
|
351
|
-
|
|
352
|
-
// update tx owner states: those may get refund
|
|
353
|
-
Promise.all(
|
|
354
|
-
senderStates.map((x) =>
|
|
355
|
-
statedb.account.update(
|
|
356
|
-
x.address,
|
|
357
|
-
account.update(x, applyTokenChange(x, context.accountUpdates[x.address]), context),
|
|
358
|
-
context
|
|
359
|
-
)
|
|
360
|
-
)
|
|
361
|
-
),
|
|
362
|
-
|
|
363
|
-
// Update rollup state
|
|
364
|
-
statedb.rollup.update(
|
|
365
|
-
rollupState.address,
|
|
366
|
-
rollup.update(rollupState, { blockHeight: itx.height, blockHash: itx.hash }, context),
|
|
367
|
-
context
|
|
368
|
-
),
|
|
369
|
-
|
|
370
|
-
// Create rollup block
|
|
371
|
-
statedb.rollupBlock.create(
|
|
372
|
-
itx.hash,
|
|
373
|
-
rollupBlock.create(
|
|
374
|
-
{
|
|
375
|
-
...formattedItx,
|
|
376
|
-
...['rewardAmount', 'mintedAmount', 'burnedAmount'].reduce((acc, x) => {
|
|
377
|
-
acc[x] = context[x].toString(10);
|
|
378
|
-
return acc;
|
|
379
|
-
}, {}),
|
|
380
|
-
},
|
|
381
|
-
context
|
|
382
|
-
),
|
|
383
|
-
context
|
|
384
|
-
),
|
|
385
|
-
|
|
386
|
-
// Update tx states: mark as finalized
|
|
387
|
-
Promise.all(
|
|
388
|
-
txStates.map((x) => statedb.tx.update(x.hash, Tx.update(x, { finalized: true, tx: x.tx }), context))
|
|
389
|
-
),
|
|
390
|
-
]);
|
|
391
|
-
|
|
392
|
-
await updateVaults();
|
|
393
|
-
|
|
394
|
-
context.senderState = newSenderState;
|
|
395
|
-
context.stakeStates = newStakeStates.filter((x) => context.stakeUpdates[x.address]);
|
|
396
|
-
context.newSenderStates = newSenderStates;
|
|
397
|
-
context.rollupState = newRollupState;
|
|
398
|
-
context.rollupBlockState = rollupBlockState;
|
|
399
|
-
context.txStates = newTxStates;
|
|
400
|
-
|
|
401
|
-
context.updatedAccounts.push(...cloneDeep(Object.values(context.stakeUpdates)));
|
|
402
|
-
context.updatedAccounts.push(...cloneDeep(Object.values(context.accountUpdates)));
|
|
403
|
-
|
|
404
|
-
debug('create-rollup-block', { itx, updatedAccounts: context.updatedAccounts });
|
|
405
|
-
|
|
406
|
-
next();
|
|
407
|
-
},
|
|
408
|
-
{ persistError: true }
|
|
409
|
-
);
|
|
410
|
-
|
|
411
|
-
runner.use(pipes.VerifyStateDiff());
|
|
412
|
-
|
|
413
|
-
module.exports = runner;
|