0

There is a straightforward example of how to do this in the docs, however it does not seem to work for me. With the following code which I basically copied straight from the docs ...

entry callAnotherEntryPoint() {
  effect {
    transfer 0tz to entry self.anotherEntryPoint();
  }
}

entry anotherEntryPoint() {
  effect {
    const dothings = "things done";
  }
}

... I get the error unknown entry: "anotherEntryPoint" in vscode and the typescript bindings will not build. I know that anotherEntryPoint isn't the problem, as I can call it successfullly with the test script. What am I missing here?

Help appreciated as always.

1 Answer 1

3

The called entrypoint must be defined before the calling entrypoint:

entry anotherEntryPoint() {
  effect {
    const dothings = "things done";
  }
}

entry callAnotherEntryPoint() {
  effect {
    transfer 0tz to entry self.anotherEntryPoint();
  }
}
1
  • 🤦‍♂️ Great thanks dzonda!
    – Grum
    Jan 16, 2023 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.