Sol2Ligo foreign calls update

Julian Konchunas
Madfish Solutions
Published in
2 min readSep 8, 2020

This is an update to our Solidity to LIGO transpiler. Refer to our introductory post if you want to know more.

Last week we came up with an idea which might be rather useful for the Solidity to Ligo translation process. Since we already have a main contract detection mechanism we can differentiate between local and foreign calls. Solidity calls to foreign contracts are very similar to the local calls and their gas cost is calculated as a single chunk. In Tezos, however, every call to another contract should be formed as a separate transaction. To aid users with that we go through code while translating and try to convert all foreign calls to transactions. Thanks to the Babylonnet Tezos protocol upgrade, you can make a call to a contract by its arguments, knowing only part of its interface. It brings more versatility to implementing token interactions and lets us save a bit of gas. We take advantage of this capability by creating a transaction call dummies. This might reduce migration cost for systems consisting of several separate contracts in Solidity.

The most logical way to translate Solidity foreign calls to LIGO

Another great milestone for us personally is now we are able to translate MakerDAO SAI contracts without errors! It surely doesn’t mean that this project can be magically migrated to Tezos in a few clicks. But it definitely means that our Solidity features coverage is quite large so it can swallow proven contracts with real-world usage.

As a small and nice-to-have change, we have added the “Default state” tab in our web version, so now you are able to get your contract Tezos origination params right in your browser! And now we have the main page in our Github wiki, which is aimed to guiding you when getting started.

If you want to stay tuned for more updates subscribe to our Twitter

--

--

Julian Konchunas
Madfish Solutions

Blockchain engineer at @madfish.solutions. Ex-Ubisoft. Telegram channel https://t.me/tenxer