DLT Announces Open-Source Script For Smart Contract Migration Tool

Detroit Ledger Technologies
2 min readApr 27, 2022

The team at Detroit Ledger Technologies (DLT, block producer account eosiodetroit) is excited to announce it has open-sourced the script for its new Smart Contract Migration tool on GitHub. You probably know that EOSIO smart contracts, unlike Ethereum smart contracts, can be modified and upgraded after deployment. However, when a table is modified, a migration is required so that new and old stored data follows the same structure. This is where DLT’s Smart Contract Migration tool steps in, facilitating the migration actions which would otherwise be quite tedious.

Here’s how it works:

  1. The script creates supporting tables for the tables that are to be migrated. It does this by also adding a temporary migration table that controls the migration status.
  2. Next, it creates and executes the first migration action which copies all the data from the selected tables to the supported tables.
  3. Those rows are then deleted from the original table.
  4. Lastly, the script creates and executes the second migration action, which moves back all the data from the support tables to the original tables.

Note: to avoid unexpected outcomes, during the process all smart contract actions are temporarily frozen until the migration has been completed.

The Smart Contract Migration tool project began earlier this year as a Pomelo Grant application. Now that the script has been open-sourced, DLT plans to submit further Pomelo Grant proposals if improvements can be made.

Find the script on GitHub at: https://github.com/eosdetroit/smart-contracts-migration



Detroit Ledger Technologies

A benevolent block producer crew based in Detroit, MI building value on blockchain networks. Planting new seeds of economic opportunity.