@cryptoeconomicslab/ovm-ethereum-generator
TypeScript icon, indicating that this package has built-in type declarations

0.7.0 • Public • Published

ovm-ethereum-generator

Usage

npm i @cryptoeconomicslab/ovm-ethereum-generator
import { Parser } from '@cryptoeconomicslab/ovm-parser'
import { transpile } from '@cryptoeconomicslab/ovm-transpiler'
import { generateEVMByteCode } from '@cryptoeconomicslab/ovm-ethereum-generator'

const parser = new Parser()
const generator = new SolidityCodeGenerator()
const compiledPredicates = transpile(
  parser.parse(
    'def ownership(owner) := with Tx(su) as tx { SignedBy(tx, owner) }' +
      'def SignedBy(message, owner) := with Bytes() as signature {IsValidSignature(message, owner, signature)}'
  )
)
const result = generateEVMByteCode(compiledPredicates)
console.log(result)

Online Demo

https://ovm-compiler.netlify.app

Readme

Keywords

none

Package Sidebar

Install

npm i @cryptoeconomicslab/ovm-ethereum-generator

Weekly Downloads

0

Version

0.7.0

License

Apache-2.0

Unpacked Size

54.9 kB

Total Files

43

Last publish

Collaborators

  • daiki.sekiguchi
  • takamichi-tsutsumi
  • syuhei176