@gzeoneth/gov-tracker 0.1.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/LICENSE +191 -0
- package/README.md +201 -0
- package/dist/abis.d.ts +79 -0
- package/dist/abis.d.ts.map +1 -0
- package/dist/abis.js +159 -0
- package/dist/abis.js.map +1 -0
- package/dist/cli/lib/cli.d.ts +92 -0
- package/dist/cli/lib/cli.d.ts.map +1 -0
- package/dist/cli/lib/cli.js +562 -0
- package/dist/cli/lib/cli.js.map +1 -0
- package/dist/cli/lib/election-check.d.ts +46 -0
- package/dist/cli/lib/election-check.d.ts.map +1 -0
- package/dist/cli/lib/election-check.js +136 -0
- package/dist/cli/lib/election-check.js.map +1 -0
- package/dist/cli/lib/json-state.d.ts +100 -0
- package/dist/cli/lib/json-state.d.ts.map +1 -0
- package/dist/cli/lib/json-state.js +225 -0
- package/dist/cli/lib/json-state.js.map +1 -0
- package/dist/cli/monitor.d.ts +3 -0
- package/dist/cli/monitor.d.ts.map +1 -0
- package/dist/cli/monitor.js +442 -0
- package/dist/cli/monitor.js.map +1 -0
- package/dist/constants.d.ts +235 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +293 -0
- package/dist/constants.js.map +1 -0
- package/dist/discovery/governor-discovery.d.ts +84 -0
- package/dist/discovery/governor-discovery.d.ts.map +1 -0
- package/dist/discovery/governor-discovery.js +310 -0
- package/dist/discovery/governor-discovery.js.map +1 -0
- package/dist/discovery/security-council.d.ts +68 -0
- package/dist/discovery/security-council.d.ts.map +1 -0
- package/dist/discovery/security-council.js +181 -0
- package/dist/discovery/security-council.js.map +1 -0
- package/dist/discovery/timelock-discovery.d.ts +99 -0
- package/dist/discovery/timelock-discovery.d.ts.map +1 -0
- package/dist/discovery/timelock-discovery.js +322 -0
- package/dist/discovery/timelock-discovery.js.map +1 -0
- package/dist/election.d.ts +172 -0
- package/dist/election.d.ts.map +1 -0
- package/dist/election.js +464 -0
- package/dist/election.js.map +1 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +164 -0
- package/dist/index.js.map +1 -0
- package/dist/stages/base.d.ts +127 -0
- package/dist/stages/base.d.ts.map +1 -0
- package/dist/stages/base.js +280 -0
- package/dist/stages/base.js.map +1 -0
- package/dist/stages/l2-to-l1-message.d.ts +108 -0
- package/dist/stages/l2-to-l1-message.d.ts.map +1 -0
- package/dist/stages/l2-to-l1-message.js +422 -0
- package/dist/stages/l2-to-l1-message.js.map +1 -0
- package/dist/stages/proposal-created.d.ts +20 -0
- package/dist/stages/proposal-created.d.ts.map +1 -0
- package/dist/stages/proposal-created.js +62 -0
- package/dist/stages/proposal-created.js.map +1 -0
- package/dist/stages/proposal-queued.d.ts +39 -0
- package/dist/stages/proposal-queued.d.ts.map +1 -0
- package/dist/stages/proposal-queued.js +131 -0
- package/dist/stages/proposal-queued.js.map +1 -0
- package/dist/stages/retryables.d.ts +79 -0
- package/dist/stages/retryables.d.ts.map +1 -0
- package/dist/stages/retryables.js +307 -0
- package/dist/stages/retryables.js.map +1 -0
- package/dist/stages/stage-builder.d.ts +46 -0
- package/dist/stages/stage-builder.d.ts.map +1 -0
- package/dist/stages/stage-builder.js +87 -0
- package/dist/stages/stage-builder.js.map +1 -0
- package/dist/stages/timelock.d.ts +100 -0
- package/dist/stages/timelock.d.ts.map +1 -0
- package/dist/stages/timelock.js +552 -0
- package/dist/stages/timelock.js.map +1 -0
- package/dist/stages/voting.d.ts +18 -0
- package/dist/stages/voting.d.ts.map +1 -0
- package/dist/stages/voting.js +109 -0
- package/dist/stages/voting.js.map +1 -0
- package/dist/tracker/context.d.ts +111 -0
- package/dist/tracker/context.d.ts.map +1 -0
- package/dist/tracker/context.js +264 -0
- package/dist/tracker/context.js.map +1 -0
- package/dist/tracker/discovery.d.ts +89 -0
- package/dist/tracker/discovery.d.ts.map +1 -0
- package/dist/tracker/discovery.js +228 -0
- package/dist/tracker/discovery.js.map +1 -0
- package/dist/tracker/execute.d.ts +44 -0
- package/dist/tracker/execute.d.ts.map +1 -0
- package/dist/tracker/execute.js +126 -0
- package/dist/tracker/execute.js.map +1 -0
- package/dist/tracker/index.d.ts +18 -0
- package/dist/tracker/index.d.ts.map +1 -0
- package/dist/tracker/index.js +70 -0
- package/dist/tracker/index.js.map +1 -0
- package/dist/tracker/pipeline.d.ts +47 -0
- package/dist/tracker/pipeline.d.ts.map +1 -0
- package/dist/tracker/pipeline.js +299 -0
- package/dist/tracker/pipeline.js.map +1 -0
- package/dist/tracker/query.d.ts +45 -0
- package/dist/tracker/query.d.ts.map +1 -0
- package/dist/tracker/query.js +159 -0
- package/dist/tracker/query.js.map +1 -0
- package/dist/tracker/state.d.ts +104 -0
- package/dist/tracker/state.d.ts.map +1 -0
- package/dist/tracker/state.js +287 -0
- package/dist/tracker/state.js.map +1 -0
- package/dist/tracker.d.ts +261 -0
- package/dist/tracker.d.ts.map +1 -0
- package/dist/tracker.js +556 -0
- package/dist/tracker.js.map +1 -0
- package/dist/types/config.d.ts +81 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +6 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/core.d.ts +51 -0
- package/dist/types/core.d.ts.map +1 -0
- package/dist/types/core.js +6 -0
- package/dist/types/core.js.map +1 -0
- package/dist/types/cross-chain.d.ts +80 -0
- package/dist/types/cross-chain.d.ts.map +1 -0
- package/dist/types/cross-chain.js +6 -0
- package/dist/types/cross-chain.js.map +1 -0
- package/dist/types/election.d.ts +59 -0
- package/dist/types/election.d.ts.map +1 -0
- package/dist/types/election.js +6 -0
- package/dist/types/election.js.map +1 -0
- package/dist/types/governor.d.ts +71 -0
- package/dist/types/governor.d.ts.map +1 -0
- package/dist/types/governor.js +6 -0
- package/dist/types/governor.js.map +1 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +21 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/stages.d.ts +189 -0
- package/dist/types/stages.d.ts.map +1 -0
- package/dist/types/stages.js +23 -0
- package/dist/types/stages.js.map +1 -0
- package/dist/types/timelock.d.ts +108 -0
- package/dist/types/timelock.d.ts.map +1 -0
- package/dist/types/timelock.js +6 -0
- package/dist/types/timelock.js.map +1 -0
- package/dist/types/tracking.d.ts +180 -0
- package/dist/types/tracking.d.ts.map +1 -0
- package/dist/types/tracking.js +6 -0
- package/dist/types/tracking.js.map +1 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +22 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/chain.d.ts +18 -0
- package/dist/utils/chain.d.ts.map +1 -0
- package/dist/utils/chain.js +34 -0
- package/dist/utils/chain.js.map +1 -0
- package/dist/utils/log-filters.d.ts +67 -0
- package/dist/utils/log-filters.d.ts.map +1 -0
- package/dist/utils/log-filters.js +116 -0
- package/dist/utils/log-filters.js.map +1 -0
- package/dist/utils/log-search.d.ts +76 -0
- package/dist/utils/log-search.d.ts.map +1 -0
- package/dist/utils/log-search.js +142 -0
- package/dist/utils/log-search.js.map +1 -0
- package/dist/utils/logger.d.ts +41 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +50 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/operation-id.d.ts +48 -0
- package/dist/utils/operation-id.d.ts.map +1 -0
- package/dist/utils/operation-id.js +102 -0
- package/dist/utils/operation-id.js.map +1 -0
- package/dist/utils/rpc-utils.d.ts +30 -0
- package/dist/utils/rpc-utils.d.ts.map +1 -0
- package/dist/utils/rpc-utils.js +99 -0
- package/dist/utils/rpc-utils.js.map +1 -0
- package/dist/utils/salt-computation.d.ts +78 -0
- package/dist/utils/salt-computation.d.ts.map +1 -0
- package/dist/utils/salt-computation.js +132 -0
- package/dist/utils/salt-computation.js.map +1 -0
- package/dist/utils/salt-resolver.d.ts +63 -0
- package/dist/utils/salt-resolver.d.ts.map +1 -0
- package/dist/utils/salt-resolver.js +144 -0
- package/dist/utils/salt-resolver.js.map +1 -0
- package/dist/utils/scoped-logger.d.ts +43 -0
- package/dist/utils/scoped-logger.d.ts.map +1 -0
- package/dist/utils/scoped-logger.js +72 -0
- package/dist/utils/scoped-logger.js.map +1 -0
- package/dist/utils/stage-helpers.d.ts +51 -0
- package/dist/utils/stage-helpers.d.ts.map +1 -0
- package/dist/utils/stage-helpers.js +143 -0
- package/dist/utils/stage-helpers.js.map +1 -0
- package/dist/utils/stage-metadata.d.ts +62 -0
- package/dist/utils/stage-metadata.d.ts.map +1 -0
- package/dist/utils/stage-metadata.js +140 -0
- package/dist/utils/stage-metadata.js.map +1 -0
- package/dist/utils/timing.d.ts +115 -0
- package/dist/utils/timing.d.ts.map +1 -0
- package/dist/utils/timing.js +303 -0
- package/dist/utils/timing.js.map +1 -0
- package/dist/utils/urls.d.ts +20 -0
- package/dist/utils/urls.d.ts.map +1 -0
- package/dist/utils/urls.js +51 -0
- package/dist/utils/urls.js.map +1 -0
- package/package.json +72 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no theory of
|
|
154
|
+
liability, whether in contract, strict liability, or tort
|
|
155
|
+
(including negligence or otherwise) arising in any way out of
|
|
156
|
+
the use or inability to use the Work (even if such Holder or other
|
|
157
|
+
party has been advised of the possibility of such damages), shall
|
|
158
|
+
any Contributor be liable to You for damages, including any direct,
|
|
159
|
+
indirect, special, incidental, or consequential damages of any
|
|
160
|
+
character arising as a result of this License or out of the use or
|
|
161
|
+
inability to use the Work (including but not limited to damages for
|
|
162
|
+
loss of goodwill, work stoppage, computer failure or malfunction, or
|
|
163
|
+
any and all other commercial damages or losses), even if such
|
|
164
|
+
Contributor has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2024 Arbitrum Foundation
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# @gzeoneth/gov-tracker
|
|
2
|
+
|
|
3
|
+
Track and execute Arbitrum DAO governance proposal lifecycle stages.
|
|
4
|
+
|
|
5
|
+
## Terminology
|
|
6
|
+
|
|
7
|
+
The SDK uses terminology aligned with [Arbitrum governance documentation](https://docs.arbitrum.foundation/concepts/lifecycle-anatomy-aip-proposal):
|
|
8
|
+
|
|
9
|
+
| SDK Term | Description |
|
|
10
|
+
|----------|-------------|
|
|
11
|
+
| Constitutional | Core proposals requiring L1 round-trip (8-day L2 timelock) |
|
|
12
|
+
| Non-Constitutional | Treasury proposals, L2-only execution (3-day L2 timelock) |
|
|
13
|
+
| Election | Security Council election proposals |
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
yarn add @gzeoneth/gov-tracker
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { createTracker, ADDRESSES } from "@gzeoneth/gov-tracker";
|
|
25
|
+
|
|
26
|
+
const tracker = createTracker({
|
|
27
|
+
l2Provider: new ethers.providers.JsonRpcProvider(ARB1_RPC_URL),
|
|
28
|
+
l1Provider: new ethers.providers.JsonRpcProvider(ETH_RPC_URL),
|
|
29
|
+
novaProvider: new ethers.providers.JsonRpcProvider(NOVA_RPC),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// Track from governor proposal
|
|
33
|
+
const result = await tracker.trackFromGovernor(ADDRESSES.CONSTITUTIONAL_GOVERNOR, proposalId);
|
|
34
|
+
|
|
35
|
+
for (const stage of result.stages) {
|
|
36
|
+
console.log(`${stage.type}: ${stage.status}`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Track from timelock operation
|
|
40
|
+
const result = await tracker.trackFromTimelock(timelockAddress, { operationId: "0x..." });
|
|
41
|
+
|
|
42
|
+
// Track from transaction hash
|
|
43
|
+
const results = await tracker.trackByTxHash("0x...");
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Stages
|
|
47
|
+
|
|
48
|
+
| # | StageType | Description |
|
|
49
|
+
|---|---------------------- | ------------------------------------------------ |
|
|
50
|
+
| 1 | `PROPOSAL_CREATED` | Proposal submitted on-chain |
|
|
51
|
+
| 2 | `VOTING_ACTIVE` | Voting period (~14-16 days) |
|
|
52
|
+
| 3 | `PROPOSAL_QUEUED` | Queued in L2 timelock |
|
|
53
|
+
| 4 | `L2_TIMELOCK` | L2 timelock delay + execution (3-8 days) |
|
|
54
|
+
| 5 | `L2_TO_L1_MESSAGE` | Cross-chain message + challenge (~6.4 days) |
|
|
55
|
+
| 6 | `L1_TIMELOCK` | L1 timelock delay + execution (3 days) |
|
|
56
|
+
| 7 | `RETRYABLE_EXECUTED` | Retryable tickets redeemed on L2 |
|
|
57
|
+
|
|
58
|
+
Statuses: `NOT_STARTED`, `PENDING`, `READY`, `COMPLETED`, `FAILED`, `SKIPPED`
|
|
59
|
+
|
|
60
|
+
## Execution
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
import { findExecutableStage } from "@gzeoneth/gov-tracker";
|
|
64
|
+
|
|
65
|
+
const readyStage = findExecutableStage(result.stages);
|
|
66
|
+
if (readyStage) {
|
|
67
|
+
const prepResult = await tracker.prepareTransaction(readyStage);
|
|
68
|
+
if (prepResult.success) {
|
|
69
|
+
const { to, data, value, chain } = prepResult.prepared;
|
|
70
|
+
const tx = await signer.sendTransaction({ to, data, value });
|
|
71
|
+
await tx.wait();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## CLI
|
|
77
|
+
|
|
78
|
+
The package includes a CLI tool for monitoring and executing governance proposals:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# After installation, you can use the CLI directly
|
|
82
|
+
npx @gzeoneth/gov-tracker track --tx 0x...
|
|
83
|
+
|
|
84
|
+
# Or if installed globally
|
|
85
|
+
gov-tracker track --tx 0x...
|
|
86
|
+
|
|
87
|
+
# Execute ready stages
|
|
88
|
+
gov-tracker track --tx 0x... --write --private-key $PRIVATE_KEY
|
|
89
|
+
|
|
90
|
+
# Discover and track all proposals
|
|
91
|
+
gov-tracker run
|
|
92
|
+
|
|
93
|
+
# Run with custom chunk sizes for log searches
|
|
94
|
+
gov-tracker run --l1-chunk-size 500000 --l2-chunk-size 5000000
|
|
95
|
+
|
|
96
|
+
# Run with concurrent tracking (faster for many proposals)
|
|
97
|
+
gov-tracker run --concurrency 4
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
For development, you can also use:
|
|
101
|
+
```bash
|
|
102
|
+
yarn monitor:track --tx 0x...
|
|
103
|
+
yarn monitor:run
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Environment
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
ETH_RPC=https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY
|
|
110
|
+
ARB1_RPC=https://arb-mainnet.g.alchemy.com/v2/YOUR_KEY
|
|
111
|
+
NOVA_RPC=https://nova.arbitrum.io/rpc
|
|
112
|
+
PRIVATE_KEY=0x... # For execution
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Testing
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
yarn test # Utils tests (~1.5s, pre-commit)
|
|
119
|
+
yarn test:unit # Smoke tests (~45s, quick CI)
|
|
120
|
+
yarn test:integration # Full RPC tests (~10min)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Publishing to npm
|
|
124
|
+
|
|
125
|
+
This section is for maintainers publishing new versions of the package.
|
|
126
|
+
|
|
127
|
+
### Prerequisites
|
|
128
|
+
|
|
129
|
+
1. **npm account**: You must have an npm account with publish access to the `@gzeoneth` scope
|
|
130
|
+
2. **Authentication**: Log in to npm locally:
|
|
131
|
+
```bash
|
|
132
|
+
npm login
|
|
133
|
+
```
|
|
134
|
+
3. **Clean state**: Ensure your working directory is clean (no uncommitted changes)
|
|
135
|
+
|
|
136
|
+
### Publishing Steps
|
|
137
|
+
|
|
138
|
+
1. **Update version**: Bump the version number in `package.json` using npm's version command:
|
|
139
|
+
```bash
|
|
140
|
+
# Patch release (0.1.0 -> 0.1.1)
|
|
141
|
+
npm version patch
|
|
142
|
+
|
|
143
|
+
# Minor release (0.1.0 -> 0.2.0)
|
|
144
|
+
npm version minor
|
|
145
|
+
|
|
146
|
+
# Major release (0.1.0 -> 1.0.0)
|
|
147
|
+
npm version major
|
|
148
|
+
```
|
|
149
|
+
This will automatically update `package.json` and create a git commit + tag.
|
|
150
|
+
|
|
151
|
+
2. **Run tests**: Ensure all tests pass before publishing:
|
|
152
|
+
```bash
|
|
153
|
+
yarn test:all
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
3. **Dry run**: Preview what will be published without actually publishing:
|
|
157
|
+
```bash
|
|
158
|
+
npm publish --dry-run
|
|
159
|
+
```
|
|
160
|
+
Review the output to ensure all necessary files are included and no unexpected files are being published.
|
|
161
|
+
|
|
162
|
+
4. **Publish to npm**:
|
|
163
|
+
```bash
|
|
164
|
+
npm publish --access public
|
|
165
|
+
```
|
|
166
|
+
Note: The `--access public` flag is required for scoped packages to be publicly accessible.
|
|
167
|
+
|
|
168
|
+
The `prepublishOnly` hook will automatically run linting, format checking, and build before publishing.
|
|
169
|
+
|
|
170
|
+
5. **Push to GitHub**: Push the version commit and tag to the repository:
|
|
171
|
+
```bash
|
|
172
|
+
git push && git push --tags
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Verification
|
|
176
|
+
|
|
177
|
+
After publishing, verify the package:
|
|
178
|
+
|
|
179
|
+
1. **Check npm registry**:
|
|
180
|
+
```bash
|
|
181
|
+
npm view @gzeoneth/gov-tracker
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
2. **Test installation** in a separate directory:
|
|
185
|
+
```bash
|
|
186
|
+
mkdir test-install && cd test-install
|
|
187
|
+
npm init -y
|
|
188
|
+
npm install @gzeoneth/gov-tracker
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
3. **Verify CLI** is available:
|
|
192
|
+
```bash
|
|
193
|
+
npx @gzeoneth/gov-tracker --help
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Troubleshooting
|
|
197
|
+
|
|
198
|
+
- **403 Forbidden**: You don't have publish access to the `@gzeoneth` scope. Contact the package owner.
|
|
199
|
+
- **Version already exists**: The version in `package.json` has already been published. Bump the version number.
|
|
200
|
+
- **Build failures**: The `prepublishOnly` hook will fail if linting, formatting, or build fails. Fix the errors and try again.
|
|
201
|
+
- **Missing files**: Check the `files` array in `package.json` includes all necessary files (currently set to `["dist"]`).
|
package/dist/abis.d.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized ABI constants and interfaces
|
|
3
|
+
*
|
|
4
|
+
* All contract ABIs used across the SDK are defined here.
|
|
5
|
+
* Pre-created ethers Interface instances are exported to avoid
|
|
6
|
+
* repeated interface creation throughout the codebase.
|
|
7
|
+
*/
|
|
8
|
+
import { ethers } from "ethers";
|
|
9
|
+
/**
|
|
10
|
+
* Governor contract ABI (minimal required interface)
|
|
11
|
+
*/
|
|
12
|
+
export declare const GOVERNOR_ABI: string[];
|
|
13
|
+
/**
|
|
14
|
+
* Governor with vetter ABI (Security Council specific)
|
|
15
|
+
*/
|
|
16
|
+
export declare const GOVERNOR_WITH_VETTER_ABI: string[];
|
|
17
|
+
/**
|
|
18
|
+
* Timelock contract ABI (full interface for read and execution)
|
|
19
|
+
*/
|
|
20
|
+
export declare const TIMELOCK_ABI: string[];
|
|
21
|
+
/**
|
|
22
|
+
* Security Council Manager ABI (minimal required interface)
|
|
23
|
+
*/
|
|
24
|
+
export declare const SECURITY_COUNCIL_MANAGER_ABI: string[];
|
|
25
|
+
/**
|
|
26
|
+
* Inbox contract ABI for retryable submission fee calculation
|
|
27
|
+
*/
|
|
28
|
+
export declare const INBOX_ABI: string[];
|
|
29
|
+
/**
|
|
30
|
+
* ArbSys precompile ABI (includes L2ToL1Tx event for message tracking)
|
|
31
|
+
*/
|
|
32
|
+
export declare const ARB_SYS_ABI: string[];
|
|
33
|
+
/**
|
|
34
|
+
* Upgrade Executor ABI
|
|
35
|
+
*/
|
|
36
|
+
export declare const UPGRADE_EXECUTOR_ABI: string[];
|
|
37
|
+
/**
|
|
38
|
+
* Security Council Member Sync Action ABI
|
|
39
|
+
*/
|
|
40
|
+
export declare const MEMBER_SYNC_ACTION_ABI: string[];
|
|
41
|
+
/**
|
|
42
|
+
* Outbox ABI for L2→L1 message execution tracking
|
|
43
|
+
*/
|
|
44
|
+
export declare const OUTBOX_ABI: string[];
|
|
45
|
+
/**
|
|
46
|
+
* ArbRetryableTx precompile ABI for retryable ticket redemption
|
|
47
|
+
*/
|
|
48
|
+
export declare const ARB_RETRYABLE_TX_ABI: string[];
|
|
49
|
+
/**
|
|
50
|
+
* Outbox ABI for encoding executeTransaction (separate from isSpent/events)
|
|
51
|
+
*/
|
|
52
|
+
export declare const OUTBOX_EXECUTE_ABI: string[];
|
|
53
|
+
/**
|
|
54
|
+
* SecurityCouncilNomineeElectionGovernor ABI
|
|
55
|
+
*/
|
|
56
|
+
export declare const NOMINEE_ELECTION_GOVERNOR_ABI: string[];
|
|
57
|
+
/**
|
|
58
|
+
* SecurityCouncilMemberElectionGovernor ABI
|
|
59
|
+
*/
|
|
60
|
+
export declare const MEMBER_ELECTION_GOVERNOR_ABI: string[];
|
|
61
|
+
/**
|
|
62
|
+
* ProposalCreated event signature for parsing
|
|
63
|
+
*/
|
|
64
|
+
export declare const PROPOSAL_CREATED_EVENT = "event ProposalCreated(uint256 proposalId, address proposer, address[] targets, uint256[] values, string[] signatures, bytes[] calldatas, uint256 startBlock, uint256 endBlock, string description)";
|
|
65
|
+
/**
|
|
66
|
+
* ProposalQueued event signature for parsing
|
|
67
|
+
*/
|
|
68
|
+
export declare const PROPOSAL_QUEUED_EVENT = "event ProposalQueued(uint256 proposalId, uint256 eta)";
|
|
69
|
+
export declare const governorInterface: ethers.utils.Interface;
|
|
70
|
+
export declare const timelockInterface: ethers.utils.Interface;
|
|
71
|
+
export declare const arbSysInterface: ethers.utils.Interface;
|
|
72
|
+
export declare const outboxInterface: ethers.utils.Interface;
|
|
73
|
+
export declare const outboxExecuteInterface: ethers.utils.Interface;
|
|
74
|
+
export declare const arbRetryableInterface: ethers.utils.Interface;
|
|
75
|
+
export declare const upgradeExecutorInterface: ethers.utils.Interface;
|
|
76
|
+
export declare const memberSyncActionInterface: ethers.utils.Interface;
|
|
77
|
+
export declare const proposalCreatedInterface: ethers.utils.Interface;
|
|
78
|
+
export declare const proposalQueuedInterface: ethers.utils.Interface;
|
|
79
|
+
//# sourceMappingURL=abis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abis.d.ts","sourceRoot":"","sources":["../src/ab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eAAO,MAAM,uBAAuB,wBAAsD,CAAC"}
|
package/dist/abis.js
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Centralized ABI constants and interfaces
|
|
4
|
+
*
|
|
5
|
+
* All contract ABIs used across the SDK are defined here.
|
|
6
|
+
* Pre-created ethers Interface instances are exported to avoid
|
|
7
|
+
* repeated interface creation throughout the codebase.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.proposalQueuedInterface = exports.proposalCreatedInterface = exports.memberSyncActionInterface = exports.upgradeExecutorInterface = exports.arbRetryableInterface = exports.outboxExecuteInterface = exports.outboxInterface = exports.arbSysInterface = exports.timelockInterface = exports.governorInterface = exports.PROPOSAL_QUEUED_EVENT = exports.PROPOSAL_CREATED_EVENT = exports.MEMBER_ELECTION_GOVERNOR_ABI = exports.NOMINEE_ELECTION_GOVERNOR_ABI = exports.OUTBOX_EXECUTE_ABI = exports.ARB_RETRYABLE_TX_ABI = exports.OUTBOX_ABI = exports.MEMBER_SYNC_ACTION_ABI = exports.UPGRADE_EXECUTOR_ABI = exports.ARB_SYS_ABI = exports.INBOX_ABI = exports.SECURITY_COUNCIL_MANAGER_ABI = exports.TIMELOCK_ABI = exports.GOVERNOR_WITH_VETTER_ABI = exports.GOVERNOR_ABI = void 0;
|
|
11
|
+
const ethers_1 = require("ethers");
|
|
12
|
+
/**
|
|
13
|
+
* Governor contract ABI (minimal required interface)
|
|
14
|
+
*/
|
|
15
|
+
exports.GOVERNOR_ABI = [
|
|
16
|
+
"function state(uint256 proposalId) view returns (uint8)",
|
|
17
|
+
"function proposalSnapshot(uint256 proposalId) view returns (uint256)",
|
|
18
|
+
"function proposalDeadline(uint256 proposalId) view returns (uint256)",
|
|
19
|
+
"function proposalVotes(uint256 proposalId) view returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes)",
|
|
20
|
+
"function quorum(uint256 blockNumber) view returns (uint256)",
|
|
21
|
+
"function proposalEta(uint256 proposalId) view returns (uint256)",
|
|
22
|
+
"function COUNTING_MODE() view returns (string)",
|
|
23
|
+
"function votingDelay() view returns (uint256)",
|
|
24
|
+
"function votingPeriod() view returns (uint256)",
|
|
25
|
+
"function timelock() view returns (address)",
|
|
26
|
+
// Governor with vetter extension (Security Council Nominee Election)
|
|
27
|
+
"function nomineeVetter() view returns (address)",
|
|
28
|
+
"function proposalVettingDeadline(uint256 proposalId) view returns (uint256)",
|
|
29
|
+
// Extended deadline for late quorum
|
|
30
|
+
"function proposalExtendedDeadline(uint256 proposalId) view returns (uint64)",
|
|
31
|
+
// Queue and execute functions
|
|
32
|
+
"function queue(address[] targets, uint256[] values, bytes[] calldatas, bytes32 descriptionHash) returns (uint256)",
|
|
33
|
+
"function execute(address[] targets, uint256[] values, bytes[] calldatas, bytes32 descriptionHash) payable returns (uint256)",
|
|
34
|
+
];
|
|
35
|
+
/**
|
|
36
|
+
* Governor with vetter ABI (Security Council specific)
|
|
37
|
+
*/
|
|
38
|
+
exports.GOVERNOR_WITH_VETTER_ABI = [
|
|
39
|
+
"function proposalVettingDeadline(uint256 proposalId) view returns (uint256)",
|
|
40
|
+
"function vetter() view returns (address)",
|
|
41
|
+
"function excludedNominee(uint256 proposalId, address) view returns (bool)",
|
|
42
|
+
];
|
|
43
|
+
/**
|
|
44
|
+
* Timelock contract ABI (full interface for read and execution)
|
|
45
|
+
*/
|
|
46
|
+
exports.TIMELOCK_ABI = [
|
|
47
|
+
"function isOperation(bytes32 id) view returns (bool)",
|
|
48
|
+
"function isOperationPending(bytes32 id) view returns (bool)",
|
|
49
|
+
"function isOperationReady(bytes32 id) view returns (bool)",
|
|
50
|
+
"function isOperationDone(bytes32 id) view returns (bool)",
|
|
51
|
+
"function getTimestamp(bytes32 id) view returns (uint256)",
|
|
52
|
+
"function getMinDelay() view returns (uint256)",
|
|
53
|
+
"function hashOperation(address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt) view returns (bytes32)",
|
|
54
|
+
"function hashOperationBatch(address[] calldata targets, uint256[] calldata values, bytes[] calldata payloads, bytes32 predecessor, bytes32 salt) view returns (bytes32)",
|
|
55
|
+
"function execute(address target, uint256 value, bytes calldata payload, bytes32 predecessor, bytes32 salt) payable",
|
|
56
|
+
"function executeBatch(address[] calldata targets, uint256[] calldata values, bytes[] calldata payloads, bytes32 predecessor, bytes32 salt) payable",
|
|
57
|
+
"function schedule(address target, uint256 value, bytes data, bytes32 predecessor, bytes32 salt, uint256 delay)",
|
|
58
|
+
"function scheduleBatch(address[] targets, uint256[] values, bytes[] payloads, bytes32 predecessor, bytes32 salt, uint256 delay)",
|
|
59
|
+
"function RETRYABLE_TICKET_MAGIC() view returns (address)",
|
|
60
|
+
// Events for log parsing
|
|
61
|
+
"event CallScheduled(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data, bytes32 predecessor, uint256 delay)",
|
|
62
|
+
"event CallExecuted(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data)",
|
|
63
|
+
];
|
|
64
|
+
/**
|
|
65
|
+
* Security Council Manager ABI (minimal required interface)
|
|
66
|
+
*/
|
|
67
|
+
exports.SECURITY_COUNCIL_MANAGER_ABI = [
|
|
68
|
+
"function cohortSize() view returns (uint256)",
|
|
69
|
+
"function getFirstCohort() external view returns (address[])",
|
|
70
|
+
"function getSecondCohort() external view returns (address[])",
|
|
71
|
+
"function updateNonce() view returns (uint256)",
|
|
72
|
+
"function getScheduleUpdateInnerData(uint256 nonce) view returns (address[], bytes)",
|
|
73
|
+
"function generateSalt(address[] newMembers, uint256 nonce) pure returns (bytes32)",
|
|
74
|
+
];
|
|
75
|
+
/**
|
|
76
|
+
* Inbox contract ABI for retryable submission fee calculation
|
|
77
|
+
*/
|
|
78
|
+
exports.INBOX_ABI = [
|
|
79
|
+
"function calculateRetryableSubmissionFee(uint256 dataLength, uint256 baseFee) view returns (uint256)",
|
|
80
|
+
];
|
|
81
|
+
/**
|
|
82
|
+
* ArbSys precompile ABI (includes L2ToL1Tx event for message tracking)
|
|
83
|
+
*/
|
|
84
|
+
exports.ARB_SYS_ABI = [
|
|
85
|
+
"function arbBlockNumber() view returns (uint256)",
|
|
86
|
+
"function sendTxToL1(address destination, bytes data) payable returns (uint256)",
|
|
87
|
+
"event L2ToL1Tx(address caller, address indexed destination, uint256 indexed hash, uint256 indexed position, uint256 arbBlockNum, uint256 ethBlockNum, uint256 timestamp, uint256 callvalue, bytes data)",
|
|
88
|
+
];
|
|
89
|
+
/**
|
|
90
|
+
* Upgrade Executor ABI
|
|
91
|
+
*/
|
|
92
|
+
exports.UPGRADE_EXECUTOR_ABI = ["function execute(address upgrade, bytes data)"];
|
|
93
|
+
/**
|
|
94
|
+
* Security Council Member Sync Action ABI
|
|
95
|
+
*/
|
|
96
|
+
exports.MEMBER_SYNC_ACTION_ABI = [
|
|
97
|
+
"function perform(address securityCouncil, address[] members, uint256 nonce) returns (bool)",
|
|
98
|
+
];
|
|
99
|
+
/**
|
|
100
|
+
* Outbox ABI for L2→L1 message execution tracking
|
|
101
|
+
*/
|
|
102
|
+
exports.OUTBOX_ABI = [
|
|
103
|
+
"event OutBoxTransactionExecuted(address indexed to, address indexed l2Sender, uint256 indexed zero, uint256 transactionIndex)",
|
|
104
|
+
];
|
|
105
|
+
/**
|
|
106
|
+
* ArbRetryableTx precompile ABI for retryable ticket redemption
|
|
107
|
+
*/
|
|
108
|
+
exports.ARB_RETRYABLE_TX_ABI = ["function redeem(bytes32 ticketId) external"];
|
|
109
|
+
/**
|
|
110
|
+
* Outbox ABI for encoding executeTransaction (separate from isSpent/events)
|
|
111
|
+
*/
|
|
112
|
+
exports.OUTBOX_EXECUTE_ABI = [
|
|
113
|
+
"function executeTransaction(bytes32[] calldata proof, uint256 index, address l2Sender, address to, uint256 l2Block, uint256 l1Block, uint256 l2Timestamp, uint256 value, bytes calldata data) external",
|
|
114
|
+
];
|
|
115
|
+
/**
|
|
116
|
+
* SecurityCouncilNomineeElectionGovernor ABI
|
|
117
|
+
*/
|
|
118
|
+
exports.NOMINEE_ELECTION_GOVERNOR_ABI = [
|
|
119
|
+
"function electionCount() view returns (uint256)",
|
|
120
|
+
"function electionToTimestamp(uint256 electionIndex) view returns (uint256)",
|
|
121
|
+
"function electionIndexToCohort(uint256 electionIndex) view returns (uint8)",
|
|
122
|
+
"function createElection() external returns (uint256)",
|
|
123
|
+
"function nomineeVetter() view returns (address)",
|
|
124
|
+
"function proposalVettingDeadline(uint256 proposalId) view returns (uint256)",
|
|
125
|
+
"function compliantNomineeCount(uint256 proposalId) view returns (uint256)",
|
|
126
|
+
"function proposalDeadline(uint256 proposalId) view returns (uint256)",
|
|
127
|
+
"function proposalSnapshot(uint256 proposalId) view returns (uint256)",
|
|
128
|
+
"function state(uint256 proposalId) view returns (uint8)",
|
|
129
|
+
"function getProposeArgs(uint256 electionIndex) view returns (address[], uint256[], bytes[], string)",
|
|
130
|
+
"function hashProposal(address[] targets, uint256[] values, bytes[] calldatas, bytes32 descriptionHash) view returns (bytes32)",
|
|
131
|
+
];
|
|
132
|
+
/**
|
|
133
|
+
* SecurityCouncilMemberElectionGovernor ABI
|
|
134
|
+
*/
|
|
135
|
+
exports.MEMBER_ELECTION_GOVERNOR_ABI = [
|
|
136
|
+
"function state(uint256 proposalId) view returns (uint8)",
|
|
137
|
+
"function proposalDeadline(uint256 proposalId) view returns (uint256)",
|
|
138
|
+
"function electionIndexToProposalId(uint256 electionIndex) view returns (uint256)",
|
|
139
|
+
];
|
|
140
|
+
/**
|
|
141
|
+
* ProposalCreated event signature for parsing
|
|
142
|
+
*/
|
|
143
|
+
exports.PROPOSAL_CREATED_EVENT = "event ProposalCreated(uint256 proposalId, address proposer, address[] targets, uint256[] values, string[] signatures, bytes[] calldatas, uint256 startBlock, uint256 endBlock, string description)";
|
|
144
|
+
/**
|
|
145
|
+
* ProposalQueued event signature for parsing
|
|
146
|
+
*/
|
|
147
|
+
exports.PROPOSAL_QUEUED_EVENT = "event ProposalQueued(uint256 proposalId, uint256 eta)";
|
|
148
|
+
// Pre-created Interface instances
|
|
149
|
+
exports.governorInterface = new ethers_1.ethers.utils.Interface(exports.GOVERNOR_ABI);
|
|
150
|
+
exports.timelockInterface = new ethers_1.ethers.utils.Interface(exports.TIMELOCK_ABI);
|
|
151
|
+
exports.arbSysInterface = new ethers_1.ethers.utils.Interface(exports.ARB_SYS_ABI);
|
|
152
|
+
exports.outboxInterface = new ethers_1.ethers.utils.Interface(exports.OUTBOX_ABI);
|
|
153
|
+
exports.outboxExecuteInterface = new ethers_1.ethers.utils.Interface(exports.OUTBOX_EXECUTE_ABI);
|
|
154
|
+
exports.arbRetryableInterface = new ethers_1.ethers.utils.Interface(exports.ARB_RETRYABLE_TX_ABI);
|
|
155
|
+
exports.upgradeExecutorInterface = new ethers_1.ethers.utils.Interface(exports.UPGRADE_EXECUTOR_ABI);
|
|
156
|
+
exports.memberSyncActionInterface = new ethers_1.ethers.utils.Interface(exports.MEMBER_SYNC_ACTION_ABI);
|
|
157
|
+
exports.proposalCreatedInterface = new ethers_1.ethers.utils.Interface([exports.PROPOSAL_CREATED_EVENT]);
|
|
158
|
+
exports.proposalQueuedInterface = new ethers_1.ethers.utils.Interface([exports.PROPOSAL_QUEUED_EVENT]);
|
|
159
|
+
//# sourceMappingURL=abis.js.map
|
package/dist/abis.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abis.js","sourceRoot":"","sources":["../src/abis.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,mCAAgC;AAEhC;;GAEG;AACU,QAAA,YAAY,GAAG;IAC1B,yDAAyD;IACzD,sEAAsE;IACtE,sEAAsE;IACtE,wHAAwH;IACxH,6DAA6D;IAC7D,iEAAiE;IACjE,gDAAgD;IAChD,+CAA+C;IAC/C,gDAAgD;IAChD,4CAA4C;IAC5C,qEAAqE;IACrE,iDAAiD;IACjD,6EAA6E;IAC7E,oCAAoC;IACpC,6EAA6E;IAC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