ProvableHQ/welcome

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

zklim opened this issue · 0 comments

  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 ?