Simulating the TEC Migration to Optimism

I created an EVMcrispr script to simulate the vote to freeze the TEC token and move the funds to Optimism.

This is how the vote looks like:

switch gnosis
load aragonos as ar
set $token.tokenlist https://tokens.honeyswap.org
set $surgery 0xe51195c5a8e8141b7ec8bc8b61bd2a06320d252d

set $tecGarden 0x1fc7e8d8e4bbbef77a4d035aec189373b52125a8
set $migrationAddr 0xE7ee4A5821Ba12a31d3Ca97C53E7BD75efb4ee61 # Guardians Safe

ar:connect $tecGarden disputable-voting.open --context "Freeze TEC and Migrate WXDAI" (
    set $tokenManager wrappable-hooked-token-manager.open
    set $votingApp disputable-voting.open
    set $commonPool agent
    set $reserve agent:2

    upgrade wrappable-hooked-token-manager.open $surgery
    forward $tokenManager --check-forwarder false (
      exec $tokenManager::token() enableTransfers(bool) false
      exec $tokenManager::token() changeController(address) $migrationAddr
    )
    upgrade wrappable-hooked-token-manager.open

    upgrade agent $surgery
    exec $commonPool withdraw(address,address) @token(WXDAI) $migrationAddr
    exec $reserve withdraw(address,address) @token(WXDAI) $migrationAddr
    upgrade agent
)

It involves surgeries on both the Token Manager and the Agent apps. You can check the entire simulation in this script.

After the vote is executed, it is expected that the token is not transferable, although the guardians can make it transferable again in case of emergency, and the DAO funds are in the Guardians multisig, which will send them to Mainnet, and afterwards to Optimism.

This script is going to be used during the Dress Rehearsal to check that everything goes as expected, and in the final migration vote.

1 Like