Giter Club home page Giter Club logo

smartc's Introduction

SmartC

Write C smart contracts for signum network. Compile in your browser. Written in Typescript/Javascript.

Quality Gate Status Maintainability Rating Vulnerabilities Coverage

Objective

To empower developers, allowing them to create complex and highly optimized smart contracts.

Setup

This library can be obtained through npm:

npm install smartc-signum-compiler

The stable version is released under tag @latest and the development under @next.

Usage

Web User Interface

A web user interface project is available at https://github.com/deleterium/smartc-web-ui If you want just to code with SmartC use https://deleterium.info/SmartC/

Documentation / FAQ / Lessons

Docs files can be found in this repo, at doc folder.

Node

import { SmartC } from 'smartc-signum-compiler';

//  Example: Simple compilation test
try {
    const startUpTest = new SmartC({
        language: 'C',
        sourceCode: '#pragma maxAuxVars 1\nlong a, b, c; a=b/~c;'
    })
    startUpTest.compile()
    const assemblyText = startUpTest.getAssemblyCode()
    const machineObject = startUpTest.getMachineCode()
    // Do something
} catch (e) {
    return "Compilation error: " + e.message
}

Browser

Import the minified javascript file. SmartC will be imported as global.

<script src="https://cdn.jsdelivr.net/npm/smartc-signum-compiler@latest/dist/smartc.min.js"></script>

Then in your javascript file, just use it:

//  Example: Simple compilation test
try {
    const startUpTest = new SmartC({
        language: 'C',
        sourceCode: '#pragma maxAuxVars 1\nlong a, b, c; a=b/~c;'
    })
    startUpTest.compile()
    const assemblyText = startUpTest.getAssemblyCode()
    const machineObject = startUpTest.getMachineCode()
    // Do something
} catch (e) {
    return "Compilation error: " + e.message
}

Changelog

Find here major upgrades between releases.

Support

Did you like the project? Consider be owner of one SmartC NFT keyword. The smart contract is online at S-NFT2-6MA4-KLA2-DNM8T. More information on NFTv2 website. My address: S-DKVF-VE8K-KUXB-DELET.

Social media

Join SmartC Compiler server in Discord to stay tuned for news or ask questions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.