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

code is not updated to smartpy current version #1

Open
chiptus opened this issue Apr 16, 2020 · 0 comments
Open

code is not updated to smartpy current version #1

chiptus opened this issue Apr 16, 2020 · 0 comments

Comments

@chiptus
Copy link

chiptus commented Apr 16, 2020

when pasting the code into smartpy editor, there are some errors:

  1. sp.entryPoint should be replaced with sp.entry_point
  2. setOutput is not defined, instead the following code has the same output as in the video:
        
# Defines the contract test.
@sp.add_test(name = "Test simple operations")
def testSimpleOperations():
    scenario = sp.test_scenario()

    # Instantiates the contract.
    myContract = SimpleOperations()
   
    scenario += myContract

#   # Calls the contract set method and converts output to html.
    scenario += myContract.set(op = 9)
    scenario += myContract.set(op = 17)

    scenario += myContract.divide(op = 6)
    scenario += myContract.factorial(op = 11)
    scenario += myContract.reverseFlag()
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

1 participant