A model of 3 node authority network
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
When working with Supabase, there may be situations where you need to manually create a database user for administrative tasks or specific workflows. This guide walks through the process using a Dockerized PostgreSQL instance, as typically deployed with Supabase.
- A working Supabase instance deployed via Docker.
- Docker and Docker Compose installed on your system.
- Basic familiarity with PostgreSQL commands.
I'm proposing a Petri-net based standard for smart contract state machines.
I think UX is greatly improved when event-based designs are implemented ast state machines. This approach seeks to apply formal Petri-net designs to smart contract development.
Please review a sample contract here:
https://github.com/pflow-xyz/pflow-eth/blob/main/hardhat/contracts/MyStateMachine.sol#L50-L56
Models can be shared as SVG images via this markdown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"/> | |
<meta name="viewport" content="width=device-width,initial-scale=1"/> | |
<title>pflow.dev | metamodel editor</title> | |
<script defer="defer" src="https://cdn.jsdelivr.net/gh/pflow-dev/[email protected]/p/static/js/main.4602f11c.js"> </script> | |
<link href="https://cdn.jsdelivr.net/gh/pflow-dev/[email protected]/p/static/css/main.63d515f3.css" rel="stylesheet"> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.18; | |
import "@openzeppelin/contracts/access/AccessControl.sol"; | |
// import "hardhat/console.sol"; | |
library Uint8Model { | |
event Action(uint256 indexed session, uint8 indexed sequence, uint8 actionId, uint8 role, uint256 when); | |
struct PetriNet { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See UML |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// REVIEW visual model design in JS: | |
// https://pflow.dev/chainlink2023/tictactoe/ | |
contract TicTacToeModel is MetamodelUint8, Uint8ModelFactory { | |
enum Roles{ X, O, HALT } | |
enum Properties { | |
_00, _01, _02, | |
_10, _11, _12, | |
_20, _21, _22, |