-
Notifications
You must be signed in to change notification settings - Fork 4
ERC interfaces conversion
Julian Konchunas edited this page Aug 31, 2020
·
2 revisions
Sol2Ligo is capable of smart conversion of ERC-20 and ERC-721 calls to FA1.2 and FA2 respectively. This means if Solidity contract interoperates with tokens it will be translated to similar interoperation with Tezos tokens. Tokens in Ethereum and Tezos ecosystem are similar in philosophy, but rather different in implementation details. Transpiler does some work for you, but manual intervention is inevitable. The situation may even get worse: some calls are inherently unsupported and have to be rewritten differently. Here we have gathered some known problems with conversion:
This token translates without much problem to FA1.2 since they correspond to each other almost one to one.
-
isApprovedForAllandgetApproveddoesn't have any meaningful translation at all.Is_operatorview method was once present in TZIP-12 proposal, but was deleted for some reason. You can get operator info from JS code by directly accessing storage, but out of luck for getting such information from another contract. There is a hope though if the following proposal ever gets included https://forum.tezosagora.org/t/adding-read-only-calls/1227 -
safeTransferFrom- in Solidity safe means checking if recipient address is valid and funds can be transferred there. We are not sure if Tezos has this ability yet. AlsosafeTransferFromhas an overloaded version passingdataas a last argument and we are unable to meaningfully translate this into LIGO as well.