Skip to content

Commit 1b6f999

Browse files
author
Nikita P
committed
Merge branch 'feat/next-vote' into feat/vote-moves-to-archive
2 parents 0fbb04e + d1950aa commit 1b6f999

11 files changed

+1797
-74
lines changed

.github/workflows/large_vote_ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
services:
2121
hardhat-node:
22-
image: ghcr.io/lidofinance/hardhat-node:2.22.17
22+
image: ghcr.io/lidofinance/hardhat-node:2.22.19.2-shanghai
2323
ports:
2424
- 8545:8545
2525
env:

.github/workflows/normal_vote_ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
services:
1919
hardhat-node:
20-
image: ghcr.io/lidofinance/hardhat-node:2.22.17
20+
image: ghcr.io/lidofinance/hardhat-node:2.22.19.2-shanghai
2121
ports:
2222
- 8545:8545
2323
env:

Dockerfile

+3-26
Original file line numberDiff line numberDiff line change
@@ -264,15 +264,6 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \
264264
# compilers for amd64 will be downloaded by brownie later in this Dockerfile
265265

266266

267-
# install & configure hardhat
268-
RUN mkdir /root/hardhat
269-
WORKDIR /root/hardhat
270-
RUN npm install -d hardhat
271-
RUN npm install --save-dev @nomiclabs/hardhat-ethers ethers @nomiclabs/hardhat-waffle ethereum-waffle chai
272-
RUN touch hardhat.config.js
273-
RUN echo "/** @type import('hardhat/config').HardhatUserConfig */\nmodule.exports = {\n solidity: \"0.8.28\",\n};" | tee -a hardhat.config.js
274-
275-
276267
# init script that runs when the container is started for the very first time
277268
# it will install poetry, yarn libs and init brownie networks
278269
WORKDIR /root/scripts
@@ -281,18 +272,7 @@ RUN echo "if [ ! -e /root/inited ]; then \n touch /root/inited \n poetry install
281272
RUN chmod +x /root/init.sh
282273

283274

284-
# install & configure sshd
285-
ENV DEBIAN_FRONTEND=noninteractive
286-
287-
RUN apt-get update && \
288-
apt-get install -y openssh-server && \
289-
mkdir /var/run/sshd
290-
291-
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
292-
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
293-
RUN echo 'PermitUserEnvironment yes' >> /etc/ssh/sshd_config
294-
295-
# set default working dir for ssh clients
275+
# set default working dir for tty
296276
RUN echo "cd /root/scripts" >> /root/.bashrc
297277

298278

@@ -319,9 +299,6 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.24 --version | g
319299
RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.6.11 --version | grep 'Version: 0.6.11+commit.5ef660b1' || (echo "Incorrect solc-v0.6.11 version" && exit 1) fi
320300
RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.vvm/vyper-0.3.7 --version | grep '0.3.7+' || (echo "Incorrect vyper-0.3.7 version" && exit 1) fi
321301

322-
# open sshd port
323-
EXPOSE 22
324-
325302

326-
# start sshd, run init script, set root password for incoming connections and pass all ENV VARs from the container
327-
CMD ["/bin/bash", "-c", "env | grep -v 'no_proxy' >> /etc/environment && /root/init.sh && echo root:1234 | chpasswd && exec /usr/sbin/sshd -D"]
303+
# run init script and sleep to keep the container running
304+
CMD ["/bin/bash", "-c", "/root/init.sh && sleep infinity"]

README.md

+5-19
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,18 @@ cd scripts
3535
#### Step 3. Run the container
3636
Run the container in the `scripts` directory and specify the ENV VARs:
3737
```shell
38-
docker run --name scripts -v "$(pwd)":/root/scripts -e WEB3_INFURA_PROJECT_ID -d -p 2222:22 --rm ghcr.io/lidofinance/scripts:v9
38+
docker run --name scripts -v "$(pwd)":/root/scripts -e WEB3_INFURA_PROJECT_ID -d --rm ghcr.io/lidofinance/scripts:v10
3939

4040
```
4141
Note: *It may take up to 1 minute for the container to initialize properly the first time.*
42-
#### Step 4. Now connect to the running container using SSH:
42+
43+
#### Step 4. Now connect to the running container using tty:
4344
```shell
44-
ssh root@localhost -p 2222 # password: 1234
45+
docker exec -it scripts /bin/bash
4546
```
46-
> [!NOTE]
47-
> If you see a 'REMOTE HOST IDENTIFICATION HAS CHANGED' error - `ssh-keygen -R "[localhost]:2222"`
48-
>
49-
> If you are asked 'Are you sure you want to continue connecting' - type `yes` and hit `<ENTER>`
5047

5148
To run a Hardhat node inside a deployed Docker container:
5249
```shell
53-
cd /root/hardhat
5450
npx hardhat node --fork $ETH_RPC_URL
5551
```
5652

@@ -65,7 +61,7 @@ docker start scripts
6561

6662
#### How to publish a new version of Scripts Docker image to GHCR
6763
1. Push code changes to the repo
68-
2. Wait for the approvals and merge them into `master`
64+
2. Wait for the approvals
6965
3. Add a tag `vX`, where `X` is the next release number, to the commit. You can refer to the [Release](https://github.com/lidofinance/scripts/releases) page
7066
4. Wait for the workflow **build and push image** to finish successfully on the tagged commit
7167
5. In this README file, update the image version in section **Step 3. Run the container**
@@ -132,16 +128,6 @@ poetry shell
132128

133129
#### To run a Hardhat node (preferred) instead of Ganache:
134130
Just use the [Dockerised Hardhat Node](https://github.com/lidofinance/hardhat-node) or alternatively run it manually:
135-
136-
Install Hardhat and dependencies into a separate folder:
137-
```shell
138-
mkdir hardhat && cd hardhat && npm install -d hardhat && npm install --save-dev @nomiclabs/hardhat-ethers ethers @nomiclabs/hardhat-waffle ethereum-waffle chai
139-
```
140-
Init empty Hardhat project in this folder:
141-
```shell
142-
touch hardhat.config.js && echo $'/** @type import(\'hardhat/config\').HardhatUserConfig */\nmodule.exports = {\n solidity: "0.8.28",\n};' | tee -a hardhat.config.js
143-
```
144-
Start Hardhat node in this folder:
145131
```shell
146132
npx hardhat node --fork $ETH_RPC_URL
147133
```

archive/scripts/vote_2025_03_18.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@
6565
from utils.mainnet_fork import pass_and_exec_dao_vote
6666

6767

68-
description = """1. **Extend On-Chain Voting Duration** (Items 1-17)
68+
description = """1. **Extend On-Chain Voting Duration** (Items 1-17)
6969
As approved on [Snapshot](https://snapshot.box/#/s:lido-snapshot.eth/proposal/0xa58da73cc4257837ae981d8ad861252f4cbbda7a173a577702f8f93561f57825):
7070
- **Main phase**: 48h → 72h
7171
- **Objection phase**: 24h → 48h
7272
73-
To align with these changes, **GateSeal** (pausing the [WithdrawalQueue](https://etherscan.io/address/0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1) and [ValidatorExitBusOracle](https://etherscan.io/address/0x0De4Ea0184c2ad0BacA7183356Aea5B8d5Bf5c6e)) and **CSM GateSeal** (pausing the [CSModule](https://etherscan.io/address/0xdA7dE2ECdDfccC6c3AF10108Db212ACBBf9EA83F), [CSAccounting](https://etherscan.io/address/0x4d72BFF1BeaC69925F8Bd12526a39BAAb069e5Da) and [CSFeeOracle](https://etherscan.io/address/0x4D4074628678Bd302921c20573EEa1ed38DdF7FB)) will be updated with the same configuration, except for extending the duration from 6 to 11 days. The new versions will expire on **March 1, 2026**.
74-
**Statemind.io** audited the [initial Factory and Blueprint](https://github.com/lidofinance/audits/?tab=readme-ov-file#04-2023-statemind-gateseals-audit) and [verified](https://github.com/lidofinance/audits/blob/main/Statemind%20GateSeal%20Deployment%20Validation%2003-2025.pdf) that the updated GateSeal matches the Blueprint and has the correct parameters.
73+
To align with these changes, **GateSeal** (pausing the [WithdrawalQueue](https://etherscan.io/address/0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1) and [ValidatorExitBusOracle](https://etherscan.io/address/0x0De4Ea0184c2ad0BacA7183356Aea5B8d5Bf5c6e)) and **CSM GateSeal** (pausing the [CSModule](https://etherscan.io/address/0xdA7dE2ECdDfccC6c3AF10108Db212ACBBf9EA83F), [CSAccounting](https://etherscan.io/address/0x4d72BFF1BeaC69925F8Bd12526a39BAAb069e5Da), and [CSFeeOracle](https://etherscan.io/address/0x4D4074628678Bd302921c20573EEa1ed38DdF7FB)) will be updated with the same configuration, except for extending the duration from 6 to 11 days. The new versions will expire on **March 1, 2026**.
74+
**Statemind.io** audited the [initial Factory and Blueprint](https://github.com/lidofinance/audits/?tab=readme-ov-file#04-2023-statemind-gateseals-audit) and [verified](https://github.com/lidofinance/audits/blob/main/Statemind%20GateSeal%20Deployment%20Validation%2003-2025.pdf) that the updated GateSeal contracts match the Blueprint and have the correct parameters.
7575
76-
2. **Deploy Easy Track Factories for Lido Ecosystem & Lido Labs BORG Foundations to streamline operational funding** (Items 18,19)
76+
2. **Deploy Easy Track Factories for Lido Ecosystem & Lido Labs BORG Foundations to streamline operational funding** (Items 18, 19)
7777
7878
Snapshot proposals & contract details:
7979
- [Lido Ecosystem Snapshot](https://snapshot.box/#/s:lido-snapshot.eth/proposal/0x7f72f12d72643c20cd0455c603d344050248e75ed1074c8391fae4c30f09ca15) | [Configuration](https://research.lido.fi/t/establishment-of-lido-ecosystem-borg-foundation-as-a-lido-dao-adjacent-foundation/9345/15) | security limit $5M per quarter
@@ -149,7 +149,7 @@ def start_vote(tx_params: Dict[str, str], silent: bool) -> Tuple[int, Optional[T
149149
),
150150
),
151151
(
152-
"6. Update the FINALIZATION_MAX_NEGATIVE_REBASE_EPOCH_SHIFT parameter in the OracleDaemonConfig contract 0xbf05A929c3D7885a6aeAd833a992dA6E5ac23b09 to 0x08CA (2250 epochs)",
152+
"6. Update the FINALIZATION_MAX_NEGATIVE_REBASE_EPOCH_SHIFT parameter in the OracleDaemonConfig contract 0xbf05A929c3D7885a6aeAd833a992dA6E5ac23b09 to 0x08CA (2250 epochs)",
153153
agent_forward(
154154
[
155155
(
@@ -301,14 +301,14 @@ def start_vote(tx_params: Dict[str, str], silent: bool) -> Tuple[int, Optional[T
301301

302302
# EasyTrack factories
303303
(
304-
"18. Add an Easy Track EVM script factory 0xf2476f967C826722F5505eDfc4b2561A34033477 for funding the Lido Ecosystem BORG’s operational multisig (AllowedRecipientsRegistry 0xDAdC4C36cD8F468A398C25d0D8aaf6A928B47Ab4)",
304+
"18. Add an Easy Track EVM script factory 0xf2476f967C826722F5505eDfc4b2561A34033477 for funding the Lido Ecosystem BORG Foundation’s operational multisig (AllowedRecipientsRegistry 0xDAdC4C36cD8F468A398C25d0D8aaf6A928B47Ab4)",
305305
add_evmscript_factory(
306306
factory=ECOSYSTEM_BORG_STABLE_FACTORY,
307307
permissions=create_top_up_allowed_recipient_permission(registry_address=ECOSYSTEM_BORG_STABLE_REGISTRY),
308308
),
309309
),
310310
(
311-
"19. Add an Easy Track EVM script factory 0xE1f6BaBb445F809B97e3505Ea91749461050F780 for funding the Lido Labs BORG’s operational multisig (AllowedRecipientsRegistry 0x68267f3D310E9f0FF53a37c141c90B738E1133c2)",
311+
"19. Add an Easy Track EVM script factory 0xE1f6BaBb445F809B97e3505Ea91749461050F780 for funding the Lido Labs BORG Foundation’s operational multisig (AllowedRecipientsRegistry 0x68267f3D310E9f0FF53a37c141c90B738E1133c2)",
312312
add_evmscript_factory(
313313
factory=LABS_BORG_STABLE_FACTORY,
314314
permissions=create_top_up_allowed_recipient_permission(registry_address=LABS_BORG_STABLE_REGISTRY),

archive/tests/test_2025_03_18.py

+111-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
from brownie import interface, convert, Contract, web3
1+
from brownie import interface, convert, Contract, web3, reverts, chain
22
from scripts.vote_2024_03_18 import start_vote
33
from utils.test.tx_tracing_helpers import *
4-
from utils.config import LDO_HOLDER_ADDRESS_FOR_TESTS
4+
from utils.evm_script import encode_call_script, EMPTY_CALLSCRIPT
5+
from utils.config import (
6+
contracts,
7+
LDO_VOTE_EXECUTORS_FOR_TESTS,
8+
LDO_HOLDER_ADDRESS_FOR_TESTS,
9+
)
510
from utils.test.event_validators.permission import (
611
Permission,
712
validate_permission_grant_event,
@@ -16,15 +21,18 @@
1621
)
1722
from utils.test.event_validators.voting import validate_change_vote_time_event, validate_change_objection_time_event
1823
from utils.test.event_validators.common import validate_events_chain
19-
from utils.test.easy_track_helpers import create_and_enact_payment_motion
24+
from utils.test.easy_track_helpers import create_and_enact_payment_motion, check_add_and_remove_recipient_with_voting
25+
26+
from utils.voting import find_metadata_by_vote_id
27+
from utils.ipfs import get_lido_vote_cid_from_str
2028

2129
# Vote duration
2230
NEW_VOTE_DURATION = 432000
2331
NEW_OBJECTION_PHASE_DURATION = 172800
2432

2533
# Oracle daemon config
26-
FINALIZATION_MAX_NEGATIVE_REBASE_EPOCH_SHIFT_NEW_VALUE = convert.to_bytes(2250, "bytes").hex()
27-
FINALIZATION_MAX_NEGATIVE_REBASE_EPOCH_SHIFT_OLD_VALUE = convert.to_bytes(1350, "bytes").hex()
34+
FINALIZATION_MAX_NEGATIVE_REBASE_EPOCH_SHIFT_NEW_VALUE = '0x' + convert.to_bytes(2250, "bytes").hex()
35+
FINALIZATION_MAX_NEGATIVE_REBASE_EPOCH_SHIFT_OLD_VALUE = '0x' + convert.to_bytes(1350, "bytes").hex()
2836

2937
# GateSeals
3038
OLD_GATE_SEAL = "0x79243345eDbe01A7E42EDfF5900156700d22611c"
@@ -92,7 +100,7 @@ def _check_no_role(contract: Contract, role: str, holder: str):
92100
), f"Role {role} holder on {contract} should be {holder}"
93101

94102

95-
def test_vote(helpers, accounts, vote_ids_from_env, bypass_events_decoding, stranger):
103+
def test_vote(helpers, accounts, vote_ids_from_env, bypass_events_decoding, ldo_holder, stranger):
96104
acl = interface.ACL(ACL)
97105
csm = interface.CSModule(CSM)
98106
cs_fee_oracle = interface.CSFeeOracle(CS_FEE_ORACLE)
@@ -116,7 +124,7 @@ def test_vote(helpers, accounts, vote_ids_from_env, bypass_events_decoding, stra
116124

117125
# Check Oracle Config state before voting
118126
finalization_max_negative_rebase_epoch_shift = oracle_daemon_config.get("FINALIZATION_MAX_NEGATIVE_REBASE_EPOCH_SHIFT")
119-
assert finalization_max_negative_rebase_epoch_shift.hex() == FINALIZATION_MAX_NEGATIVE_REBASE_EPOCH_SHIFT_OLD_VALUE
127+
assert finalization_max_negative_rebase_epoch_shift == FINALIZATION_MAX_NEGATIVE_REBASE_EPOCH_SHIFT_OLD_VALUE
120128
assert not oracle_daemon_config.hasRole(
121129
web3.keccak(text="CONFIG_MANAGER_ROLE").hex(),
122130
agent.address
@@ -163,7 +171,7 @@ def test_vote(helpers, accounts, vote_ids_from_env, bypass_events_decoding, stra
163171

164172
# Check Oracle Config updated properly
165173
finalization_max_negative_rebase_epoch_shift_updated = oracle_daemon_config.get("FINALIZATION_MAX_NEGATIVE_REBASE_EPOCH_SHIFT")
166-
assert finalization_max_negative_rebase_epoch_shift_updated.hex() == FINALIZATION_MAX_NEGATIVE_REBASE_EPOCH_SHIFT_NEW_VALUE
174+
assert finalization_max_negative_rebase_epoch_shift_updated == FINALIZATION_MAX_NEGATIVE_REBASE_EPOCH_SHIFT_NEW_VALUE
167175
assert not oracle_daemon_config.hasRole(
168176
web3.keccak(text="CONFIG_MANAGER_ROLE").hex(),
169177
agent.address
@@ -206,6 +214,63 @@ def test_vote(helpers, accounts, vote_ids_from_env, bypass_events_decoding, stra
206214
assert new_csm_gate_seal_contract.get_expiry_timestamp() == GATE_SEAL_NEW_EXPIRY_TIMESTAMP
207215
assert not new_csm_gate_seal_contract.is_expired()
208216

217+
# Scenario test
218+
print("Simulating GateSeal flow")
219+
# Try to use the Old gate seal to pause the contracts
220+
print("Try to use the Old gate seal to pause the contracts")
221+
old_gate_seal = interface.GateSeal(OLD_GATE_SEAL)
222+
with reverts(
223+
"10"
224+
): # converted into string list of sealed indexes (in sealables) in which the error occurred, in the descending order
225+
interface.GateSeal(old_gate_seal).seal(sealables, {"from": GATE_SEAL_COMMITTEE})
226+
227+
print("Seal the contracts with the New gate seal")
228+
new_gate_seal_contract.seal(sealables, {"from": GATE_SEAL_COMMITTEE})
229+
print("Sealed")
230+
231+
expiry_timestamp = chain.time()
232+
assert new_gate_seal_contract.is_expired()
233+
assert new_gate_seal_contract.get_expiry_timestamp() <= expiry_timestamp
234+
print("Expired")
235+
236+
for sealable in sealables:
237+
assert interface.IPausable(sealable).isPaused()
238+
print("Sealables paused")
239+
chain.sleep(new_gate_seal_contract.get_seal_duration_seconds())
240+
chain.mine()
241+
242+
for sealable in sealables:
243+
assert not interface.IPausable(sealable).isPaused()
244+
print(f"Sealables unpaused in {new_gate_seal_contract.get_seal_duration_seconds()}")
245+
246+
old_csm_gate_seal = interface.GateSeal(OLD_CSM_GATE_SEAL)
247+
with reverts(
248+
"210"
249+
): # converted into string list of sealed indexes (in sealables) in which the error occurred, in the descending order
250+
old_csm_gate_seal.seal(csm_sealables, {"from": CSM_GATE_SEAL_COMMITTEE})
251+
252+
print("Seal the contracts with the New gate seal")
253+
new_csm_gate_seal_contract.seal(csm_sealables, {"from": CSM_GATE_SEAL_COMMITTEE})
254+
print("Sealed")
255+
256+
expiry_timestamp = chain.time()
257+
assert new_csm_gate_seal_contract.is_expired()
258+
assert new_csm_gate_seal_contract.get_expiry_timestamp() <= expiry_timestamp
259+
print("Expired")
260+
261+
for sealable in csm_sealables:
262+
assert interface.IPausable(sealable).isPaused()
263+
print("Sealables paused")
264+
chain.sleep(new_csm_gate_seal_contract.get_seal_duration_seconds())
265+
chain.mine()
266+
267+
for sealable in csm_sealables:
268+
assert not interface.IPausable(sealable).isPaused()
269+
print(f"Sealables unpaused in {new_csm_gate_seal_contract.get_seal_duration_seconds()}")
270+
271+
print("GateSeal is good to go!")
272+
273+
209274
# EasyTrack factories added check
210275
evm_script_factories_after = easy_track.getEVMScriptFactories()
211276
assert ECOSYSTEM_BORG_STABLE_FACTORY in evm_script_factories_after
@@ -214,14 +279,16 @@ def test_vote(helpers, accounts, vote_ids_from_env, bypass_events_decoding, stra
214279

215280
ecosystem_borg_stable_factory = interface.TopUpAllowedRecipients(ECOSYSTEM_BORG_STABLE_FACTORY)
216281
labs_borg_stable_factory = interface.TopUpAllowedRecipients(LABS_BORG_STABLE_FACTORY)
282+
ecosystem_borg_stable_registry = interface.AllowedRecipientRegistry(ECOSYSTEM_BORG_STABLE_REGISTRY)
283+
labs_borg_stable_registry = interface.AllowedRecipientRegistry(LABS_BORG_STABLE_REGISTRY)
217284

218285
for stablecoin in [DAI_TOKEN, USDT_TOKEN, USDC_TOKEN]:
219286
create_and_enact_payment_motion(
220287
easy_track=easy_track,
221288
trusted_caller=ecosystem_borg_stable_factory.trustedCaller(),
222289
factory=ecosystem_borg_stable_factory,
223290
token=interface.ERC20(stablecoin),
224-
recievers=[Contract(interface.AllowedRecipientRegistry(ECOSYSTEM_BORG_STABLE_REGISTRY).allowedRecipients(0))],
291+
recievers=[Contract(ecosystem_borg_stable_registry.allowedRecipients(0))],
225292
transfer_amounts=[1 * 10**6],
226293
stranger=stranger,
227294
)
@@ -230,16 +297,49 @@ def test_vote(helpers, accounts, vote_ids_from_env, bypass_events_decoding, stra
230297
trusted_caller=labs_borg_stable_factory.trustedCaller(),
231298
factory=labs_borg_stable_factory,
232299
token=interface.ERC20(stablecoin),
233-
recievers=[Contract(interface.AllowedRecipientRegistry(LABS_BORG_STABLE_REGISTRY).allowedRecipients(0))],
300+
recievers=[Contract(labs_borg_stable_registry.allowedRecipients(0))],
234301
transfer_amounts=[1 * 10**6],
235302
stranger=stranger,
236303
)
237304

305+
check_add_and_remove_recipient_with_voting(
306+
ecosystem_borg_stable_registry, helpers, ldo_holder, voting
307+
)
308+
check_add_and_remove_recipient_with_voting(
309+
labs_borg_stable_registry, helpers, ldo_holder, voting
310+
)
311+
312+
# Voting duration check
313+
new_vote_script = encode_call_script(
314+
[(voting.address, voting.newVote.encode_input(EMPTY_CALLSCRIPT, "", False, False))]
315+
)
316+
tx = contracts.token_manager.forward(new_vote_script, tx_params)
317+
test_vote_id = tx.events["StartVote"]["voteId"]
318+
319+
chain.sleep((3 * 24 * 60 * 60) - 60) # 1 minute before voting phase ends (end of 3rd day)
320+
321+
for holder_addr in LDO_VOTE_EXECUTORS_FOR_TESTS:
322+
print("voting from acct:", holder_addr)
323+
topup = "10 ether"
324+
if accounts.at(holder_addr, force=True).balance() < topup:
325+
accounts[0].transfer(holder_addr, topup)
326+
account = accounts.at(holder_addr, force=True)
327+
voting.vote(test_vote_id, True, False, {"from": account})
328+
329+
chain.sleep(2 * 24 * 60 * 60) # 1 minute before objection phase ends (end of 5th day)
330+
voting.vote(test_vote_id, False, False, {"from": ldo_holder})
331+
332+
chain.sleep(60) # 1 minutes to be executed
333+
voting.executeVote(test_vote_id, {"from": ldo_holder})
238334

239335
# Events check
240336
display_voting_events(vote_tx)
241337
events = group_voting_events(vote_tx)
242338

339+
metadata = find_metadata_by_vote_id(vote_id)
340+
print('ipfs id:', get_lido_vote_cid_from_str(metadata))
341+
assert get_lido_vote_cid_from_str(metadata) == "bafkreiae5ge6hszcag4cdxk3wcoqfa2ilre7rbt4f3j3eydmgip6nvvat4"
342+
243343
assert len(events) == 19
244344

245345
unsafely_modify_vote_time_role_permission = Permission(
@@ -323,4 +423,4 @@ def validate_config_value_updated(event: EventDict, key, value):
323423
_events_chain = ["LogScriptCall", "LogScriptCall", "ConfigValueUpdated", "ScriptResult"]
324424
validate_events_chain([e.name for e in event], _events_chain)
325425
assert event["ConfigValueUpdated"]["key"] == key
326-
assert convert.to_bytes(event["ConfigValueUpdated"]["value"], 'bytes').hex() == value
426+
assert event["ConfigValueUpdated"]["value"] == value

0 commit comments

Comments
 (0)