My Vyper contract caused a Ganache error, because the vyper
compiler formats its bytecode
output with a 0x
prefix and a \n
suffix.
web3j-cli
takes that string as is and puts it into a contract Java wrapper class. When ganache-cli
receives that binary string, it throws a "stack underflow" error.
After stripping off the 0x
and \n
unwanted chars, the contract deploydeploys successfully.
As of Feb. 2022, Web3j does not explicitlydoesn't officially support contracts compiled from Vyper. But you can make it work, as I explained.
When solcjs
outputs a contract's binary, it does not add 0x
or \n
.