adklempner / state-machine-builder Goto Github PK
View Code? Open in Web Editor NEWAn on-chain, permission-based state machine builder.
License: MIT License
An on-chain, permission-based state machine builder.
License: MIT License
Import error in StateMachineBuilder.sol
I'm leaning towards using the Ethereum Natural Specification Format in the code and generating docs with Digix's Doxity (example here )
Another option is Read the Docs
Huge barrier to user on-boarding of decentralized applications is paying for gas.
Let's add another version of the performStateChange
method that accepts two additional parameters: bytes32 hash, bytes sig
and uses Zeppelin's ECRecovery library to allow anyone to submit a TX on the signer's behalf.
If this pattern can work in StateMachineBuilder
it'll be worth releasing a generic version, probably as a new addition to the OpenZeppelin library.
Inspired by TrueBit's incentive layer contracts that use a state machine with timeout restrictions
Solium's repo and Getting Started guide
Aragon uses very sophisticated Access Control List contracts for aragonOS. Let's explore the possibility of implementing these same contracts (perhaps with modifications) for managing our permissions system.
Create a CONTRIBUTING.md
file that outlines the contribution process
Good examples:
Implement solidity-coverage for the repo
The data specifying the requirements for performing a state transition is stored in the Transition
struct in the State
library, violating the single responsibility principle.
In order to keep the core contracts as simple, modular and extensible as possible, it's best to think of the transitionGraph
as a labeled directed graph.
nodeA nodeB label
mapping(bytes32 => mapping(bytes32 => bytes32)) transitionGraph;
Here's how the graph below would be stored in the transitionGraph
mapping (assume strings are converted to bytes32)
transitionGraph["a"]["b"] = "1"
transitionGraph["b"]["c"] = "2"
transitionGraph["c"]["d"] = "3"
transitionGraph["d"]["a"] = "4"
transitionGraph["a"]["c"] = "5"
transitionGraph["c"]["a"] = "6"
In the same way the meaning of each node is interpreted by the implementing contract (and perhaps even further above, by the application at large), so should the meaning of each label.
Flagging a transition as networked
does not specify the details of the transition (which builder, machine, process, and state), it only requires that a transition is successfully performed.
Examples of YAML files from other Solidity projects:
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.