Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to parse ABI #84

Open
arozovyk opened this issue Nov 10, 2021 · 1 comment
Open

Failing to parse ABI #84

arozovyk opened this issue Nov 10, 2021 · 1 comment

Comments

@arozovyk
Copy link

Freshly installed ft having

tonos_cli 0.22.28
COMMIT_ID: f4e39699570e00a1863d27e27e284f8b38e9deb8
BUILD_DATE: 2021-11-10 12:26:01 +0100
COMMIT_DATE: 2021-11-10 00:04:07 +0300
GIT_BRANCH: master

tvm_linker v0.13.86
BUILD_GIT_COMMIT: d150d77566e5fa5cd5335fd7d6ab95150ba9f5cf
BUILD_GIT_DATE:   2021-11-10 00:04:24 +0300
BUILD_TIME:       2021-11-10 12:26:58 +0100

solc, the solidity compiler commandline interface
Version: 0.51.0+commit.6fbe04e4.mod.Darwin.appleclang

After following the steps from use-cases.html#experiment-with-hellodebot,
the last step

 ft client -- debot fetch %{account:address:my-first-debot}

fails with following error :

Connecting to http://0.0.0.0:7081
Error: failed to parse abi: invalid type: integer `7`, expected struct AbiContract at line 1 column 1
Error: 1
Fatal error: Command '/Users/artemiyrozovyk/.ft/bin/tonos-cli --config 
/Users/artemiyrozovyk/.ft/sandbox1/tonos-cli.config debot fetch 
0:e66a9fe791758c1b9c7c30467bdb28a55041ba7e9a3d0a693d2d5ec4211ff789' exited with error code 1
@lefessan
Copy link
Member

lefessan commented Nov 14, 2021

It looks like an error caused by changes in the new versions of solc, tvm_linker and tonos-cli. Character '7' is because the ABI file stored using setABI is in hexa, and starts with '7'. However, bytes are automatically converted from hexa, so the problem comes from having the new type string instead of bytes in the ABI, that requires a non-hexa encoding.

I added a new substitution escape:SUBST that can be used to automatically json-escape a string, it could be used instead of the hex:SUBST substitution in the example. However, the new version of ft will only build with the new version of freeton_ocaml_sdk 0.5.0 that needs to be released...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants