Open tomerweller opened 1 year ago
Very interesting. I think it's entirely possible to add support to Solang for Soroban contracts runtime.
This would require the following steps:
Now right now I don't think any of the maintainers have time to work on this, but we certainly are always available to help anyone with this. We have a call every weekday at 13:00 UTC on Hyperledger discord server #solang-meetup
@seanyoung Thanks for an outline into what work would be required.
@JakeUrban @graydon and I spent a small amount of time last week exploring what would be involved. We wrote (hacked together) some changes to get the most basic contract executing on Soroban, to help us understand how compatible Soroban would be with Solang, and Solidity, and identify blind spots.
I tried to capture that in comments on:
There are some problems that we'd have to come up with a story for:
init...
. This might change.Vec
.Bytes
but that might be inefficient.~ (See https://github.com/hyperledger/solang/issues/1129#issuecomment-1684243124)call
and deploy
, but Soroban contract functions are exported as is, so we'd need to modify some assumptions so that dynamic exports are enabled. Alternatively, Solang Soroban contracts could have a single point of entry, although Solang built contracts wouldn't get the same code generation for clients that other Soroban contracts get.@leighmcculloch very thorough and interesting!
So it looks like due differences with ethereum, it might be prudent to make Solidity on Soroban a slightly different dialect which does not support 256 bit integers. The contract could enforce that the constructor is called first (for non-pure functions) by setting some sort of flag.
Looks to me creating a Soroban target for Solang is entirely possible!
@leighmcculloch @tomerweller what's the status of this; are you planning to go forward here?
Since I posted the list of interesting issues to solve, a couple things have changed in Soroban that makes it an easier fit I think:
I updated the list in https://github.com/hyperledger/solang/issues/1129#issuecomment-1402338915.
Soroban is a new smart contracts platform built by and for the Stellar ecosystem. The Soroban environment utilizes Parity's WASMI runtime and is written in rust. The main contract developer SDK is also written in Rust.
Stellar is one of the most active L1 blockchains by TPS (according to realtps.net) and is connected to a global network of on and off ramps, including hundreds of thousands of cash agents (through moneygram). These factors make Soroban especially appealing for smart contract developers.