Closed nhannamsiu closed 6 years ago
concat:
neo-python
makes use of the neo-boa
compiler link for handling the smartcontract to .avm
format conversion. Smart contracts only support a subset of python. To my best knowledge at this point you'll need to use the concat
function instead of a+b
from boa.builtins import concat
result = concat('aaa','bbb')
build:
You are not specifying enough arguments. Your first attempts fail because you are not specifying the is_payable
argument. See the help output:
build {path/to/file.py} (test {params} {returntype} {needs_storage} {needs_dynamic_invoke} {is_payable} [{test_params} or --i])
Thank you, I need to inspect neo-boa more.
By the way, I was following the tutorial on build and test contract at https://neo-python.readthedocs.io/en/latest/neo/SmartContract/smartcontracts.html#build-and-test-your-contract. Which appreared to miss the {is_payable} argument. Not sure if you maintain this document, but I just bring this up so other ones who have the same problem can refer to.
thanks for pointing that out, will update.
Current behavior
Wrong behavior when concatenating string that is stored inside variable Cannot run the original build test command
Expected behavior
result should be 'aaabbb', but the output is 12829635
How to reproduce
In terminal: source venv/bin/activate np-prompt open wallet ./mywallet build example.py test 07 07 False False one build example.py test 07 07 False False two
The above build test commands didn't work, but if I add something before the param list then it works: build example.py test 07 07 False False | two build example.py test 07 07 False False ? two
build example.py test 07 07 False False ./}{} two
Your environment
OS: MacOS Mojave neo-python: v0.8.1 Python: 3.7.0