@roninjin10/babel-plugin-sol
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

babel-plugin-sol

A babel plugin for transpiling template string solidity from ts-sol

Usage

Install this package

Currently not published to npm

pnpm i @roninjin10/babel-plugin-sol

Add to babel.config.js

export default (api) => {
  return {
    plugins: ['@roninjin10/babel-plugin-sol'],
  }
}

Now you can write solidity with ts-sol

ts-sol contains the code that runs at runtime

pnpm i @roninjin10/ts-sol
import { run, tsSol } from '@roninjin10/ts-sol'
import { useState } from 'react'

const forgeScript = tsSol`
contract Script {
    function run() external returns (string memory) {
        return "Hello, World!";
    }
}
`
const sayHello = (): Promise<string> => run(forgeScript)

Package Sidebar

Install

npm i @roninjin10/babel-plugin-sol

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

13 MB

Total Files

9

Last publish

Collaborators

  • fucory