specron / framework Goto Github PK
View Code? Open in Web Editor NEWLightweight, open source and magic-free framework for testing solidity smart contracts.
Home Page: https://specron.github.io/framework
License: MIT License
Lightweight, open source and magic-free framework for testing solidity smart contracts.
Home Page: https://specron.github.io/framework
License: MIT License
Some errors fail with no information where a problem actually accrued. We should start by wrapping tests into try/catch.
We could probably upgrade the Reporter
to print messages in NodeJS
style. Currently, the design follows the MochaJS
output style.
If you are checking revert message and the expected result does not match the actual error display the actual error.
Consider changing default test command to:
rm -rf build && specron compile && specron test --require ts-node/register --match ./src/tests/**/*.test.ts
Once the #7 issue is resolved, set up a custom domain name specron.org
for the website.
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.
This is a problem with package solidity-parser-antlr with is a dependency of sol-merger which flattener depends on.
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!
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;
Use GitHub Pages to create a custom website template for this project.
It would be cool to have a specron flatten
command that would flatten all the smart contracts and dependencies into one file.
Similar to how ctx.reverts works a functionality to check for a throw would be convenient.
The maximum gas value should be set automatically so a user doesn't have to set this property manually.
Current Specron uses old version
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.
Example:
{ // package.json
...
"specron": {
"require": [
"ts-node/register"
]
}
}
Please prepare e logo for this organization in vectors and bitmaps and places them under /assets
in master
branch.
This allows us to make stability guarantees and also to use the ^
operator when installing Specron.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.