I am trying to get an Ethereum smart contract up and running for Solana. I'm using solang and it had a few issues that I was able to fix, like Solidity's assembly not working, but I finally ran into something I can't handle.
I run solang build:
solang ./lib/FastEcMul.sol --target solana --output build
and I get:
thread 'main' panicked at 'type not allowed', src/sema/types.rs:920:18
more detailed, with RUST_BACKTRACE=1
and -v
:
info: Solang version v0.1.10
thread 'main' panicked at 'type not allowed', src/sema/types.rs:920:18
stack backtrace:
0: 0x104833ce8 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8483effd3e9ec544
1: 0x10433e7e8 - core::fmt::write::ha34752bcd39bca36
2: 0x1048327d0 - std::io::Write::write_fmt::hfc57a6e48a9ddae2
3: 0x104832f98 - std::panicking::default_hook::{{closure}}::he9aaba83dd453f35
4: 0x10483244c - std::panicking::rust_panic_with_hook::hf890018b6cf19ef5
5: 0x10484f6e0 - std::panicking::begin_panic_handler::{{closure}}::hc0918e64b5d68f06
6: 0x10484f668 - std::sys_common::backtrace::__rust_end_short_backtrace::hb99d925d54d4af60
7: 0x10484f634 - _rust_begin_unwind
8: 0x105b17e38 - core::panicking::panic_fmt::hf9e85df46ac02a7d
9: 0x10449be1c - solang::sema::types::<impl solang::sema::ast::Type>::bits::h29f3c107ab9657a4
10: 0x1045df378 - solang::sema::expression::bigint_to_expression::hc02ea43f3e21887f
11: 0x1045f57bc - solang::sema::expression::power::ha1372353023ad777
12: 0x1045e9078 - solang::sema::expression::expression::h07d54b6ce13d6489
13: 0x1045f9ee0 - solang::sema::expression::subtract::hc24c7a4700f0e8e1
14: 0x1045e8748 - solang::sema::expression::expression::h07d54b6ce13d6489
15: 0x1045fba34 - solang::sema::expression::bitwise_and::hc24720f8c53e5be3
16: 0x1045e8574 - solang::sema::expression::expression::h07d54b6ce13d6489
17: 0x1045a22b4 - solang::sema::statements::destructure_values::h1d04cc668cdbf5fd
18: 0x1045a13d0 - solang::sema::statements::destructure::h3937764899bb6c4d
19: 0x104596968 - solang::sema::statements::statement::h392fdbc69b4da93d
20: 0x10459568c - solang::sema::statements::statement::h392fdbc69b4da93d
21: 0x104594868 - solang::sema::statements::resolve_function_body::hc7bc7aac8f20f106
22: 0x10443518c - solang::sema::contracts::resolve::h4024bf7abc2ae716
23: 0x10447a5e8 - solang::sema::sema_file::h3b89ac6a8acdaddb
24: 0x10447c83c - solang::parse_and_resolve::hdc70bef828872f55
25: 0x1047bb45c - solang::main::h5ce247c5504216e2
26: 0x104799d24 - std::sys_common::backtrace::__rust_begin_short_backtrace::hb58d66c82bbbcc6f
27: 0x1047b70a0 - _main
I got no idea, which type is not allowed, or where to find the file src/sema/types.rs:920:18
.
However, I managed to compile other .sol file EC.sol
, on which the FastEcMul.so is dependent. Yet the result was only bundle.so
and .abi
file is missing.
I'd be grateful for any clue.