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

Questions on latest Leo breaking changes notes at /documentation/leo /17_testnet_beta.md #369

Open
zklim opened this issue May 16, 2024 · 0 comments

Comments

@zklim
Copy link
Contributor

zklim commented May 16, 2024

  1. In the new async await model import example, is the code
import foo.aleo;

program bar.aleo {
    async transition baz(...) -> (foo.aleo/credit, Future) {
        ...
        let (c, f): (foo.aleo/credit, Future) = foo.aleo/bar(...);
        ...
        return c then finalize(f, ...);
    }
    finalize bar(f: Future, ...) {
        f.await();
        ...
    }
}

should be written as

import foo.aleo;

program bar.aleo {
    async transition baz(...) -> (foo.aleo/credit, Future) {
        ...
        let (c, f): (foo.aleo/credit, Future) = foo.aleo/bar(...);
        ...
        return (c, bar(f, ...));
    }
    async function bar(f: Future, ...) {
        f.await();
        ...
    }
}

based on what has been demonstrated in the previous section?

  1. What's the reason of having restriction per transaction for on-chain execution? And is this limit not applicable to off-chain execution (transfer_private)?
    the maxmimum number of micro-credits your transaction can consume for on-chain execution is 100_000_000.. If your program exceeds this, consider optimizing on-chain components of your Leo code.

  2. Is the testnet3 in url shown in query result correct if the latest API endpoint is http://api.explorer.aleo.org/v1/testnet ?

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