• This repository has been archived on 09/Nov/2020
  • Stars
    star
    250
  • Rank 162,030 (Top 4 %)
  • Language
    Racket
  • License
    GNU Affero Genera...
  • Created almost 7 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pyramid is a language to create Ethereum smart contracts

Pyramid Scheme

Pyramid is a dialect of the Scheme programming language targeting the Ethereum Virtual Machine(EVM).

Here is an example of a Pyramid program:

(begin
  (define (factorial n)
    (if (= n 1)
        1
        (* (factorial (- n 1)) n)))
  (factorial 5))

Getting Started

Pyramid Scheme is under heavy construction. Join our public Discord channel if you'd like to contribute or use Pyramid to develop Ethereum contracts.

After installing the prerequisites(listed below),

$ ./pyramid -t tests/0001-factorial.pmd 
(Test Passed:  return 120 120 ((s . 14066) (g . 47052) (z . 3591)))

To deploy that program on a test network:

  • Install Ganache CLI
  • Start an EthereumJS test chain: ganache-cli -l 10000000. It will output a list of "Available Accounts".
  • Change the from variable in deploy.js to one of the test accounts.
  • Change the code variable to be the hex string that the Pyramid compiler output
  • Install the Go Ethereum client.
  • Attach to the EthereumJS chain: geth attach http://localhost:8545.
  • Copy the contents of deploy.js into the geth Javascript prompt.

You can see advanced command line options using pyramid --help.

Prerequisites

Editor

I recommend Emacs with racket-mode. You should add Pyramid's .pmd extension to the list of racket-mode file extensions:

(add-to-list 'auto-mode-alist '("\\.pmd\\'" . racket-mode))

License

This project is licensed under the GNU AGPL 3.0 - see the LICENSE.md file for details

Built With

Authors

More Repositories

1

nes-emulator

A NES emulator made to learn the Rust programming language
Rust
229
star
2

haskoin

Proof-of-concept Blockchain in Haskell
Haskell
90
star
3

pornview

Porn browser formally-verified in Coq
Coq
51
star
4

lambda-exchange

Data structures/API for a Bitcoin exchange
Haskell
20
star
5

leafy-mode

Emacs minor-mode built on top of org-mode for working with ChatGPT
Emacs Lisp
19
star
6

redshift-shellcode

Example of injecting x64 shellcode into Amazon Redshift
PLpgSQL
16
star
7

yxdb-utils

Utilities for parsing Alteryx Database format
Haskell
12
star
8

pond.js

Programs compete for CPU in the same memory space
JavaScript
7
star
9

js-jit

An x64 JIT compiler for a subset of Javascript
Haskell
5
star
10

goodsteins-theorem

A formal proof of Goodstein's theorem
Coq
4
star
11

ceagle

C compiler targeting Pyramid Scheme, which targets the Ethereum Virtual Machine
Racket
4
star
12

file-graph

graphviz example with Haskell
Haskell
3
star
13

underrail-unpacker

Does some minimal unpacking of Underrail files, specifically global.dat
C#
3
star
14

project-euler

A dump of my Project Euler solutions
Haskell
3
star
15

stockfighter-jailbreak

Command line tools for the Stockfighter Jailbreak game
Haskell
3
star
16

haskell-authorize-net

Haskell SDK for the Authorize.NET API
Haskell
2
star
17

ethereum

Typed Racket implementation of common Ethereum libraries
Racket
2
star
18

delta-debugging-example

C++
2
star
19

monads

A list of things that monads are
JavaScript
2
star
20

HaXml

Development copy of HaXml
Haskell
1
star
21

mandelbrot

Go
1
star
22

ExampleDB

Haskell
1
star
23

ChineseChess

C++
1
star
24

rockstar-problem

Perl
1
star
25

matroids

Coq
1
star