Skip to content

code is not updated to smartpy current version #1

@chiptus

Description

@chiptus

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions