@aztec/ethereum 0.0.0-test.1 → 0.0.1-commit.017a351
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 +28 -4
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +73 -3
- package/dest/config.d.ts +70 -23
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +151 -34
- package/dest/constants.d.ts +1 -1
- package/dest/contracts/chain_state_override.d.ts +78 -0
- package/dest/contracts/chain_state_override.d.ts.map +1 -0
- package/dest/contracts/chain_state_override.js +137 -0
- package/dest/contracts/empire_base.d.ts +25 -8
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/empire_base.js +75 -2
- 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 +20 -0
- package/dest/contracts/fee_asset_handler.d.ts.map +1 -0
- package/dest/contracts/fee_asset_handler.js +59 -0
- package/dest/contracts/fee_asset_price_oracle.d.ts +105 -0
- package/dest/contracts/fee_asset_price_oracle.d.ts.map +1 -0
- package/dest/contracts/fee_asset_price_oracle.js +656 -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 +131 -43
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +281 -87
- package/dest/contracts/governance_proposer.d.ts +49 -13
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +483 -26
- 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 +47 -0
- package/dest/contracts/inbox.d.ts.map +1 -0
- package/dest/contracts/inbox.js +85 -0
- package/dest/contracts/index.d.ts +11 -2
- package/dest/contracts/index.d.ts.map +1 -1
- package/dest/contracts/index.js +10 -1
- package/dest/contracts/log.d.ts +13 -0
- package/dest/contracts/log.d.ts.map +1 -0
- package/dest/contracts/log.js +1 -0
- package/dest/contracts/multicall.d.ts +136 -0
- package/dest/contracts/multicall.d.ts.map +1 -0
- package/dest/contracts/multicall.js +264 -0
- package/dest/contracts/outbox.d.ts +64 -0
- package/dest/contracts/outbox.d.ts.map +1 -0
- package/dest/contracts/outbox.js +113 -0
- package/dest/contracts/registry.d.ts +12 -5
- package/dest/contracts/registry.d.ts.map +1 -1
- package/dest/contracts/registry.js +74 -17
- package/dest/contracts/rollup.d.ts +5526 -52
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +1446 -118
- 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/slashing_proposer.d.ts +133 -15
- package/dest/contracts/slashing_proposer.d.ts.map +1 -1
- package/dest/contracts/slashing_proposer.js +293 -22
- 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_aztec_l1_contracts.d.ts +256 -0
- package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -0
- package/dest/deploy_aztec_l1_contracts.js +411 -0
- package/dest/deploy_l1_contract.d.ts +68 -0
- package/dest/deploy_l1_contract.d.ts.map +1 -0
- package/dest/deploy_l1_contract.js +312 -0
- 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/forwarder_proxy.d.ts +32 -0
- package/dest/forwarder_proxy.d.ts.map +1 -0
- package/dest/forwarder_proxy.js +93 -0
- package/dest/generated/l1-contracts-defaults.d.ts +30 -0
- package/dest/generated/l1-contracts-defaults.d.ts.map +1 -0
- package/dest/generated/l1-contracts-defaults.js +30 -0
- package/dest/l1_artifacts.d.ts +79270 -0
- package/dest/l1_artifacts.d.ts.map +1 -0
- package/dest/l1_artifacts.js +151 -0
- package/dest/l1_contract_addresses.d.ts +61 -45
- package/dest/l1_contract_addresses.d.ts.map +1 -1
- package/dest/l1_contract_addresses.js +99 -76
- package/dest/l1_reader.d.ts +8 -6
- package/dest/l1_reader.d.ts.map +1 -1
- package/dest/l1_reader.js +20 -12
- package/dest/l1_tx_utils/config.d.ts +65 -0
- package/dest/l1_tx_utils/config.d.ts.map +1 -0
- package/dest/l1_tx_utils/config.js +109 -0
- package/dest/l1_tx_utils/constants.d.ts +12 -0
- package/dest/l1_tx_utils/constants.d.ts.map +1 -0
- package/dest/l1_tx_utils/constants.js +39 -0
- package/dest/l1_tx_utils/factory.d.ts +32 -0
- package/dest/l1_tx_utils/factory.d.ts.map +1 -0
- package/dest/l1_tx_utils/factory.js +22 -0
- package/dest/l1_tx_utils/fee-strategies/index.d.ts +10 -0
- package/dest/l1_tx_utils/fee-strategies/index.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/index.js +12 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive.d.ts +8 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive.js +129 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.d.ts +23 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.js +191 -0
- package/dest/l1_tx_utils/fee-strategies/types.d.ts +51 -0
- package/dest/l1_tx_utils/fee-strategies/types.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/types.js +3 -0
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts +41 -0
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.js +42 -0
- package/dest/l1_tx_utils/index-blobs.d.ts +3 -0
- package/dest/l1_tx_utils/index-blobs.d.ts.map +1 -0
- package/dest/l1_tx_utils/index-blobs.js +2 -0
- package/dest/l1_tx_utils/index.d.ts +13 -0
- package/dest/l1_tx_utils/index.d.ts.map +1 -0
- package/dest/l1_tx_utils/index.js +13 -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_fee_analyzer.d.ts +233 -0
- package/dest/l1_tx_utils/l1_fee_analyzer.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_fee_analyzer.js +506 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +113 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_tx_utils.js +658 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +83 -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 +328 -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/tx_delayer.d.ts +58 -0
- package/dest/l1_tx_utils/tx_delayer.d.ts.map +1 -0
- package/dest/l1_tx_utils/tx_delayer.js +223 -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 +30 -0
- package/dest/publisher_manager.d.ts.map +1 -0
- package/dest/publisher_manager.js +162 -0
- package/dest/queries.d.ts +17 -4
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +120 -12
- package/dest/test/chain_monitor.d.ts +95 -0
- package/dest/test/chain_monitor.d.ts.map +1 -0
- package/dest/test/chain_monitor.js +249 -0
- package/dest/test/eth_cheat_codes.d.ts +237 -0
- package/dest/test/eth_cheat_codes.d.ts.map +1 -0
- package/dest/test/eth_cheat_codes.js +573 -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 -3
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +3 -2
- package/dest/test/rollup_cheat_codes.d.ts +118 -0
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -0
- package/dest/test/rollup_cheat_codes.js +344 -0
- package/dest/test/start_anvil.d.ts +30 -2
- package/dest/test/start_anvil.d.ts.map +1 -1
- package/dest/test/start_anvil.js +147 -24
- 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 +62 -8
- package/dest/types.d.ts.map +1 -1
- package/dest/types.js +3 -1
- package/dest/utils.d.ts +25 -4
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +142 -91
- package/dest/zkPassportVerifierAddress.d.ts +15 -0
- package/dest/zkPassportVerifierAddress.d.ts.map +1 -0
- package/dest/zkPassportVerifierAddress.js +11 -0
- package/package.json +52 -26
- package/src/account.ts +5 -0
- package/src/client.ts +107 -5
- package/src/config.ts +218 -43
- package/src/contracts/README.md +157 -0
- package/src/contracts/chain_state_override.ts +200 -0
- package/src/contracts/empire_base.ts +77 -7
- package/src/contracts/errors.ts +13 -0
- package/src/contracts/fee_asset_handler.ts +66 -0
- package/src/contracts/fee_asset_price_oracle.ts +285 -0
- package/src/contracts/fee_juice.ts +29 -15
- package/src/contracts/governance.ts +343 -74
- package/src/contracts/governance_proposer.ts +128 -25
- package/src/contracts/gse.ts +88 -0
- package/src/contracts/inbox.ts +123 -0
- package/src/contracts/index.ts +10 -1
- package/src/contracts/log.ts +13 -0
- package/src/contracts/multicall.ts +296 -0
- package/src/contracts/outbox.ts +132 -0
- package/src/contracts/registry.ts +81 -26
- package/src/contracts/rollup.ts +1246 -90
- package/src/contracts/slasher_contract.ts +89 -0
- package/src/contracts/slashing_proposer.ts +296 -27
- package/src/contracts/utils.ts +14 -0
- package/src/deploy_aztec_l1_contracts.ts +646 -0
- package/src/deploy_l1_contract.ts +362 -0
- package/src/eth-signer/eth-signer.ts +25 -0
- package/src/eth-signer/index.ts +1 -0
- package/src/forwarder_proxy.ts +108 -0
- package/src/generated/l1-contracts-defaults.ts +32 -0
- package/src/l1_artifacts.ts +231 -0
- package/src/l1_contract_addresses.ts +121 -80
- package/src/l1_reader.ts +31 -16
- package/src/l1_tx_utils/README.md +177 -0
- package/src/l1_tx_utils/config.ts +181 -0
- package/src/l1_tx_utils/constants.ts +29 -0
- package/src/l1_tx_utils/factory.ts +64 -0
- package/src/l1_tx_utils/fee-strategies/index.ts +22 -0
- package/src/l1_tx_utils/fee-strategies/p75_competitive.ts +163 -0
- package/src/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.ts +245 -0
- package/src/l1_tx_utils/fee-strategies/types.ts +56 -0
- package/src/l1_tx_utils/forwarder_l1_tx_utils.ts +108 -0
- package/src/l1_tx_utils/index-blobs.ts +2 -0
- package/src/l1_tx_utils/index.ts +15 -0
- package/src/l1_tx_utils/interfaces.ts +86 -0
- package/src/l1_tx_utils/l1_fee_analyzer.ts +803 -0
- package/src/l1_tx_utils/l1_tx_utils.ts +789 -0
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +424 -0
- package/src/l1_tx_utils/signer.ts +28 -0
- package/src/l1_tx_utils/tx_delayer.ts +303 -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 +203 -0
- package/src/queries.ts +149 -17
- package/src/test/chain_monitor.ts +307 -0
- package/src/test/eth_cheat_codes.ts +600 -0
- package/src/test/eth_cheat_codes_with_state.ts +1 -1
- package/src/test/index.ts +3 -2
- package/src/test/rollup_cheat_codes.ts +388 -0
- package/src/test/start_anvil.ts +189 -22
- package/src/test/upgrade_utils.ts +30 -21
- package/src/types.ts +71 -7
- package/src/utils.ts +164 -96
- 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/deploy_l1_contracts.d.ts +0 -21210
- package/dest/deploy_l1_contracts.d.ts.map +0 -1
- package/dest/deploy_l1_contracts.js +0 -687
- 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/index.d.ts +0 -14
- package/dest/index.d.ts.map +0 -1
- package/dest/index.js +0 -13
- 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/dest/test/delayed_tx_utils.d.ts +0 -8
- package/dest/test/delayed_tx_utils.d.ts.map +0 -1
- package/dest/test/delayed_tx_utils.js +0 -21
- package/dest/test/tx_delayer.d.ts +0 -25
- package/dest/test/tx_delayer.d.ts.map +0 -1
- package/dest/test/tx_delayer.js +0 -116
- package/src/contracts/forwarder.ts +0 -132
- package/src/deploy_l1_contracts.ts +0 -948
- package/src/eth_cheat_codes.ts +0 -314
- package/src/index.ts +0 -13
- package/src/l1_tx_utils.ts +0 -847
- package/src/l1_tx_utils_with_blobs.ts +0 -86
- package/src/test/delayed_tx_utils.ts +0 -24
- package/src/test/tx_delayer.ts +0 -163
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
2
|
import { sleep } from '@aztec/foundation/sleep';
|
|
3
|
-
import { GovernanceAbi } from '@aztec/l1-artifacts';
|
|
4
|
-
import { encodeFunctionData, getContract } from 'viem';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { GovernanceAbi } from '@aztec/l1-artifacts/GovernanceAbi';
|
|
4
|
+
import { encodeFunctionData, getContract, parseEventLogs } from 'viem';
|
|
5
|
+
import { createL1TxUtils } from '../l1_tx_utils/index.js';
|
|
6
|
+
import { isExtendedClient } from '../types.js';
|
|
7
|
+
// Minimal ABI for IProposerPayload (`l1-contracts/src/governance/interfaces/IProposerPayload.sol`).
|
|
8
|
+
// The GovernanceProposer wraps every original payload in a GSEPayload before submitting it to
|
|
9
|
+
// Governance, so `Proposal.payload` on the Governance contract is the wrapper address rather than
|
|
10
|
+
// the original. We only need `getOriginalPayload` to recover the underlying payload, so we inline
|
|
11
|
+
// the ABI here instead of generating a full artifact.
|
|
12
|
+
const ProposerPayloadAbi = [
|
|
13
|
+
{
|
|
14
|
+
type: 'function',
|
|
15
|
+
name: 'getOriginalPayload',
|
|
16
|
+
inputs: [],
|
|
17
|
+
outputs: [
|
|
18
|
+
{
|
|
19
|
+
type: 'address'
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
stateMutability: 'view'
|
|
23
|
+
}
|
|
24
|
+
];
|
|
7
25
|
// NOTE: Must be kept in sync with DataStructures.ProposalState in l1-contracts
|
|
8
26
|
export var ProposalState = /*#__PURE__*/ function(ProposalState) {
|
|
9
27
|
ProposalState[ProposalState["Pending"] = 0] = "Pending";
|
|
@@ -16,89 +34,214 @@ export var ProposalState = /*#__PURE__*/ function(ProposalState) {
|
|
|
16
34
|
ProposalState[ProposalState["Expired"] = 7] = "Expired";
|
|
17
35
|
return ProposalState;
|
|
18
36
|
}({});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
37
|
+
/** Set of `ProposalState` values for which a proposal is fully immutable on-chain. */ const TERMINAL_PROPOSAL_STATES = new Set([
|
|
38
|
+
5,
|
|
39
|
+
4,
|
|
40
|
+
6,
|
|
41
|
+
7
|
|
42
|
+
]);
|
|
43
|
+
// Hard upper bound on the wall-clock lifetime of any Governance proposal, in seconds.
|
|
44
|
+
// Each proposal stores its own snapshot of `ProposalConfiguration` at creation time and progresses
|
|
45
|
+
// through Pending -> Active -> Queued -> Executable using those frozen durations
|
|
46
|
+
// (see `ProposalLib.{pendingThrough,activeThrough,queuedThrough,executableThrough}`). Each of those
|
|
47
|
+
// four durations is bounded by `ConfigurationLib.TIME_UPPER = 90 days` (validated in
|
|
48
|
+
// `ConfigurationLib.assertValid`), so no proposal can be live for more than 4 * 90 days regardless
|
|
49
|
+
// of what config it was created under. Once past this point, the proposal is guaranteed to be in a
|
|
50
|
+
// terminal state (Executed / Rejected / Dropped / Expired).
|
|
51
|
+
export const MAX_PROPOSAL_LIFETIME_SECONDS = 4n * 90n * 24n * 3600n;
|
|
52
|
+
/**
|
|
53
|
+
* Validates a number returned by an on-chain `ProposalState` enum field and narrows it to the
|
|
54
|
+
* `ProposalState` enum. Throws if the value is out of range.
|
|
55
|
+
*/ function asProposalState(raw) {
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
57
|
+
if (raw < 0 || raw > 7) {
|
|
58
|
+
throw new Error(`Invalid proposal state: ${raw}`);
|
|
59
|
+
}
|
|
60
|
+
return raw;
|
|
61
|
+
}
|
|
62
|
+
export function extractProposalIdFromLogs(logs) {
|
|
63
|
+
const parsedLogs = parseEventLogs({
|
|
64
|
+
abi: GovernanceAbi,
|
|
65
|
+
logs: logs,
|
|
66
|
+
eventName: 'Proposed'
|
|
67
|
+
});
|
|
68
|
+
if (parsedLogs.length === 0) {
|
|
69
|
+
throw new Error('Proposal log not found');
|
|
70
|
+
}
|
|
71
|
+
return parsedLogs[0].args.proposalId;
|
|
72
|
+
}
|
|
73
|
+
export class ReadOnlyGovernanceContract {
|
|
74
|
+
client;
|
|
75
|
+
governanceContract;
|
|
76
|
+
/**
|
|
77
|
+
* Cache of fully-resolved proposals keyed by id. We populate this lazily and only retain entries
|
|
78
|
+
* whose state is provably terminal -- once `cachedState` is `Executed` or `Dropped` the on-chain
|
|
79
|
+
* proposal struct is frozen and safe to memoize indefinitely. Other state transitions (e.g.
|
|
80
|
+
* Pending -> Active, or accumulating votes) leave the cache untouched and force a fresh fetch.
|
|
81
|
+
*/ proposalCache;
|
|
82
|
+
/**
|
|
83
|
+
* Cache of `IProposerPayload.getOriginalPayload()` results keyed by wrapper address. The wrapper
|
|
84
|
+
* contract's bytecode is immutable, so this mapping never changes -- a value of `undefined`
|
|
85
|
+
* encodes a proposal whose payload doesn't implement `getOriginalPayload` (e.g. proposeWithLock
|
|
86
|
+
* proposals) and should be treated as "no original".
|
|
87
|
+
*/ originalPayloadCache;
|
|
88
|
+
constructor(address, client){
|
|
89
|
+
this.client = client;
|
|
90
|
+
this.proposalCache = new Map();
|
|
91
|
+
this.originalPayloadCache = new Map();
|
|
92
|
+
this.governanceContract = getContract({
|
|
28
93
|
address,
|
|
29
94
|
abi: GovernanceAbi,
|
|
30
|
-
client:
|
|
95
|
+
client: client
|
|
31
96
|
});
|
|
32
|
-
this.walletGovernance = walletClient ? getContract({
|
|
33
|
-
address,
|
|
34
|
-
abi: GovernanceAbi,
|
|
35
|
-
client: walletClient
|
|
36
|
-
}) : undefined;
|
|
37
97
|
}
|
|
38
98
|
get address() {
|
|
39
|
-
return EthAddress.fromString(this.
|
|
99
|
+
return EthAddress.fromString(this.governanceContract.address);
|
|
40
100
|
}
|
|
41
|
-
async
|
|
42
|
-
|
|
43
|
-
return new GovernanceProposerContract(this.publicClient, governanceProposerAddress.toString());
|
|
101
|
+
async getGovernanceProposerAddress() {
|
|
102
|
+
return EthAddress.fromString(await this.governanceContract.read.governanceProposer());
|
|
44
103
|
}
|
|
45
|
-
async
|
|
46
|
-
const
|
|
47
|
-
const [rollupAddress, registryAddress] = await Promise.all([
|
|
48
|
-
governanceProposer.getRollupAddress(),
|
|
49
|
-
governanceProposer.getRegistryAddress()
|
|
50
|
-
]);
|
|
104
|
+
async getConfiguration() {
|
|
105
|
+
const raw = await this.governanceContract.read.getConfiguration();
|
|
51
106
|
return {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
107
|
+
proposeConfig: {
|
|
108
|
+
lockDelay: raw.proposeConfig.lockDelay,
|
|
109
|
+
lockAmount: raw.proposeConfig.lockAmount
|
|
110
|
+
},
|
|
111
|
+
votingDelay: raw.votingDelay,
|
|
112
|
+
votingDuration: raw.votingDuration,
|
|
113
|
+
executionDelay: raw.executionDelay,
|
|
114
|
+
gracePeriod: raw.gracePeriod,
|
|
115
|
+
quorum: raw.quorum,
|
|
116
|
+
requiredYeaMargin: raw.requiredYeaMargin,
|
|
117
|
+
minimumVotes: raw.minimumVotes
|
|
56
118
|
};
|
|
57
119
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
120
|
+
/**
|
|
121
|
+
* Fetches a proposal by id together with its live state, returning the mapped {@link Proposal}
|
|
122
|
+
* type. Issues `getProposal` and `getProposalState` in parallel so the result carries both the
|
|
123
|
+
* raw stored `cachedState` and the time-derived `state` -- callers can use whichever they need
|
|
124
|
+
* without an extra round-trip.
|
|
125
|
+
*
|
|
126
|
+
* Backed by an in-memory cache that retains entries only when `state` is in one of the four
|
|
127
|
+
* terminal phases (`Executed` / `Rejected` / `Dropped` / `Expired`). At that point the entire
|
|
128
|
+
* proposal struct is provably immutable on-chain (no further votes can be cast and no
|
|
129
|
+
* state-mutating call can succeed), so caching is safe forever. Non-terminal states force a
|
|
130
|
+
* fresh fetch on every call so callers always see fresh `state` and `summedBallot` values.
|
|
131
|
+
*/ async getProposal(proposalId) {
|
|
132
|
+
const cached = this.proposalCache.get(proposalId);
|
|
133
|
+
if (cached !== undefined) {
|
|
134
|
+
return cached;
|
|
135
|
+
}
|
|
136
|
+
const [raw, rawState] = await Promise.all([
|
|
137
|
+
this.governanceContract.read.getProposal([
|
|
138
|
+
proposalId
|
|
139
|
+
]),
|
|
140
|
+
this.governanceContract.read.getProposalState([
|
|
141
|
+
proposalId
|
|
142
|
+
])
|
|
61
143
|
]);
|
|
144
|
+
const proposal = {
|
|
145
|
+
config: {
|
|
146
|
+
votingDelay: raw.config.votingDelay,
|
|
147
|
+
votingDuration: raw.config.votingDuration,
|
|
148
|
+
executionDelay: raw.config.executionDelay,
|
|
149
|
+
gracePeriod: raw.config.gracePeriod,
|
|
150
|
+
quorum: raw.config.quorum,
|
|
151
|
+
requiredYeaMargin: raw.config.requiredYeaMargin,
|
|
152
|
+
minimumVotes: raw.config.minimumVotes
|
|
153
|
+
},
|
|
154
|
+
cachedState: asProposalState(raw.cachedState),
|
|
155
|
+
state: asProposalState(rawState),
|
|
156
|
+
payload: EthAddress.fromString(raw.payload),
|
|
157
|
+
proposer: EthAddress.fromString(raw.proposer),
|
|
158
|
+
creation: raw.creation,
|
|
159
|
+
summedBallot: {
|
|
160
|
+
yea: raw.summedBallot.yea,
|
|
161
|
+
nay: raw.summedBallot.nay
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
if (TERMINAL_PROPOSAL_STATES.has(proposal.state)) {
|
|
165
|
+
this.proposalCache.set(proposalId, proposal);
|
|
166
|
+
}
|
|
167
|
+
return proposal;
|
|
62
168
|
}
|
|
63
|
-
|
|
64
|
-
|
|
169
|
+
/**
|
|
170
|
+
* Returns the live state of a proposal as computed by `Governance.getProposalState`. Prefer
|
|
171
|
+
* {@link getProposal} when you also need any other proposal data -- it returns this same value
|
|
172
|
+
* via {@link Proposal.state} alongside the rest of the struct in a single round-trip.
|
|
173
|
+
*/ async getProposalState(proposalId) {
|
|
174
|
+
return asProposalState(await this.governanceContract.read.getProposalState([
|
|
65
175
|
proposalId
|
|
66
|
-
]);
|
|
67
|
-
if (state < 0 || state > 7) {
|
|
68
|
-
throw new Error(`Invalid proposal state: ${state}`);
|
|
69
|
-
}
|
|
70
|
-
return state;
|
|
176
|
+
]));
|
|
71
177
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
throw new Error('Wallet client is required for this operation');
|
|
75
|
-
}
|
|
76
|
-
return this.walletGovernance;
|
|
178
|
+
getProposalCount() {
|
|
179
|
+
return this.governanceContract.read.proposalCount();
|
|
77
180
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
181
|
+
/**
|
|
182
|
+
* Checks whether the given original payload is currently the subject of a live (non-terminal)
|
|
183
|
+
* Governance proposal. Returns true only if a proposal references this payload and is still in
|
|
184
|
+
* Pending, Active, Queued, or Executable state. Terminal proposals (Executed, Rejected, Dropped,
|
|
185
|
+
* Expired) are ignored, because once a proposal reaches a terminal state the same original
|
|
186
|
+
* payload may legitimately be re-signaled and re-submitted via the GovernanceProposer (each round
|
|
187
|
+
* is independent and there is no payload-level uniqueness check on-chain).
|
|
188
|
+
*
|
|
189
|
+
* Implemented as a bounded view-call sweep over `Governance.proposals` rather than an event scan,
|
|
190
|
+
* because `eth_getLogs` over the full deployment history of a long-lived rollup exceeds typical
|
|
191
|
+
* RPC block-range caps. The number of proposals (`proposalCount`) is small in practice, and we
|
|
192
|
+
* walk newest -> oldest with a hard early-stop on the protocol-wide proposal lifetime cap.
|
|
193
|
+
*/ async hasActiveProposalWithPayload(payload) {
|
|
194
|
+
const proposalCount = await this.getProposalCount();
|
|
195
|
+
if (proposalCount === 0n) {
|
|
196
|
+
return false;
|
|
197
|
+
}
|
|
198
|
+
// Anything created before this cutoff is guaranteed terminal regardless of its frozen config.
|
|
199
|
+
const block = await this.client.getBlock();
|
|
200
|
+
const hardCutoff = block.timestamp - MAX_PROPOSAL_LIFETIME_SECONDS;
|
|
201
|
+
const target = payload.toLowerCase();
|
|
202
|
+
// Proposals are append-only with monotonically non-decreasing creation timestamps, so iterating
|
|
203
|
+
// from newest -> oldest lets us early-stop as soon as we cross the lifetime cutoff.
|
|
204
|
+
for(let id = proposalCount - 1n; id >= 0n; id--){
|
|
205
|
+
const proposal = await this.getProposal(id);
|
|
206
|
+
// Hard early-stop: every older proposal is also older than the cutoff and therefore terminal.
|
|
207
|
+
if (proposal.creation < hardCutoff) {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
const original = await this.getOriginalPayload(proposal.payload);
|
|
211
|
+
if (original === undefined || original.toLowerCase() !== target) {
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
// The wrapper unwraps to our payload. Only treat this as "already proposed" if the proposal
|
|
215
|
+
// is still live -- terminal states allow re-proposing the same payload in a later round.
|
|
216
|
+
if (TERMINAL_PROPOSAL_STATES.has(proposal.state)) {
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
return true;
|
|
220
|
+
}
|
|
221
|
+
return false;
|
|
87
222
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
223
|
+
/**
|
|
224
|
+
* Resolves the original payload behind a `GSEPayload` wrapper. Returns `undefined` if the
|
|
225
|
+
* wrapper does not implement `IProposerPayload.getOriginalPayload` (e.g. proposals created via
|
|
226
|
+
* `Governance.proposeWithLock`, which bypass GSEPayload entirely and store the raw `IPayload`
|
|
227
|
+
* directly). Results are memoized indefinitely because deployed wrapper bytecode is immutable.
|
|
228
|
+
*/ async getOriginalPayload(wrapper) {
|
|
229
|
+
const key = wrapper.toString();
|
|
230
|
+
if (this.originalPayloadCache.has(key)) {
|
|
231
|
+
return this.originalPayloadCache.get(key);
|
|
232
|
+
}
|
|
233
|
+
let original;
|
|
234
|
+
try {
|
|
235
|
+
original = await this.client.readContract({
|
|
236
|
+
address: key,
|
|
237
|
+
abi: ProposerPayloadAbi,
|
|
238
|
+
functionName: 'getOriginalPayload'
|
|
239
|
+
});
|
|
240
|
+
} catch {
|
|
241
|
+
original = undefined;
|
|
99
242
|
}
|
|
100
|
-
|
|
101
|
-
return
|
|
243
|
+
this.originalPayloadCache.set(key, original);
|
|
244
|
+
return original;
|
|
102
245
|
}
|
|
103
246
|
async awaitProposalActive({ proposalId, logger }) {
|
|
104
247
|
const state = await this.getProposalState(proposalId);
|
|
@@ -109,7 +252,7 @@ export class GovernanceContract {
|
|
|
109
252
|
} else {
|
|
110
253
|
const proposal = await this.getProposal(proposalId);
|
|
111
254
|
const startOfActive = proposal.creation + proposal.config.votingDelay;
|
|
112
|
-
const block = await this.
|
|
255
|
+
const block = await this.client.getBlock();
|
|
113
256
|
// Add 12 seconds to the time to make sure we don't vote too early
|
|
114
257
|
const secondsToActive = Number(startOfActive - block.timestamp) + 12;
|
|
115
258
|
const now = new Date();
|
|
@@ -135,7 +278,7 @@ export class GovernanceContract {
|
|
|
135
278
|
} else {
|
|
136
279
|
const proposal = await this.getProposal(proposalId);
|
|
137
280
|
const startOfExecutable = proposal.creation + proposal.config.votingDelay + proposal.config.votingDuration + proposal.config.executionDelay;
|
|
138
|
-
const block = await this.
|
|
281
|
+
const block = await this.client.getBlock();
|
|
139
282
|
const secondsToExecutable = Number(startOfExecutable - block.timestamp) + 12;
|
|
140
283
|
const now = new Date();
|
|
141
284
|
logger.info(`
|
|
@@ -146,19 +289,67 @@ export class GovernanceContract {
|
|
|
146
289
|
await sleep(secondsToExecutable * 1000);
|
|
147
290
|
}
|
|
148
291
|
}
|
|
292
|
+
}
|
|
293
|
+
export class GovernanceContract extends ReadOnlyGovernanceContract {
|
|
294
|
+
client;
|
|
295
|
+
governanceContract;
|
|
296
|
+
constructor(address, client){
|
|
297
|
+
if (address instanceof EthAddress) {
|
|
298
|
+
address = address.toString();
|
|
299
|
+
}
|
|
300
|
+
super(address, client), this.client = client;
|
|
301
|
+
if (!isExtendedClient(client)) {
|
|
302
|
+
throw new Error('GovernanceContract has to be instantiated with a wallet client.');
|
|
303
|
+
}
|
|
304
|
+
this.governanceContract = getContract({
|
|
305
|
+
address,
|
|
306
|
+
abi: GovernanceAbi,
|
|
307
|
+
client
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
async deposit(onBehalfOf, amount) {
|
|
311
|
+
const depositTx = await this.governanceContract.write.deposit([
|
|
312
|
+
onBehalfOf,
|
|
313
|
+
amount
|
|
314
|
+
]);
|
|
315
|
+
await this.client.waitForTransactionReceipt({
|
|
316
|
+
hash: depositTx
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
async proposeWithLock({ payloadAddress, withdrawAddress }) {
|
|
320
|
+
const proposeTx = await this.governanceContract.write.proposeWithLock([
|
|
321
|
+
payloadAddress,
|
|
322
|
+
withdrawAddress
|
|
323
|
+
]);
|
|
324
|
+
const receipt = await this.client.waitForTransactionReceipt({
|
|
325
|
+
hash: proposeTx
|
|
326
|
+
});
|
|
327
|
+
if (receipt.status !== 'success') {
|
|
328
|
+
throw new Error(`Proposal failed: ${receipt.status}`);
|
|
329
|
+
}
|
|
330
|
+
return extractProposalIdFromLogs(receipt.logs);
|
|
331
|
+
}
|
|
149
332
|
async getPower() {
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
this.walletClient.account.address,
|
|
333
|
+
const now = await this.client.getBlock();
|
|
334
|
+
return this.governanceContract.read.powerAt([
|
|
335
|
+
this.client.account.address,
|
|
154
336
|
now.timestamp
|
|
155
337
|
]);
|
|
156
338
|
}
|
|
339
|
+
/** Returns the user's voting power for a specific proposal, checked at pendingThrough timestamp. */ async getPowerForProposal(proposalId) {
|
|
340
|
+
const proposal = await this.getProposal(proposalId);
|
|
341
|
+
const pendingThrough = proposal.creation + proposal.config.votingDelay;
|
|
342
|
+
return this.governanceContract.read.powerAt([
|
|
343
|
+
this.client.account.address,
|
|
344
|
+
pendingThrough
|
|
345
|
+
]);
|
|
346
|
+
}
|
|
157
347
|
async vote({ proposalId, voteAmount, inFavor, retries = 10, logger }) {
|
|
158
|
-
const
|
|
159
|
-
|
|
348
|
+
const l1TxUtils = createL1TxUtils(this.client, {
|
|
349
|
+
logger
|
|
350
|
+
});
|
|
160
351
|
const retryDelaySeconds = 12;
|
|
161
|
-
voteAmount = voteAmount ?? await this.
|
|
352
|
+
voteAmount = voteAmount ?? await this.getPowerForProposal(proposalId);
|
|
162
353
|
let success = false;
|
|
163
354
|
for(let i = 0; i < retries; i++){
|
|
164
355
|
try {
|
|
@@ -173,7 +364,8 @@ export class GovernanceContract {
|
|
|
173
364
|
};
|
|
174
365
|
const encodedVoteData = encodeFunctionData(voteFunctionData);
|
|
175
366
|
const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
|
|
176
|
-
to:
|
|
367
|
+
to: this.governanceContract.address,
|
|
368
|
+
abi: GovernanceAbi,
|
|
177
369
|
data: encodedVoteData
|
|
178
370
|
});
|
|
179
371
|
if (receipt.status === 'success') {
|
|
@@ -182,7 +374,7 @@ export class GovernanceContract {
|
|
|
182
374
|
} else {
|
|
183
375
|
const args = {
|
|
184
376
|
...voteFunctionData,
|
|
185
|
-
address:
|
|
377
|
+
address: this.governanceContract.address
|
|
186
378
|
};
|
|
187
379
|
const errorMsg = await l1TxUtils.tryGetErrorFromRevertedTx(encodedVoteData, args, undefined, []);
|
|
188
380
|
logger.error(`Error voting on proposal ${proposalId}: ${errorMsg}`);
|
|
@@ -198,13 +390,14 @@ export class GovernanceContract {
|
|
|
198
390
|
}
|
|
199
391
|
logger.info(`Voted [${inFavor ? 'yea' : 'nay'}] on proposal [${proposalId}]`);
|
|
200
392
|
const proposal = await this.getProposal(proposalId);
|
|
201
|
-
logger.info(`Proposal [${proposalId}] has state [${proposal.
|
|
393
|
+
logger.info(`Proposal [${proposalId}] has cached state [${proposal.cachedState}]`);
|
|
202
394
|
logger.info(`Proposal [${proposalId}] has summedBallot yea [${proposal.summedBallot.yea}]`);
|
|
203
|
-
logger.info(`Proposal [${proposalId}] has summedBallot
|
|
395
|
+
logger.info(`Proposal [${proposalId}] has summedBallot nay [${proposal.summedBallot.nay}]`);
|
|
204
396
|
}
|
|
205
397
|
async executeProposal({ proposalId, retries = 10, logger }) {
|
|
206
|
-
const
|
|
207
|
-
|
|
398
|
+
const l1TxUtils = createL1TxUtils(this.client, {
|
|
399
|
+
logger
|
|
400
|
+
});
|
|
208
401
|
const retryDelaySeconds = 12;
|
|
209
402
|
let success = false;
|
|
210
403
|
for(let i = 0; i < retries; i++){
|
|
@@ -218,7 +411,8 @@ export class GovernanceContract {
|
|
|
218
411
|
};
|
|
219
412
|
const encodedExecuteData = encodeFunctionData(executeFunctionData);
|
|
220
413
|
const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
|
|
221
|
-
to:
|
|
414
|
+
to: this.governanceContract.address,
|
|
415
|
+
abi: GovernanceAbi,
|
|
222
416
|
data: encodedExecuteData
|
|
223
417
|
});
|
|
224
418
|
if (receipt.status === 'success') {
|
|
@@ -227,7 +421,7 @@ export class GovernanceContract {
|
|
|
227
421
|
} else {
|
|
228
422
|
const args = {
|
|
229
423
|
...executeFunctionData,
|
|
230
|
-
address:
|
|
424
|
+
address: this.governanceContract.address
|
|
231
425
|
};
|
|
232
426
|
const errorMsg = await l1TxUtils.tryGetErrorFromRevertedTx(encodedExecuteData, args, undefined, []);
|
|
233
427
|
logger.error(`Error executing proposal ${proposalId}: ${errorMsg}`);
|
|
@@ -1,28 +1,64 @@
|
|
|
1
|
+
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
1
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
-
import { type Hex, type TransactionReceipt } from 'viem';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import { type Hex, type TransactionReceipt, type TypedDataDefinition } from 'viem';
|
|
4
|
+
import type { L1TxRequest, L1TxUtils } from '../l1_tx_utils/index.js';
|
|
5
|
+
import type { ViemClient } from '../types.js';
|
|
5
6
|
import { type IEmpireBase } from './empire_base.js';
|
|
7
|
+
import { ReadOnlyGovernanceContract } from './governance.js';
|
|
6
8
|
export declare class GovernanceProposerContract implements IEmpireBase {
|
|
7
|
-
readonly client:
|
|
9
|
+
readonly client: ViemClient;
|
|
8
10
|
private readonly proposer;
|
|
9
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Cache of bytecode-existence checks keyed by payload address. The check is stable for a
|
|
13
|
+
* contract's lifetime -- a contract either has code or it does not, and code cannot be removed
|
|
14
|
+
* after deployment (selfdestruct aside, which is not relevant here). Safe to memoize
|
|
15
|
+
* indefinitely for the lifetime of this instance.
|
|
16
|
+
*/
|
|
17
|
+
private readonly emptyPayloadCache;
|
|
18
|
+
constructor(client: ViemClient, address: Hex | EthAddress);
|
|
10
19
|
get address(): EthAddress;
|
|
11
20
|
getRollupAddress(): Promise<EthAddress>;
|
|
12
21
|
getRegistryAddress(): Promise<EthAddress>;
|
|
13
22
|
getQuorumSize(): Promise<bigint>;
|
|
14
23
|
getRoundSize(): Promise<bigint>;
|
|
15
|
-
|
|
24
|
+
getInstance(): Promise<`0x${string}`>;
|
|
25
|
+
computeRound(slot: SlotNumber): Promise<bigint>;
|
|
16
26
|
getRoundInfo(rollupAddress: Hex, round: bigint): Promise<{
|
|
17
|
-
|
|
18
|
-
|
|
27
|
+
lastSignalSlot: SlotNumber;
|
|
28
|
+
payloadWithMostSignals: Hex;
|
|
29
|
+
quorumReached: boolean;
|
|
19
30
|
executed: boolean;
|
|
20
31
|
}>;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
32
|
+
getPayloadSignals(rollupAddress: Hex, round: bigint, payload: Hex): Promise<bigint>;
|
|
33
|
+
createSignalRequest(payload: Hex): L1TxRequest;
|
|
34
|
+
createSignalRequestWithSignature(payload: Hex, slot: SlotNumber, chainId: number, signerAddress: Hex, signer: (msg: TypedDataDefinition) => Promise<Hex>): Promise<L1TxRequest>;
|
|
35
|
+
/**
|
|
36
|
+
* Resolves the Governance contract this proposer submits winners to. Lazily reads
|
|
37
|
+
* `GovernanceProposer.getGovernance()` (which itself looks the address up via the registry) and
|
|
38
|
+
* memoizes the resulting wrapper.
|
|
39
|
+
*/
|
|
40
|
+
getGovernance(): Promise<ReadOnlyGovernanceContract>;
|
|
41
|
+
/**
|
|
42
|
+
* Returns true iff the given original payload is currently the subject of a live (non-terminal)
|
|
43
|
+
* Governance proposal. Delegates to `ReadOnlyGovernanceContract.hasActiveProposalWithPayload`, which
|
|
44
|
+
* implements the actual sweep against the Governance contract -- this method exists only as a
|
|
45
|
+
* convenience wrapper so callers that already hold a GovernanceProposer reference don't have to
|
|
46
|
+
* resolve the Governance address themselves.
|
|
47
|
+
*/
|
|
48
|
+
hasActiveProposalWithPayload(payload: Hex): Promise<boolean>;
|
|
49
|
+
/**
|
|
50
|
+
* Returns true if the given payload address has no deployed bytecode. Used as a cheap
|
|
51
|
+
* pre-flight check before casting a governance signal — voting for a zero-code address
|
|
52
|
+
* is unrecoverable.
|
|
53
|
+
*
|
|
54
|
+
* We only cache the `false` result (address has bytecode). The `true` result is NOT
|
|
55
|
+
* cached because a CREATE2-redeployed address could go from empty to populated, and
|
|
56
|
+
* caching `true` would make us keep skipping a payload that later becomes valid.
|
|
57
|
+
*/
|
|
58
|
+
isPayloadEmpty(payload: EthAddress): Promise<boolean>;
|
|
59
|
+
submitRoundWinner(round: bigint, l1Tx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UFDLENBY3RCO0lBRUQ7Ozs7T0FJRztJQUVVLGFBQWEsSUFBSSxPQUFPLENBQUMsMEJBQTBCLENBQUMsQ0FHaEU7SUFFRDs7Ozs7O09BTUc7SUFDVSw0QkFBNEIsQ0FBQyxPQUFPLEVBQUUsR0FBRyxHQUFHLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FHeEU7SUFFRDs7Ozs7Ozs7T0FRRztJQUNVLGNBQWMsQ0FBQyxPQUFPLEVBQUUsVUFBVSxHQUFHLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FXakU7SUFFWSxpQkFBaUIsQ0FDNUIsS0FBSyxFQUFFLE1BQU0sRUFDYixTQUFTLEVBQUUsU0FBUyxHQUNuQixPQUFPLENBQUM7UUFDVCxPQUFPLEVBQUUsa0JBQWtCLENBQUM7UUFDNUIsVUFBVSxFQUFFLE1BQU0sQ0FBQztLQUNwQixDQUFDLENBWUQ7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"governance_proposer.d.ts","sourceRoot":"","sources":["../../src/contracts/governance_proposer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"governance_proposer.d.ts","sourceRoot":"","sources":["../../src/contracts/governance_proposer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,EAEL,KAAK,GAAG,EACR,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAGzB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,KAAK,WAAW,EAA8D,MAAM,kBAAkB,CAAC;AAChH,OAAO,EAAE,0BAA0B,EAA6B,MAAM,iBAAiB,CAAC;AAExF,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