funded
Scalus – multiplatform Scala implementation of Cardano Plutus
Current Project Status
In Progress
Amount
Received
₳96,000
Amount
Requested
₳200,000
Percentage
Received
48.00%
Solution

Scalus enables full DApps development using Scala language.

Scala has a larger talent pool, good dev experience, large ecosystem/community, and is multi platform (JVM/JavaScript/LLVM), on/off-chain.

Problem

Cardano DApps develepment is challenging.

Haskell – hard to hire talent, bad Dev experience.

Aiken – new language, no low-level control, no code reuse.

None works on multiple platforms: JVM, LLVM, JS.

Impact Alignment
Feasibility
Value for money

Team

1 member

Scalus – multiplatform Scala implementation of Cardano Plutus

Please describe your proposed solution.

Scalus is a Scala implementation of Cardano Plutus, PlutusTx, including UPLC evaluation machine.

It allows developers to write Cardano smart contracts using Scala programming language.

Scalus leverages Scala compiler plugin system and macros to convert Scala code to Cardano Untyped Plutus Core (UPLC), similarly to how Plutus converts Haskell to UPLC.

Scalus has huge benefits over all other solutions.

Scala code can be compiled to JVM bytecode, JavaScript, and LLVM via Scala Native. This means that you write code once in one language, and use it everywhere, cross-platform, frontend and backend. And easily integrate with other code in Java, Kotlin, JavaScript, TypeScript, or even Rust, if needed.

Scalus will provide Java API, and TypeScript binding to generated JavaScript, enabling Plutus Virtual Machine evaluation and cost computation for JVM/JavaScript platforms. This can be leveraged by other projects from the ecosystem like <https://github.com/bloxbean>, Lucid, etc.

Scalus has an API for low level UPLC code creation, composition and manipulation, unlike, say, Aiken. So developers have unlimited flexibility and power over their contracts, comparable to the Plutarch library.

Scalus leverages Scala property-based testing framework, ScalaCheck, analogue of Haskell QuickCheck, to rigorously test its code, and will provide primitives and solutions to meticulously test your contracts and DApps with all possible/feasible inputs.

There is nothing even close to this solution in terms of power to cost ratio.

Please define the positive impact your project will have on the wider Cardano community.

Adding Scala support will have a large impact on the Cardano Developer Ecosystem:

  • open a large pool of talent for hire
  • simplify adoption my the financial sector companies that heavily invested in Java and Scala ecosystems
  • greatly improve developers experience with working debugger, good IDE support, faster ‘change-compile-test’ turnaround
  • Allow code reuse between multiple platforms (JVM, JavaScript, TypeScript, potentially LLVM/WebAsm, Android, and iOS), on-chain, and off-chain backend and frontend.
  • Great performance, code maintainability and modularity, universality
  • Scala is one of the best functional programming languages in existence, with a mature ecosystem, libraries, tools, and community.

What is your capability to deliver your project with high levels of trust and accountability? How do you intend to validate if your approach is feasible?

By the amount of happy Cardano developers, and the amount of projects successfully using Scalus. And GitHub stars, number of issues and PRs.

[IMPACT] Please describe your plans to share the outputs and results of your project?

The project is fully open source. All the outputs and results will be published on GitHub:

<https://github.com/nau/scalus>

<https://github.com/nau/scalus-starter>

The documentation will be published online on https://scalus.org

The news, updates and announcements will be published on the official Scalus Twitter:

<https://twitter.com/Scalus3>

and Discord: <https://discord.gg/ygwtuBybsy>

What are the key milestones you need to achieve in order to complete your project successfully?

Scala Compiler Plugin compiles a subset of Scala 3 to Cardano UPLC. It provides sensible and friendly error messages.

>Scalus can perform Script Execution Budget calculation according to Plutus specs.

Plutus v1/v2 builtins implementated and work on JVM and JavaScript platforms.

There are unit and property tests for that functionality.

>Scalus Standard Library contains a set of most used functionality for building smart contract.

There are unit/property tests and documentation for each function.

Implemented ScalaCheck Property-based framework for testing Scalus smart contracts.

>TypeScript bindings for script serialization/construction/execution/cost/evaluation

Java API for script serialization/construction/execution/cost/evaluation

Scalus JAR files published to Maven Central

Scalus TypeScript bindings and JS packages published to NPM

>Published Scalus Starter Project and Demeter.run template

Documentation, examples, tutorials published on Scalus project site

>All the functionality is completed and published in GitHub.

All tests are passing.

Scalus JAR files published to Maven Central.

Scalus TypeScript bindings and JS packages published to NPM.

Published Scalus Starter Project and Demeter.run template.

Documentation, examples, tutorials published on Scalus project site.

Who is in the project team and what are their roles?

The main proposer, Alexander Nemish will be actively working on the proposal.

I am considering hiring another Scala engineer to help make the project sooner.

I’m a former compiler engineer at IOG, I worked on Marlowe DSL (<https://marlowe.iohk.io>).

I’m a senior Scala engineer with more than 10 years of Scala development experience with companies like UBS and Deutsche Bank.

I’m already working on Scalus and have visible results. Current version of Scalus 0.3 already works quite well and is able to compile large and complex contracts that work on Testnet and Mainnet.

Please provide a cost breakdown of the proposed work and resources.

Milestones/Goals/Deliverables

Hours

Scalus Core

Scala Compiler Plugin features and improvements

160

Script Execution Budget calculation

80

Plutus v2 builtins implementation (JVM and JavaScript)

80

Generic Data serialization/lifting for Scala datatypes

80

CIP-0057 Plutus Blueprint generation

40

Scalus APIs and Integrations

Scalus Standard Library

80

ScalaCheck Property-based framework for testing Scalus contracts

80

TypeScript bindings for script serialization/construction/execution/cost/evaluation

40

Java API for script serialization/construction/execution/cost/evaluation

40

DevOps Effort (CI, Maven Central release, npm release etc)

40

SBT tasks to deploy and test contracts on private and public testnets

40

Scalus Docs, Examples and Tutorials

Scalus Starter Project and Demeter.run template

40

Documentation, examples, tutorials

80

Image file

From the estimates you can derive that Scalus Core would be ready in about 3 months, APIs and Integrations – in 2 months, and Documentations – in 1 month, adding up to 6 months of development.

How does the cost of the project represent value for money for the Cardano ecosystem?

Considering that Plutus was developed by a team of at least 5 people for multiple years, I argue that paying one person a fraction of their salaries for 6 months for the comparable result is a bargain.

For the money you’ll get a highly motivated, invested, and skilled professional compiler engineer and domain expert. What’s not to like?

close

Playlist

  • EP2: epoch_length

    Authored by: Darlington Kofa

    3m 24s
    Darlington Kofa
  • EP1: 'd' parameter

    Authored by: Darlington Kofa

    4m 3s
    Darlington Kofa
  • EP3: key_deposit

    Authored by: Darlington Kofa

    3m 48s
    Darlington Kofa
  • EP4: epoch_no

    Authored by: Darlington Kofa

    2m 16s
    Darlington Kofa
  • EP5: max_block_size

    Authored by: Darlington Kofa

    3m 14s
    Darlington Kofa
  • EP6: pool_deposit

    Authored by: Darlington Kofa

    3m 19s
    Darlington Kofa
  • EP7: max_tx_size

    Authored by: Darlington Kofa

    4m 59s
    Darlington Kofa
0:00
/
~0:00