@aztec/ethereum 0.0.0-test.1 → 0.0.1-commit.21caa21
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/dest/account.d.ts +2 -0
- package/dest/account.d.ts.map +1 -0
- package/dest/account.js +4 -0
- package/dest/chain.d.ts +1 -1
- package/dest/client.d.ts +6 -4
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +16 -2
- package/dest/config.d.ts +111 -17
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +462 -22
- package/dest/constants.d.ts +1 -1
- package/dest/contracts/empire_base.d.ts +24 -8
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/empire_base.js +75 -2
- package/dest/contracts/empire_slashing_proposer.d.ts +66 -0
- package/dest/contracts/empire_slashing_proposer.d.ts.map +1 -0
- package/dest/contracts/empire_slashing_proposer.js +200 -0
- package/dest/contracts/errors.d.ts +7 -0
- package/dest/contracts/errors.d.ts.map +1 -0
- package/dest/contracts/errors.js +12 -0
- package/dest/contracts/fee_asset_handler.d.ts +19 -0
- package/dest/contracts/fee_asset_handler.d.ts.map +1 -0
- package/dest/contracts/fee_asset_handler.js +57 -0
- package/dest/contracts/fee_juice.d.ts +6 -7
- package/dest/contracts/fee_juice.d.ts.map +1 -1
- package/dest/contracts/fee_juice.js +27 -20
- package/dest/contracts/governance.d.ts +43 -32
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +87 -84
- package/dest/contracts/governance_proposer.d.ts +16 -13
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +37 -17
- package/dest/contracts/gse.d.ts +32 -0
- package/dest/contracts/gse.d.ts.map +1 -0
- package/dest/contracts/gse.js +72 -0
- package/dest/contracts/inbox.d.ts +26 -0
- package/dest/contracts/inbox.d.ts.map +1 -0
- package/dest/contracts/inbox.js +45 -0
- package/dest/contracts/index.d.ts +9 -3
- package/dest/contracts/index.d.ts.map +1 -1
- package/dest/contracts/index.js +8 -2
- package/dest/contracts/multicall.d.ts +21 -0
- package/dest/contracts/multicall.d.ts.map +1 -0
- package/dest/contracts/multicall.js +156 -0
- package/dest/contracts/registry.d.ts +10 -5
- package/dest/contracts/registry.d.ts.map +1 -1
- package/dest/contracts/registry.js +44 -16
- package/dest/contracts/rollup.d.ts +204 -40
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +529 -79
- package/dest/contracts/slasher_contract.d.ts +44 -0
- package/dest/contracts/slasher_contract.d.ts.map +1 -0
- package/dest/contracts/slasher_contract.js +75 -0
- package/dest/contracts/tally_slashing_proposer.d.ts +139 -0
- package/dest/contracts/tally_slashing_proposer.d.ts.map +1 -0
- package/dest/contracts/tally_slashing_proposer.js +313 -0
- package/dest/contracts/utils.d.ts +3 -0
- package/dest/contracts/utils.d.ts.map +1 -0
- package/dest/contracts/utils.js +11 -0
- package/dest/deploy_l1_contracts.d.ts +577 -21114
- package/dest/deploy_l1_contracts.d.ts.map +1 -1
- package/dest/deploy_l1_contracts.js +1225 -421
- package/dest/eth-signer/eth-signer.d.ts +21 -0
- package/dest/eth-signer/eth-signer.d.ts.map +1 -0
- package/dest/eth-signer/eth-signer.js +5 -0
- package/dest/eth-signer/index.d.ts +2 -0
- package/dest/eth-signer/index.d.ts.map +1 -0
- package/dest/eth-signer/index.js +1 -0
- package/dest/index.d.ts +7 -3
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +6 -2
- package/dest/l1_artifacts.d.ts +77344 -0
- package/dest/l1_artifacts.d.ts.map +1 -0
- package/dest/l1_artifacts.js +166 -0
- package/dest/l1_contract_addresses.d.ts +24 -4
- package/dest/l1_contract_addresses.d.ts.map +1 -1
- package/dest/l1_contract_addresses.js +22 -18
- package/dest/l1_reader.d.ts +2 -2
- package/dest/l1_reader.d.ts.map +1 -1
- package/dest/l1_reader.js +8 -8
- package/dest/l1_tx_utils/config.d.ts +59 -0
- package/dest/l1_tx_utils/config.d.ts.map +1 -0
- package/dest/l1_tx_utils/config.js +82 -0
- package/dest/l1_tx_utils/constants.d.ts +6 -0
- package/dest/l1_tx_utils/constants.d.ts.map +1 -0
- package/dest/l1_tx_utils/constants.js +14 -0
- package/dest/l1_tx_utils/factory.d.ts +24 -0
- package/dest/l1_tx_utils/factory.d.ts.map +1 -0
- package/dest/l1_tx_utils/factory.js +12 -0
- package/dest/l1_tx_utils/index.d.ts +10 -0
- package/dest/l1_tx_utils/index.d.ts.map +1 -0
- package/dest/l1_tx_utils/index.js +10 -0
- package/dest/l1_tx_utils/interfaces.d.ts +76 -0
- package/dest/l1_tx_utils/interfaces.d.ts.map +1 -0
- package/dest/l1_tx_utils/interfaces.js +4 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +94 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_tx_utils.js +610 -0
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts +26 -0
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.js +26 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +94 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.js +430 -0
- package/dest/l1_tx_utils/signer.d.ts +4 -0
- package/dest/l1_tx_utils/signer.d.ts.map +1 -0
- package/dest/l1_tx_utils/signer.js +16 -0
- package/dest/l1_tx_utils/types.d.ts +67 -0
- package/dest/l1_tx_utils/types.d.ts.map +1 -0
- package/dest/l1_tx_utils/types.js +26 -0
- package/dest/l1_tx_utils/utils.d.ts +4 -0
- package/dest/l1_tx_utils/utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/utils.js +14 -0
- package/dest/l1_types.d.ts +6 -0
- package/dest/l1_types.d.ts.map +1 -0
- package/dest/l1_types.js +1 -0
- package/dest/publisher_manager.d.ts +15 -0
- package/dest/publisher_manager.d.ts.map +1 -0
- package/dest/publisher_manager.js +88 -0
- package/dest/queries.d.ts +4 -2
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +53 -12
- package/dest/test/chain_monitor.d.ts +73 -0
- package/dest/test/chain_monitor.d.ts.map +1 -0
- package/dest/test/chain_monitor.js +215 -0
- package/dest/test/delayed_tx_utils.d.ts +8 -3
- package/dest/test/delayed_tx_utils.d.ts.map +1 -1
- package/dest/test/delayed_tx_utils.js +13 -6
- package/dest/test/eth_cheat_codes.d.ts +217 -0
- package/dest/test/eth_cheat_codes.d.ts.map +1 -0
- package/dest/test/eth_cheat_codes.js +558 -0
- package/dest/test/eth_cheat_codes_with_state.d.ts +2 -2
- package/dest/test/eth_cheat_codes_with_state.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes_with_state.js +1 -1
- package/dest/test/index.d.ts +4 -1
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +3 -0
- package/dest/test/rollup_cheat_codes.d.ts +87 -0
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -0
- package/dest/test/rollup_cheat_codes.js +266 -0
- package/dest/test/start_anvil.d.ts +7 -1
- package/dest/test/start_anvil.d.ts.map +1 -1
- package/dest/test/start_anvil.js +16 -7
- package/dest/test/tx_delayer.d.ts +18 -7
- package/dest/test/tx_delayer.d.ts.map +1 -1
- package/dest/test/tx_delayer.js +95 -19
- package/dest/test/upgrade_utils.d.ts +6 -5
- package/dest/test/upgrade_utils.d.ts.map +1 -1
- package/dest/test/upgrade_utils.js +23 -16
- package/dest/types.d.ts +7 -8
- package/dest/types.d.ts.map +1 -1
- package/dest/types.js +3 -1
- package/dest/utils.d.ts +2 -1
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +43 -88
- package/dest/zkPassportVerifierAddress.d.ts +15 -0
- package/dest/zkPassportVerifierAddress.d.ts.map +1 -0
- package/dest/zkPassportVerifierAddress.js +11 -0
- package/package.json +28 -19
- package/src/account.ts +5 -0
- package/src/client.ts +42 -4
- package/src/config.ts +592 -31
- package/src/contracts/empire_base.ts +77 -7
- package/src/contracts/empire_slashing_proposer.ts +265 -0
- package/src/contracts/errors.ts +13 -0
- package/src/contracts/fee_asset_handler.ts +63 -0
- package/src/contracts/fee_juice.ts +29 -15
- package/src/contracts/governance.ts +80 -77
- package/src/contracts/governance_proposer.ts +66 -24
- package/src/contracts/gse.ts +88 -0
- package/src/contracts/inbox.ts +63 -0
- package/src/contracts/index.ts +8 -2
- package/src/contracts/multicall.ts +155 -0
- package/src/contracts/registry.ts +51 -26
- package/src/contracts/rollup.ts +596 -74
- package/src/contracts/slasher_contract.ts +89 -0
- package/src/contracts/tally_slashing_proposer.ts +316 -0
- package/src/contracts/utils.ts +14 -0
- package/src/deploy_l1_contracts.ts +1459 -538
- package/src/eth-signer/eth-signer.ts +25 -0
- package/src/eth-signer/index.ts +1 -0
- package/src/index.ts +6 -2
- package/src/l1_artifacts.ts +254 -0
- package/src/l1_contract_addresses.ts +32 -19
- package/src/l1_reader.ts +9 -9
- package/src/l1_tx_utils/README.md +177 -0
- package/src/l1_tx_utils/config.ts +143 -0
- package/src/l1_tx_utils/constants.ts +18 -0
- package/src/l1_tx_utils/factory.ts +64 -0
- package/src/l1_tx_utils/index.ts +12 -0
- package/src/l1_tx_utils/interfaces.ts +86 -0
- package/src/l1_tx_utils/l1_tx_utils.ts +718 -0
- package/src/l1_tx_utils/l1_tx_utils_with_blobs.ts +77 -0
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +558 -0
- package/src/l1_tx_utils/signer.ts +28 -0
- package/src/l1_tx_utils/types.ts +85 -0
- package/src/l1_tx_utils/utils.ts +16 -0
- package/src/l1_types.ts +6 -0
- package/src/publisher_manager.ts +106 -0
- package/src/queries.ts +73 -15
- package/src/test/chain_monitor.ts +243 -0
- package/src/test/delayed_tx_utils.ts +34 -6
- package/src/test/eth_cheat_codes.ts +588 -0
- package/src/test/eth_cheat_codes_with_state.ts +1 -1
- package/src/test/index.ts +3 -0
- package/src/test/rollup_cheat_codes.ts +307 -0
- package/src/test/start_anvil.ts +22 -5
- package/src/test/tx_delayer.ts +127 -26
- package/src/test/upgrade_utils.ts +30 -21
- package/src/types.ts +10 -8
- package/src/utils.ts +49 -90
- package/src/zkPassportVerifierAddress.ts +15 -0
- package/dest/contracts/forwarder.d.ts +0 -24
- package/dest/contracts/forwarder.d.ts.map +0 -1
- package/dest/contracts/forwarder.js +0 -101
- package/dest/contracts/slashing_proposer.d.ts +0 -21
- package/dest/contracts/slashing_proposer.d.ts.map +0 -1
- package/dest/contracts/slashing_proposer.js +0 -47
- package/dest/eth_cheat_codes.d.ts +0 -147
- package/dest/eth_cheat_codes.d.ts.map +0 -1
- package/dest/eth_cheat_codes.js +0 -303
- package/dest/l1_tx_utils.d.ts +0 -192
- package/dest/l1_tx_utils.d.ts.map +0 -1
- package/dest/l1_tx_utils.js +0 -641
- package/dest/l1_tx_utils_with_blobs.d.ts +0 -12
- package/dest/l1_tx_utils_with_blobs.d.ts.map +0 -1
- package/dest/l1_tx_utils_with_blobs.js +0 -64
- package/src/contracts/forwarder.ts +0 -132
- package/src/contracts/slashing_proposer.ts +0 -51
- package/src/eth_cheat_codes.ts +0 -314
- package/src/l1_tx_utils.ts +0 -847
- package/src/l1_tx_utils_with_blobs.ts +0 -86
package/dest/contracts/rollup.js
CHANGED
|
@@ -4,16 +4,30 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
4
4
|
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
}
|
|
7
|
+
import { EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
7
8
|
import { memoize } from '@aztec/foundation/decorators';
|
|
8
9
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
9
|
-
import { RollupAbi
|
|
10
|
-
import {
|
|
10
|
+
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
11
|
+
import { RollupStorage } from '@aztec/l1-artifacts/RollupStorage';
|
|
12
|
+
import chunk from 'lodash.chunk';
|
|
13
|
+
import { encodeFunctionData, getContract, hexToBigInt, keccak256 } from 'viem';
|
|
11
14
|
import { getPublicClient } from '../client.js';
|
|
12
15
|
import { formatViemError } from '../utils.js';
|
|
13
|
-
import {
|
|
16
|
+
import { EmpireSlashingProposerContract } from './empire_slashing_proposer.js';
|
|
17
|
+
import { GSEContract } from './gse.js';
|
|
18
|
+
import { SlasherContract } from './slasher_contract.js';
|
|
19
|
+
import { TallySlashingProposerContract } from './tally_slashing_proposer.js';
|
|
20
|
+
import { checkBlockTag } from './utils.js';
|
|
21
|
+
export var SlashingProposerType = /*#__PURE__*/ function(SlashingProposerType) {
|
|
22
|
+
SlashingProposerType[SlashingProposerType["None"] = 0] = "None";
|
|
23
|
+
SlashingProposerType[SlashingProposerType["Tally"] = 1] = "Tally";
|
|
24
|
+
SlashingProposerType[SlashingProposerType["Empire"] = 2] = "Empire";
|
|
25
|
+
return SlashingProposerType;
|
|
26
|
+
}({});
|
|
14
27
|
export class RollupContract {
|
|
15
28
|
client;
|
|
16
29
|
rollup;
|
|
30
|
+
static cachedStfStorageSlot;
|
|
17
31
|
static get checkBlobStorageSlot() {
|
|
18
32
|
const asString = RollupStorage.find((storage)=>storage.label === 'checkBlob')?.slot;
|
|
19
33
|
if (asString === undefined) {
|
|
@@ -21,9 +35,12 @@ export class RollupContract {
|
|
|
21
35
|
}
|
|
22
36
|
return BigInt(asString);
|
|
23
37
|
}
|
|
38
|
+
static get stfStorageSlot() {
|
|
39
|
+
return RollupContract.cachedStfStorageSlot ??= keccak256(Buffer.from('aztec.stf.storage', 'utf-8'));
|
|
40
|
+
}
|
|
24
41
|
static getFromL1ContractsValues(deployL1ContractsValues) {
|
|
25
|
-
const {
|
|
26
|
-
return new RollupContract(
|
|
42
|
+
const { l1Client, l1ContractAddresses: { rollupAddress } } = deployL1ContractsValues;
|
|
43
|
+
return new RollupContract(l1Client, rollupAddress.toString());
|
|
27
44
|
}
|
|
28
45
|
static getFromConfig(config) {
|
|
29
46
|
const client = getPublicClient(config);
|
|
@@ -41,18 +58,49 @@ export class RollupContract {
|
|
|
41
58
|
client
|
|
42
59
|
});
|
|
43
60
|
}
|
|
61
|
+
getGSE() {
|
|
62
|
+
return this.rollup.read.getGSE();
|
|
63
|
+
}
|
|
44
64
|
get address() {
|
|
45
65
|
return this.rollup.address;
|
|
46
66
|
}
|
|
67
|
+
getContract() {
|
|
68
|
+
return this.rollup;
|
|
69
|
+
}
|
|
47
70
|
async getSlashingProposer() {
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
71
|
+
const slasher = await this.getSlasherContract();
|
|
72
|
+
if (!slasher) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
const proposerAddress = await slasher.getProposer();
|
|
76
|
+
const proposerAbi = [
|
|
77
|
+
{
|
|
78
|
+
type: 'function',
|
|
79
|
+
name: 'SLASHING_PROPOSER_TYPE',
|
|
80
|
+
inputs: [],
|
|
81
|
+
outputs: [
|
|
82
|
+
{
|
|
83
|
+
name: '',
|
|
84
|
+
type: 'uint8',
|
|
85
|
+
internalType: 'enum SlasherFlavor'
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
stateMutability: 'view'
|
|
89
|
+
}
|
|
90
|
+
];
|
|
91
|
+
const proposer = getContract({
|
|
92
|
+
address: proposerAddress.toString(),
|
|
93
|
+
abi: proposerAbi,
|
|
52
94
|
client: this.client
|
|
53
95
|
});
|
|
54
|
-
const
|
|
55
|
-
|
|
96
|
+
const proposerType = await proposer.read.SLASHING_PROPOSER_TYPE();
|
|
97
|
+
if (proposerType === 1..valueOf()) {
|
|
98
|
+
return new TallySlashingProposerContract(this.client, proposerAddress);
|
|
99
|
+
} else if (proposerType === 2..valueOf()) {
|
|
100
|
+
return new EmpireSlashingProposerContract(this.client, proposerAddress);
|
|
101
|
+
} else {
|
|
102
|
+
throw new Error(`Unknown slashing proposer type: ${proposerType}`);
|
|
103
|
+
}
|
|
56
104
|
}
|
|
57
105
|
getL1StartBlock() {
|
|
58
106
|
return this.rollup.read.L1_BLOCK_AT_GENESIS();
|
|
@@ -60,44 +108,139 @@ export class RollupContract {
|
|
|
60
108
|
getL1GenesisTime() {
|
|
61
109
|
return this.rollup.read.getGenesisTime();
|
|
62
110
|
}
|
|
63
|
-
|
|
64
|
-
return this.rollup.read.
|
|
111
|
+
getProofSubmissionEpochs() {
|
|
112
|
+
return this.rollup.read.getProofSubmissionEpochs();
|
|
65
113
|
}
|
|
66
114
|
getEpochDuration() {
|
|
67
115
|
return this.rollup.read.getEpochDuration();
|
|
68
116
|
}
|
|
69
|
-
getSlotDuration() {
|
|
70
|
-
return this.rollup.read.getSlotDuration();
|
|
117
|
+
async getSlotDuration() {
|
|
118
|
+
return Number(await this.rollup.read.getSlotDuration());
|
|
71
119
|
}
|
|
72
120
|
getTargetCommitteeSize() {
|
|
73
121
|
return this.rollup.read.getTargetCommitteeSize();
|
|
74
122
|
}
|
|
75
|
-
|
|
76
|
-
return this.rollup.read.
|
|
123
|
+
getEjectionThreshold() {
|
|
124
|
+
return this.rollup.read.getEjectionThreshold();
|
|
125
|
+
}
|
|
126
|
+
getLocalEjectionThreshold() {
|
|
127
|
+
return this.rollup.read.getLocalEjectionThreshold();
|
|
128
|
+
}
|
|
129
|
+
getLagInEpochsForValidatorSet() {
|
|
130
|
+
return this.rollup.read.getLagInEpochsForValidatorSet();
|
|
131
|
+
}
|
|
132
|
+
getLagInEpochsForRandao() {
|
|
133
|
+
return this.rollup.read.getLagInEpochsForRandao();
|
|
134
|
+
}
|
|
135
|
+
getActivationThreshold() {
|
|
136
|
+
return this.rollup.read.getActivationThreshold();
|
|
137
|
+
}
|
|
138
|
+
getExitDelay() {
|
|
139
|
+
return this.rollup.read.getExitDelay();
|
|
140
|
+
}
|
|
141
|
+
getManaTarget() {
|
|
142
|
+
return this.rollup.read.getManaTarget();
|
|
143
|
+
}
|
|
144
|
+
getProvingCostPerMana() {
|
|
145
|
+
return this.rollup.read.getProvingCostPerManaInEth();
|
|
146
|
+
}
|
|
147
|
+
getProvingCostPerManaInFeeAsset() {
|
|
148
|
+
return this.rollup.read.getProvingCostPerManaInFeeAsset();
|
|
149
|
+
}
|
|
150
|
+
getManaLimit() {
|
|
151
|
+
return this.rollup.read.getManaLimit();
|
|
152
|
+
}
|
|
153
|
+
getVersion() {
|
|
154
|
+
return this.rollup.read.getVersion();
|
|
155
|
+
}
|
|
156
|
+
async getGenesisArchiveTreeRoot() {
|
|
157
|
+
return await this.rollup.read.archiveAt([
|
|
158
|
+
0n
|
|
159
|
+
]);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Returns rollup constants used for epoch queries.
|
|
163
|
+
* Return type is `L1RollupConstants` which is defined in stdlib,
|
|
164
|
+
* so we cant reference it until we move this contract to that package.
|
|
165
|
+
*/ async getRollupConstants() {
|
|
166
|
+
const [l1StartBlock, l1GenesisTime, slotDuration, epochDuration, proofSubmissionEpochs] = await Promise.all([
|
|
167
|
+
this.getL1StartBlock(),
|
|
168
|
+
this.getL1GenesisTime(),
|
|
169
|
+
this.getSlotDuration(),
|
|
170
|
+
this.getEpochDuration(),
|
|
171
|
+
this.getProofSubmissionEpochs()
|
|
172
|
+
]);
|
|
173
|
+
return {
|
|
174
|
+
l1StartBlock,
|
|
175
|
+
l1GenesisTime,
|
|
176
|
+
slotDuration,
|
|
177
|
+
epochDuration: Number(epochDuration),
|
|
178
|
+
proofSubmissionEpochs: Number(proofSubmissionEpochs)
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
getSlasherAddress() {
|
|
182
|
+
return this.rollup.read.getSlasher();
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Returns a SlasherContract instance for interacting with the slasher contract.
|
|
186
|
+
*/ async getSlasherContract() {
|
|
187
|
+
const slasherAddress = EthAddress.fromString(await this.getSlasherAddress());
|
|
188
|
+
if (slasherAddress.isZero()) {
|
|
189
|
+
return undefined;
|
|
190
|
+
}
|
|
191
|
+
return new SlasherContract(this.client, slasherAddress);
|
|
192
|
+
}
|
|
193
|
+
getOwner() {
|
|
194
|
+
return this.rollup.read.owner();
|
|
195
|
+
}
|
|
196
|
+
getActiveAttesterCount() {
|
|
197
|
+
return this.rollup.read.getActiveAttesterCount();
|
|
77
198
|
}
|
|
78
199
|
async getSlashingProposerAddress() {
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
200
|
+
const slasher = await this.getSlasherContract();
|
|
201
|
+
if (!slasher) {
|
|
202
|
+
return EthAddress.ZERO;
|
|
203
|
+
}
|
|
204
|
+
return await slasher.getProposer();
|
|
205
|
+
}
|
|
206
|
+
getCheckpointReward() {
|
|
207
|
+
return this.rollup.read.getCheckpointReward();
|
|
86
208
|
}
|
|
87
|
-
|
|
88
|
-
return this.rollup.read.
|
|
209
|
+
getCheckpointNumber() {
|
|
210
|
+
return this.rollup.read.getPendingCheckpointNumber();
|
|
89
211
|
}
|
|
90
|
-
|
|
91
|
-
return this.rollup.read.
|
|
212
|
+
getProvenCheckpointNumber() {
|
|
213
|
+
return this.rollup.read.getProvenCheckpointNumber();
|
|
92
214
|
}
|
|
93
|
-
getSlotNumber() {
|
|
94
|
-
return this.rollup.read.getCurrentSlot();
|
|
215
|
+
async getSlotNumber() {
|
|
216
|
+
return SlotNumber.fromBigInt(await this.rollup.read.getCurrentSlot());
|
|
95
217
|
}
|
|
96
|
-
|
|
97
|
-
return this.rollup.read.
|
|
218
|
+
getL1FeesAt(timestamp) {
|
|
219
|
+
return this.rollup.read.getL1FeesAt([
|
|
98
220
|
timestamp
|
|
99
221
|
]);
|
|
100
222
|
}
|
|
223
|
+
getFeeAssetPerEth() {
|
|
224
|
+
return this.rollup.read.getFeeAssetPerEth();
|
|
225
|
+
}
|
|
226
|
+
async getCommitteeAt(timestamp) {
|
|
227
|
+
const { result } = await this.client.simulateContract({
|
|
228
|
+
address: this.address,
|
|
229
|
+
abi: RollupAbi,
|
|
230
|
+
functionName: 'getCommitteeAt',
|
|
231
|
+
args: [
|
|
232
|
+
timestamp
|
|
233
|
+
]
|
|
234
|
+
}).catch((e)=>{
|
|
235
|
+
if (e instanceof Error && e.message.includes('ValidatorSelection__InsufficientValidatorSetSize')) {
|
|
236
|
+
return {
|
|
237
|
+
result: undefined
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
throw e;
|
|
241
|
+
});
|
|
242
|
+
return result;
|
|
243
|
+
}
|
|
101
244
|
getSampleSeedAt(timestamp) {
|
|
102
245
|
return this.rollup.read.getSampleSeedAt([
|
|
103
246
|
timestamp
|
|
@@ -106,20 +249,48 @@ export class RollupContract {
|
|
|
106
249
|
getCurrentSampleSeed() {
|
|
107
250
|
return this.rollup.read.getCurrentSampleSeed();
|
|
108
251
|
}
|
|
109
|
-
|
|
110
|
-
return this.rollup.read.
|
|
252
|
+
async getCurrentEpoch() {
|
|
253
|
+
return EpochNumber.fromBigInt(await this.rollup.read.getCurrentEpoch());
|
|
111
254
|
}
|
|
112
|
-
|
|
113
|
-
|
|
255
|
+
async getCurrentEpochCommittee() {
|
|
256
|
+
const { result } = await this.client.simulateContract({
|
|
257
|
+
address: this.address,
|
|
258
|
+
abi: RollupAbi,
|
|
259
|
+
functionName: 'getCurrentEpochCommittee',
|
|
260
|
+
args: []
|
|
261
|
+
}).catch((e)=>{
|
|
262
|
+
if (e instanceof Error && e.message.includes('ValidatorSelection__InsufficientValidatorSetSize')) {
|
|
263
|
+
return {
|
|
264
|
+
result: undefined
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
throw e;
|
|
268
|
+
});
|
|
269
|
+
return result;
|
|
114
270
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
271
|
+
async getCurrentProposer() {
|
|
272
|
+
const { result } = await this.client.simulateContract({
|
|
273
|
+
address: this.address,
|
|
274
|
+
abi: RollupAbi,
|
|
275
|
+
functionName: 'getCurrentProposer',
|
|
276
|
+
args: []
|
|
277
|
+
});
|
|
278
|
+
return result;
|
|
119
279
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
280
|
+
async getProposerAt(timestamp) {
|
|
281
|
+
const { result } = await this.client.simulateContract({
|
|
282
|
+
address: this.address,
|
|
283
|
+
abi: RollupAbi,
|
|
284
|
+
functionName: 'getProposerAt',
|
|
285
|
+
args: [
|
|
286
|
+
timestamp
|
|
287
|
+
]
|
|
288
|
+
});
|
|
289
|
+
return result;
|
|
290
|
+
}
|
|
291
|
+
getCheckpoint(checkpointNumber) {
|
|
292
|
+
return this.rollup.read.getCheckpoint([
|
|
293
|
+
BigInt(checkpointNumber)
|
|
123
294
|
]);
|
|
124
295
|
}
|
|
125
296
|
getTips() {
|
|
@@ -127,23 +298,35 @@ export class RollupContract {
|
|
|
127
298
|
}
|
|
128
299
|
getTimestampForSlot(slot) {
|
|
129
300
|
return this.rollup.read.getTimestampForSlot([
|
|
130
|
-
slot
|
|
301
|
+
BigInt(slot)
|
|
131
302
|
]);
|
|
132
303
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
304
|
+
getEntryQueueLength() {
|
|
305
|
+
return this.rollup.read.getEntryQueueLength();
|
|
306
|
+
}
|
|
307
|
+
getAvailableValidatorFlushes() {
|
|
308
|
+
return this.rollup.read.getAvailableValidatorFlushes();
|
|
309
|
+
}
|
|
310
|
+
async getNextFlushableEpoch() {
|
|
311
|
+
return EpochNumber.fromBigInt(await this.rollup.read.getNextFlushableEpoch());
|
|
312
|
+
}
|
|
313
|
+
async getCurrentEpochNumber() {
|
|
314
|
+
return EpochNumber.fromBigInt(await this.rollup.read.getCurrentEpoch());
|
|
315
|
+
}
|
|
316
|
+
async getEpochNumberForCheckpoint(checkpointNumber) {
|
|
317
|
+
return EpochNumber.fromBigInt(await this.rollup.read.getEpochForCheckpoint([
|
|
318
|
+
BigInt(checkpointNumber)
|
|
319
|
+
]));
|
|
138
320
|
}
|
|
139
321
|
async getRollupAddresses() {
|
|
140
|
-
const [inboxAddress, outboxAddress, feeJuicePortalAddress, rewardDistributorAddress, feeJuiceAddress, stakingAssetAddress] = (await Promise.all([
|
|
322
|
+
const [inboxAddress, outboxAddress, feeJuicePortalAddress, rewardDistributorAddress, feeJuiceAddress, stakingAssetAddress, gseAddress] = (await Promise.all([
|
|
141
323
|
this.rollup.read.getInbox(),
|
|
142
324
|
this.rollup.read.getOutbox(),
|
|
143
325
|
this.rollup.read.getFeeAssetPortal(),
|
|
144
326
|
this.rollup.read.getRewardDistributor(),
|
|
145
327
|
this.rollup.read.getFeeAsset(),
|
|
146
|
-
this.rollup.read.getStakingAsset()
|
|
328
|
+
this.rollup.read.getStakingAsset(),
|
|
329
|
+
this.rollup.read.getGSE()
|
|
147
330
|
])).map(EthAddress.fromString);
|
|
148
331
|
return {
|
|
149
332
|
rollupAddress: EthAddress.fromString(this.address),
|
|
@@ -152,20 +335,28 @@ export class RollupContract {
|
|
|
152
335
|
feeJuicePortalAddress,
|
|
153
336
|
feeJuiceAddress,
|
|
154
337
|
stakingAssetAddress,
|
|
155
|
-
rewardDistributorAddress
|
|
338
|
+
rewardDistributorAddress,
|
|
339
|
+
gseAddress
|
|
156
340
|
};
|
|
157
341
|
}
|
|
342
|
+
async getFeeJuicePortal() {
|
|
343
|
+
return EthAddress.fromString(await this.rollup.read.getFeeAssetPortal());
|
|
344
|
+
}
|
|
158
345
|
async getEpochNumberForSlotNumber(slotNumber) {
|
|
159
|
-
return await this.rollup.read.getEpochAtSlot([
|
|
160
|
-
slotNumber
|
|
161
|
-
]);
|
|
346
|
+
return EpochNumber.fromBigInt(await this.rollup.read.getEpochAtSlot([
|
|
347
|
+
BigInt(slotNumber)
|
|
348
|
+
]));
|
|
162
349
|
}
|
|
163
350
|
getEpochProofPublicInputs(args) {
|
|
164
351
|
return this.rollup.read.getEpochProofPublicInputs(args);
|
|
165
352
|
}
|
|
166
353
|
async validateHeader(args, account) {
|
|
167
354
|
try {
|
|
168
|
-
await this.
|
|
355
|
+
await this.client.simulateContract({
|
|
356
|
+
address: this.address,
|
|
357
|
+
abi: RollupAbi,
|
|
358
|
+
functionName: 'validateHeaderWithAttestations',
|
|
359
|
+
args,
|
|
169
360
|
account
|
|
170
361
|
});
|
|
171
362
|
} catch (error) {
|
|
@@ -178,39 +369,262 @@ export class RollupContract {
|
|
|
178
369
|
* @dev Throws if unable to propose
|
|
179
370
|
*
|
|
180
371
|
* @param archive - The archive that we expect to be current state
|
|
181
|
-
* @return [slot,
|
|
372
|
+
* @return [slot, checkpointNumber, timeOfNextL1Slot] - If you can propose, the L2 slot number, checkpoint number and
|
|
373
|
+
* timestamp of the next L1 block
|
|
182
374
|
* @throws otherwise
|
|
183
|
-
*/ async canProposeAtNextEthBlock(archive, account, slotDuration) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
const timeOfNextL1Slot = (await this.client.getBlock()).timestamp + slotDuration;
|
|
375
|
+
*/ async canProposeAtNextEthBlock(archive, account, slotDuration, opts = {}) {
|
|
376
|
+
const latestBlock = await this.client.getBlock();
|
|
377
|
+
const timeOfNextL1Slot = latestBlock.timestamp + BigInt(slotDuration);
|
|
378
|
+
const who = typeof account === 'string' ? account : account.address;
|
|
188
379
|
try {
|
|
189
|
-
const [slot,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
380
|
+
const { result: [slot, checkpointNumber] } = await this.client.simulateContract({
|
|
381
|
+
address: this.address,
|
|
382
|
+
abi: RollupAbi,
|
|
383
|
+
functionName: 'canProposeAtTime',
|
|
384
|
+
args: [
|
|
385
|
+
timeOfNextL1Slot,
|
|
386
|
+
`0x${archive.toString('hex')}`,
|
|
387
|
+
who
|
|
388
|
+
],
|
|
389
|
+
account,
|
|
390
|
+
stateOverride: await this.makePendingCheckpointNumberOverride(opts.forcePendingCheckpointNumber)
|
|
194
391
|
});
|
|
195
|
-
return
|
|
196
|
-
slot,
|
|
197
|
-
|
|
198
|
-
|
|
392
|
+
return {
|
|
393
|
+
slot: SlotNumber.fromBigInt(slot),
|
|
394
|
+
checkpointNumber,
|
|
395
|
+
timeOfNextL1Slot
|
|
396
|
+
};
|
|
199
397
|
} catch (err) {
|
|
200
398
|
throw formatViemError(err);
|
|
201
399
|
}
|
|
202
400
|
}
|
|
203
|
-
/**
|
|
401
|
+
/**
|
|
402
|
+
* Returns a state override that sets the pending checkpoint number to the specified value. Useful for simulations.
|
|
403
|
+
* Requires querying the current state of the contract to get the current proven checkpoint number, as they are both
|
|
404
|
+
* stored in the same slot. If the argument is undefined, it returns an empty override.
|
|
405
|
+
*/ async makePendingCheckpointNumberOverride(forcePendingCheckpointNumber) {
|
|
406
|
+
if (forcePendingCheckpointNumber === undefined) {
|
|
407
|
+
return [];
|
|
408
|
+
}
|
|
409
|
+
const slot = RollupContract.stfStorageSlot;
|
|
410
|
+
const currentValue = await this.client.getStorageAt({
|
|
411
|
+
address: this.address,
|
|
412
|
+
slot
|
|
413
|
+
});
|
|
414
|
+
const currentProvenCheckpointNumber = currentValue ? hexToBigInt(currentValue) & (1n << 128n) - 1n : 0n;
|
|
415
|
+
const newValue = BigInt(forcePendingCheckpointNumber) << 128n | currentProvenCheckpointNumber;
|
|
416
|
+
return [
|
|
417
|
+
{
|
|
418
|
+
address: this.address,
|
|
419
|
+
stateDiff: [
|
|
420
|
+
{
|
|
421
|
+
slot,
|
|
422
|
+
value: `0x${newValue.toString(16).padStart(64, '0')}`
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
];
|
|
427
|
+
}
|
|
428
|
+
/** Creates a request to Rollup#invalidateBadAttestation to be simulated or sent */ buildInvalidateBadAttestationRequest(checkpointNumber, attestationsAndSigners, committee, invalidIndex) {
|
|
429
|
+
return {
|
|
430
|
+
to: this.address,
|
|
431
|
+
data: encodeFunctionData({
|
|
432
|
+
abi: RollupAbi,
|
|
433
|
+
functionName: 'invalidateBadAttestation',
|
|
434
|
+
args: [
|
|
435
|
+
BigInt(checkpointNumber),
|
|
436
|
+
attestationsAndSigners,
|
|
437
|
+
committee.map((addr)=>addr.toString()),
|
|
438
|
+
BigInt(invalidIndex)
|
|
439
|
+
]
|
|
440
|
+
})
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
/** Creates a request to Rollup#invalidateInsufficientAttestations to be simulated or sent */ buildInvalidateInsufficientAttestationsRequest(checkpointNumber, attestationsAndSigners, committee) {
|
|
444
|
+
return {
|
|
445
|
+
to: this.address,
|
|
446
|
+
data: encodeFunctionData({
|
|
447
|
+
abi: RollupAbi,
|
|
448
|
+
functionName: 'invalidateInsufficientAttestations',
|
|
449
|
+
args: [
|
|
450
|
+
BigInt(checkpointNumber),
|
|
451
|
+
attestationsAndSigners,
|
|
452
|
+
committee.map((addr)=>addr.toString())
|
|
453
|
+
]
|
|
454
|
+
})
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
/** Calls getHasSubmitted directly. Returns whether the given prover has submitted a proof with the given length for the given epoch. */ getHasSubmittedProof(epochNumber, numberOfCheckpointsInEpoch, prover) {
|
|
458
|
+
if (prover instanceof EthAddress) {
|
|
459
|
+
prover = prover.toString();
|
|
460
|
+
}
|
|
204
461
|
return this.rollup.read.getHasSubmitted([
|
|
205
462
|
BigInt(epochNumber),
|
|
206
|
-
BigInt(
|
|
207
|
-
prover
|
|
463
|
+
BigInt(numberOfCheckpointsInEpoch),
|
|
464
|
+
prover
|
|
465
|
+
]);
|
|
466
|
+
}
|
|
467
|
+
getManaBaseFeeAt(timestamp, inFeeAsset) {
|
|
468
|
+
return this.rollup.read.getManaBaseFeeAt([
|
|
469
|
+
timestamp,
|
|
470
|
+
inFeeAsset
|
|
208
471
|
]);
|
|
209
472
|
}
|
|
473
|
+
async getSlotAt(timestamp) {
|
|
474
|
+
return SlotNumber.fromBigInt(await this.rollup.read.getSlotAt([
|
|
475
|
+
timestamp
|
|
476
|
+
]));
|
|
477
|
+
}
|
|
478
|
+
async status(checkpointNumber, options) {
|
|
479
|
+
await checkBlockTag(options?.blockNumber, this.client);
|
|
480
|
+
return this.rollup.read.status([
|
|
481
|
+
checkpointNumber
|
|
482
|
+
], options);
|
|
483
|
+
}
|
|
484
|
+
async canPruneAtTime(timestamp, options) {
|
|
485
|
+
await checkBlockTag(options?.blockNumber, this.client);
|
|
486
|
+
return this.rollup.read.canPruneAtTime([
|
|
487
|
+
timestamp
|
|
488
|
+
], options);
|
|
489
|
+
}
|
|
490
|
+
archive() {
|
|
491
|
+
return this.rollup.read.archive();
|
|
492
|
+
}
|
|
493
|
+
archiveAt(checkpointNumber) {
|
|
494
|
+
return this.rollup.read.archiveAt([
|
|
495
|
+
checkpointNumber
|
|
496
|
+
]);
|
|
497
|
+
}
|
|
498
|
+
getSequencerRewards(address) {
|
|
499
|
+
if (address instanceof EthAddress) {
|
|
500
|
+
address = address.toString();
|
|
501
|
+
}
|
|
502
|
+
return this.rollup.read.getSequencerRewards([
|
|
503
|
+
address
|
|
504
|
+
]);
|
|
505
|
+
}
|
|
506
|
+
getSpecificProverRewardsForEpoch(epoch, prover) {
|
|
507
|
+
if (prover instanceof EthAddress) {
|
|
508
|
+
prover = prover.toString();
|
|
509
|
+
}
|
|
510
|
+
return this.rollup.read.getSpecificProverRewardsForEpoch([
|
|
511
|
+
epoch,
|
|
512
|
+
prover
|
|
513
|
+
]);
|
|
514
|
+
}
|
|
515
|
+
async getAttesters() {
|
|
516
|
+
const attesterSize = await this.getActiveAttesterCount();
|
|
517
|
+
const gse = new GSEContract(this.client, await this.getGSE());
|
|
518
|
+
const ts = (await this.client.getBlock()).timestamp;
|
|
519
|
+
const indices = Array.from({
|
|
520
|
+
length: Number(attesterSize)
|
|
521
|
+
}, (_, i)=>BigInt(i));
|
|
522
|
+
const chunks = chunk(indices, 1000);
|
|
523
|
+
return (await Promise.all(chunks.map((chunk)=>gse.getAttestersFromIndicesAtTime(this.address, ts, chunk)))).flat();
|
|
524
|
+
}
|
|
525
|
+
getAttesterView(address) {
|
|
526
|
+
if (address instanceof EthAddress) {
|
|
527
|
+
address = address.toString();
|
|
528
|
+
}
|
|
529
|
+
return this.rollup.read.getAttesterView([
|
|
530
|
+
address
|
|
531
|
+
]);
|
|
532
|
+
}
|
|
533
|
+
getStatus(address) {
|
|
534
|
+
if (address instanceof EthAddress) {
|
|
535
|
+
address = address.toString();
|
|
536
|
+
}
|
|
537
|
+
return this.rollup.read.getStatus([
|
|
538
|
+
address
|
|
539
|
+
]);
|
|
540
|
+
}
|
|
541
|
+
getBlobCommitmentsHash(checkpointNumber) {
|
|
542
|
+
return this.rollup.read.getBlobCommitmentsHash([
|
|
543
|
+
checkpointNumber
|
|
544
|
+
]);
|
|
545
|
+
}
|
|
546
|
+
getCurrentBlobCommitmentsHash() {
|
|
547
|
+
return this.rollup.read.getCurrentBlobCommitmentsHash();
|
|
548
|
+
}
|
|
549
|
+
getStakingAsset() {
|
|
550
|
+
return this.rollup.read.getStakingAsset();
|
|
551
|
+
}
|
|
552
|
+
getRewardConfig() {
|
|
553
|
+
return this.rollup.read.getRewardConfig();
|
|
554
|
+
}
|
|
555
|
+
setupEpoch(l1TxUtils) {
|
|
556
|
+
return l1TxUtils.sendAndMonitorTransaction({
|
|
557
|
+
to: this.address,
|
|
558
|
+
data: encodeFunctionData({
|
|
559
|
+
abi: RollupAbi,
|
|
560
|
+
functionName: 'setupEpoch',
|
|
561
|
+
args: []
|
|
562
|
+
})
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
vote(l1TxUtils, proposalId) {
|
|
566
|
+
return l1TxUtils.sendAndMonitorTransaction({
|
|
567
|
+
to: this.address,
|
|
568
|
+
data: encodeFunctionData({
|
|
569
|
+
abi: RollupAbi,
|
|
570
|
+
functionName: 'vote',
|
|
571
|
+
args: [
|
|
572
|
+
proposalId
|
|
573
|
+
]
|
|
574
|
+
})
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
listenToSlasherChanged(callback) {
|
|
578
|
+
return this.rollup.watchEvent.SlasherUpdated({}, {
|
|
579
|
+
onLogs: (logs)=>{
|
|
580
|
+
for (const log of logs){
|
|
581
|
+
const args = log.args;
|
|
582
|
+
if (args.oldSlasher && args.newSlasher) {
|
|
583
|
+
callback(args);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
listenToCheckpointInvalidated(callback) {
|
|
590
|
+
return this.rollup.watchEvent.CheckpointInvalidated({}, {
|
|
591
|
+
onLogs: (logs)=>{
|
|
592
|
+
for (const log of logs){
|
|
593
|
+
const args = log.args;
|
|
594
|
+
if (args.checkpointNumber !== undefined) {
|
|
595
|
+
callback({
|
|
596
|
+
checkpointNumber: args.checkpointNumber
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
async getSlashEvents(l1BlockHash) {
|
|
604
|
+
const events = await this.rollup.getEvents.Slashed({}, {
|
|
605
|
+
blockHash: l1BlockHash,
|
|
606
|
+
strict: true
|
|
607
|
+
});
|
|
608
|
+
return events.map((event)=>({
|
|
609
|
+
amount: event.args.amount,
|
|
610
|
+
attester: EthAddress.fromString(event.args.attester)
|
|
611
|
+
}));
|
|
612
|
+
}
|
|
613
|
+
listenToSlash(callback) {
|
|
614
|
+
return this.rollup.watchEvent.Slashed({}, {
|
|
615
|
+
strict: true,
|
|
616
|
+
onLogs: (logs)=>{
|
|
617
|
+
for (const log of logs){
|
|
618
|
+
const args = log.args;
|
|
619
|
+
callback({
|
|
620
|
+
amount: args.amount,
|
|
621
|
+
attester: EthAddress.fromString(args.attester)
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
}
|
|
210
627
|
}
|
|
211
|
-
_ts_decorate([
|
|
212
|
-
memoize
|
|
213
|
-
], RollupContract.prototype, "getSlashingProposer", null);
|
|
214
628
|
_ts_decorate([
|
|
215
629
|
memoize
|
|
216
630
|
], RollupContract.prototype, "getL1StartBlock", null);
|
|
@@ -219,7 +633,7 @@ _ts_decorate([
|
|
|
219
633
|
], RollupContract.prototype, "getL1GenesisTime", null);
|
|
220
634
|
_ts_decorate([
|
|
221
635
|
memoize
|
|
222
|
-
], RollupContract.prototype, "
|
|
636
|
+
], RollupContract.prototype, "getProofSubmissionEpochs", null);
|
|
223
637
|
_ts_decorate([
|
|
224
638
|
memoize
|
|
225
639
|
], RollupContract.prototype, "getEpochDuration", null);
|
|
@@ -231,4 +645,40 @@ _ts_decorate([
|
|
|
231
645
|
], RollupContract.prototype, "getTargetCommitteeSize", null);
|
|
232
646
|
_ts_decorate([
|
|
233
647
|
memoize
|
|
234
|
-
], RollupContract.prototype, "
|
|
648
|
+
], RollupContract.prototype, "getEjectionThreshold", null);
|
|
649
|
+
_ts_decorate([
|
|
650
|
+
memoize
|
|
651
|
+
], RollupContract.prototype, "getLocalEjectionThreshold", null);
|
|
652
|
+
_ts_decorate([
|
|
653
|
+
memoize
|
|
654
|
+
], RollupContract.prototype, "getLagInEpochsForValidatorSet", null);
|
|
655
|
+
_ts_decorate([
|
|
656
|
+
memoize
|
|
657
|
+
], RollupContract.prototype, "getLagInEpochsForRandao", null);
|
|
658
|
+
_ts_decorate([
|
|
659
|
+
memoize
|
|
660
|
+
], RollupContract.prototype, "getActivationThreshold", null);
|
|
661
|
+
_ts_decorate([
|
|
662
|
+
memoize
|
|
663
|
+
], RollupContract.prototype, "getExitDelay", null);
|
|
664
|
+
_ts_decorate([
|
|
665
|
+
memoize
|
|
666
|
+
], RollupContract.prototype, "getManaTarget", null);
|
|
667
|
+
_ts_decorate([
|
|
668
|
+
memoize
|
|
669
|
+
], RollupContract.prototype, "getProvingCostPerMana", null);
|
|
670
|
+
_ts_decorate([
|
|
671
|
+
memoize
|
|
672
|
+
], RollupContract.prototype, "getProvingCostPerManaInFeeAsset", null);
|
|
673
|
+
_ts_decorate([
|
|
674
|
+
memoize
|
|
675
|
+
], RollupContract.prototype, "getManaLimit", null);
|
|
676
|
+
_ts_decorate([
|
|
677
|
+
memoize
|
|
678
|
+
], RollupContract.prototype, "getVersion", null);
|
|
679
|
+
_ts_decorate([
|
|
680
|
+
memoize
|
|
681
|
+
], RollupContract.prototype, "getGenesisArchiveTreeRoot", null);
|
|
682
|
+
_ts_decorate([
|
|
683
|
+
memoize
|
|
684
|
+
], RollupContract.prototype, "getRollupConstants", null);
|