Skip to content

Latest commit

 

History

History
209 lines (184 loc) · 6.84 KB

TODO.md

File metadata and controls

209 lines (184 loc) · 6.84 KB

TODO

Warning

YOU DON'T NEED TO LOOK AT THIS DIRTY LAUNDRY!

Legend for items:

  • ⭐,🌟 - Highlighted feature.
  • 🟢 - Planned and low uncertainty;
  • 🟠 - Planned with some design decisions to be made;
  • 🔴 - Likely deferred to the future versions;
  • ❓ - To be reviewed.

General Refactoring Ideas

  • Haddock doc cleanup and prettifying.

TODOs for 0.1.0.0

eth-abi

  • CoreType
    • NP (N-ary Product, type-level recursive-friendly alternative to tuple type)
    • BOOL
    • INTx s n
    • BYTESn
    • ADDR
    • 🟠 ARRAY a
    • 🟠 BYTES
    • 🟠 STRING
  • ExtendedType
    • TUPLEn
    • REF, storage or memory raw reference with constRef, keyRef.
    • 🟢 SELECTOR
  • ABICodec
    • 🟢 Compatibility with the solidity abi-spec

yul-dsl

  • YulCat

    • Type conversions for ABITypeDerivedOf, ABITypeCoercible, NP
    • SMC
    • Control flows
      • YulEmb, embed values.
      • YulITE, if-then-else.
      • YulJmpB, code jump for built-in yul functions.
      • YulJmpU, code jump for user-defined yul functions.
      • 🟠 YulArrayLen, YulMapArray, array length and tight-loop primitives.
    • Side Effects
      • YulSGet, YulSPut for raw storage operations.
        • 🟢 Support storage offset.
      • YulCall, external function calls.
      • 🟢 YulStaticCall, static external function calls.
      • 🟢 YulDelegateCall, delegate external function calls.
      • 🟢 external function specification: declareExternalFn.
    • Yul Object
      • Function export modifiers resembling solidity: pureFn, staticFn, omniFn.
      • mkYulObject
    • Type Safety
      • Type-level purity classification: IsEffectNotPure, MayEffectWorld.
  • Standard Built-in Yul Functions:

    • Built-in extension infrastructure
      • ⚠️ Make effect constraint an associated family of a built-in.
    • Value validators
      • bool
      • intN, uintN
      • address
      • _validate_t
    • Integer comparators
      • eq, ne, lt, le, gt, ge
    • Safe integer arithmetic
      • Safe number operation wrappers for checked numbers and maybe numbers.
      • add, mull, sub, abs
      • 🟢 sig, abs
      • 🟢 divMod, quotRem
      • 🟢 complete testsuite
    • Safe value casting
      • 🟢 Casting integers
      • 🟢 Casting ADDR to U160
      • 🟢 Casting BYTESn n to uINTn
      • 🟢 complete testsuite
    • ABICodec
      • _abidec_dispatcher_c, _abidec_from_calldata_t
      • _abidec_from_memory_c, _abidec_from_memory_t
      • _abienc_from_stack_c, _abienc_from_stack_t
      • _keccak_c for supported types.
        • 🟢 _keccak_c evaluation function using ABICodec from eth-abi.
      • 🟢 support dispatcher decoding tuples
      • 🟢 complete testsuite
    • Exceptions
      • __const_revert0_c_; solidity-equivalent of revert()
      • 🟢 revertWithMessage
      • 🟢 revertWithError
      • 🟢 complete testsuite
  • CodeGen

    • Function Gen:
      • Yul code generator for any YulCat
      • 🟠 Fix the implementation for all embeddable values.
    • Object builder:
      • Yul object dispatcher generator for exported functions.
      • 🟠 constructor support.
  • Evaluator

    • evalFn to evaluate Fn (single YulCat value styled as a function) value.
    • 🟢 handling revert
    • 🟢 testsuite
    • 🟠 e2e test against solidity/foundry setup

yul-dsl-pure

  • YulCat syntactic sugars
    • Data.IfThenElse with RebindableSyntax.
    • Data.PatternMatchable with match and liftCase.
  • Working with integers
    • Num class with checked integer operations.
    • ⭐ Maybe Num with optional integer operations and Pattern matching of support.
    • Type-safe upCast, and safeCast to optional values.
  • Data
    • MPOrd
  • Working with pure effect
    • Build pure functions $fn.
    • Call pure functions callFn.

yul-dsl-linear-smc

  • 🌟🌟🌟 Linear safety for side effects
    • Compile expression sof linear data ports to YulCat
    • Working with versioned data port through YulMonad, a "Linearly Versioned Monad."
      • ⚠️ BUG: fix LVM.pure
    • Build linear functions with $lfn $ uncurry'lvv | $lfn $ uncurry'lpv.
    • Call functions linearly with callFn'l, callFn'lpp.
      • 🟢 callFnN'l to call function via N-tuple, in order to support calling 0-ary functions.
  • Working with data ports
    • match data port and outputs new data port.
    • 🟢 Num classes for data ports: mul, abs, sig, etc.
    • 🟠 ifThenElse through pattern matching on BOOL data port.
  • Working with versioned data port through YulMonad, a "Linearly Versioned Monad."
    • Build YulMonad functions: $lfn $ yulmonad'p for versioned inputs, and $lfn $ yulmonad'p for pure inputs.
  • Working with storage:
    • Assorted storage functions: SReferenceable(sget, sput), sgetN, (<==), sputN, (:|), (:=), sputs.
    • SHMap - Storage Hash Map.
    • 🟠 Storage functions working with Referenceable types.

yol-suite

  • yolc
    • SolidityCode Adapters
      • 🟢 Generate external function spec from solidity interface files.
      • 🟠 Solidity struct generator for types.
    • Singleton program factory
      • Program interface, e.g. interface IERC20Program.
      • Program factory, e.g. function createERC20Program().
    • Program upgradability
      • Non-upgreadable.
    • Contract verification support
      • 🟢 EIP-1967 compatible "stunt contract" generator. A stunt contract includes both: 1. the program's interface necessary to interact with the program via EIP-1967-aware explorers, 2. a copy of Haskell main source code in a block of solidity comments.
    • CLI
      • yolc, a MVP in shells script, prepares YOLC project and invoke YOLC builder.

DevX

  • Developer communication
    • Annotated ERC20 demo
  • Software distributions
    • Nix flake
    • 🌟 yolc.dev playground
    • 🌟 github container

TODOs beyond 0.1.0.0

yul-dsl

  • YulCat
    • Type safety
      • ❓ further encode total functions in type

yol-suite

  • yolc
    • Advanced program deployment strategy:
      • manual logic split through delegateCall.
      • auto logic split & dispatching,
      • Shared library.
    • Program upgradability:
      • 🟠 Beacon upgradability.
    • CLI
      • Use 'THSH' to mix shell scripting and publish its haskell binary.
  • attila
    • Test Pipeline: attila test
      • Foundry testing integration using stunt contract.
      • QuickCheck integration using Eval monad.
    • Deployment Pipeline: attila deploy
      • Deploy the program (program is an unit of deployment.)
      • Etherscan verification pipeline.