Ask! is a framework to write wasm smart contracts, written by assemblyscript, like ink!. But as far as I know, Patract Labs doesn't maintain it anymore.
So we contacted a former member of Patract Labs, who was one of the core developers of Ask!, to continue maintaining a redesigned version, called Ask-lite, which you can think of as a successor to Ask!.
In addition, we also contacted Astar, Phala and other teams who are interested in Ask!, and they are also very interested in Ask-lite. We plan to invite them to join and contribute to ask-lite after finishing the initial version of Ask-lite.
UPDATE: we contacted Patract Labs (the maintainer of the original Ask!
repository) to transfer the Ask!
repo to the ask-lang organization. And for less confusion, we will keep the name and icon of Ask!
, so we will continue to develop Ask-lite v0.1
as Ask! v0.4
(a redesigned version).
Ask!
components:cargo-contract
tool of ink!
)Compiling a wasm smart contract with Ask!
actually goes through TWO compilation processes.
In the first compilation process, Ask!
only checks the contract syntax, and then checks the specific type and semantics for the second time. The final assemblyscript code is generated by splicing strings, which results in very poor readability of the generated code, and error messages are difficult to locate the problem. Even some obviously wrong contract code can pass the compilation check and generate wasm.
Although Ask!
provides ask-cli
to partially solve the two compilation problem, it is not elegant.
Ask-lite (Ask! v0.4)
components:Ask-lite
plans to use a more elegant way: manipulate the AST generated by the contract code through the asc
toolchain to get final wasm code and metadata, without introducing additional tools (like ask-cli
or cargo-contract
) to help development of wasm contracts. In this way, the generated assemblyscript code has better readability, and the type checking and error messages have been greatly improved.
Ask!
uses a forked version of as-scale-codec (the upstream doesn't seem to be maintained anymore, last commit was a year ago) for encoding/decoding, but Ask-lite
uses as-serde-scale instead.
Compared with as-scale-codec, as-serde-scale has better codec performance, more complete implementation, easy to use, and is maintained by ourselves.
The contract framework will be developed on the basis of the new architecture, using new decorator syntax just like Ask!
, but it will be closer to the ink! 3.0
style.
Week 1~4 (3 developers)
Redesign the architecture of Ask!
and implement it.
Track the latest code changes of pallet-contracts and ink! 3.0
.
Week 5~7 (3 developers)
Introduce a more general codec framework as-serde
and a SCALE codec library as-serde-scale
(based on as-serde
), and adapt it to the contract framework.
Redesign the interface of Ask! to be closer to ink! 3.0
.
Redesign the PackedLayout
/ SpreadLayout
interface, referring to the storage abstraction of ink! 3.0
.
Redesign the Event syntax, and compatible with ink! 3.0
.
Integrate all designs using new decorator syntax closer to ink! 3.0
.
Week 8~10 (3 developers)
Provide suitable abstractions for crypto primitives.
Improve env functions.
Implement some common storage data structures, such as Array/Mapping, which is similar to ink! 3.0
.
Add a type analysis phase to the compile phase, which is used for the generation of metadata.json
(compatible with ink! 3.0
metadata).
Week 11~12 (2 developers)
Write some contract examples, such as flipper/ERC20.
Write documentation.
I don't know how to evaluate the cost, so I just followed the cost of the previous Ask!
proposals.