Giter Club home page Giter Club logo

framework's People

Contributors

anzemur avatar davision avatar fulldecent avatar momannn avatar xpepermint avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

framework's Issues

Consider changing default test command

Consider changing default test command to:

rm -rf build && specron compile && specron test --require ts-node/register --match ./src/tests/**/*.test.ts

SPDX license.

Compiler throws warning: Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information. even if license is correctly set.

Sample contract

Can someone please run

$ mkdir myProject
$ cd myProject
Initialize the project and install the dependencies.

$ specron init
$ npm install
Run tests to verify everything works as expected.

$ npm test

and then save that to specron/hello-world

Also add Travis integration.

This will help me quickly see if specron is right for me.


I have already complained to Truffle about the magic and boilerplates required there so specron could be a fresh relief!

trufflesuite/truffle#1382

Add `signature` helper

Add a new method signature on Context which returns signed data as shown below. For now only the web3.eth.sign will be supported.

import { Spec } from '@hayspec/spec';
import * as index from '..';

/**
 * Helper method.
 */

interface SignatureConfig {
  claim: string;
  signer: string;
  kind: number;
}

async function sign(cfg: SignatureConfig) {
  const signature = await ctx.web3.eth.sign(cfg.claim, cfg.signer);
  const signatureData = {
    r: signature.substr(0, 66),
    s: `0x${signature.substr(66, 64)}`,
    v: parseInt(`0x${signature.substr(130, 2)}`) + 27,
    kind: cfg.kind,
  };
  return ctx.tuple(signatureData);
}

/**
 * Testing module interface.
 */

const spec = new Spec();

spec.test('isHay() returns true', async (ctx) => {
  const signature = await sign({ 
    claim: '0x6baf6cc2efd4500d6531c276870153f10922e4d956240f7170711d79a67bb34e', 
    signer: '0x726bAa6F5caDFBa3cBf1596598656099693910e1',
    kind: 0,
  });
  ctx.is(signature.r, '0xa7c39c2c4850bf1602a61f4764ab895020a8b457752c6d05d8a852228dbd643d');
  ctx.is(signature.s, '0x1dd762054249d3c9ec92df34b6053c0710f9ab213ace30bf1cf9b05cf44b5da2');
  ctx.is(signature.v, '27');
});

export default spec;

Add flatten functionality

It would be cool to have a specron flatten command that would flatten all the smart contracts and dependencies into one file.

specron init - breaking change

Specron init creates files with code from the previous specron version in which there are breaking changes like: requireContract -> deploy so the default example does not work.

Create organisation logo

Please prepare e logo for this organization in vectors and bitmaps and places them under /assets in master branch.

Release 1.0.0

This allows us to make stability guarantees and also to use the ^ operator when installing Specron.

Synchronize GitHub releases and NPM releases

Currently they are out of sync.

Perhaps delete all GitHub releases.

Or find a way to have them up-to-date with NPM releases.

Or use one of the fancy GitHub actions to do all that for us.

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.