Skip to content

Instantly share code, notes, and snippets.

View protinam's full-sized avatar

Protinam protinam

View GitHub Profile
const Web3 = require('web3')
const web3 = new Web3(new Web3.providers.HttpProvider('https://rinkeby.infura.io'))
const c = new web3.eth.Contract(require('./build/contracts/WyvernExchange.json').abi, require('./config.json').deployed.rinkeby.WyvernExchange)
const promisify = (inner) =>
new Promise((resolve, reject) =>
inner((err, res) => {
if (err) { reject(err) }
resolve(res)
@protinam
protinam / sweeputxos.js
Created January 22, 2018 00:13
ERC20 UTXO redemption script
const bs58check = require('bs58check')
const fs = require('fs')
const Web3 = require('web3')
const MerkleTree = require('./utxo-merkle-proof/index.js')
const web3 = new Web3('http://localhost:8545')
var utxos = JSON.parse(fs.readFileSync('./unspent.json'))
const bitcoin = require('bitcoinjs-lib')
const { ecsign } = require('ethereumjs-util')
const execSync = require('child_process').execSync
const network = {
@protinam
protinam / paragraph-text.md
Created December 14, 2017 04:30
paragraph-text.md

Buy and sell digital items peer-to-peer

Trade any kind of digital item — gift cards, game codes, rare virtual kittens, even smart contracts — with anyone in the world. All you need is an internet connection.

Avoid rent-seeking intermediaries

Trades on the Wyvern Exchange are settled peer-to-peer over the Ethereum network, no Paypal fee required. You never need to trust us with your funds, and the complete protocol implementation is publicly auditable.

Automate your commerce with our open protocol

@protinam
protinam / audit-requirements.md
Created December 12, 2017 00:15
audit-requirements.md

The Wyvern Exchange, currently under development, is an upcoming decentralized digital item exchange running on the Ethereum blockchain. We're looking for a few experienced Solidity developers / smart contract auditors to audit the first set of smart contracts we intend to deploy.

Job requirements are as follows:

  1. Analyze the Wyvern Ethereum smart contracts found at https://github.com/ProjectWyvern/wyvern-ethereum/tree/master/contracts (an exact Git commit hash will be provided upon job acceptance).
  2. Generate a report highlighting all potential issues with the smart contract code and providing suggestions to fix any bugs or enhance general security.
  3. Share your findings with the Project Wyvern developers privately so that any issues can be addressed.
  4. Write an analysis to be shared publicly. Discuss the issues you found (if any), steps that were taken to reoslve them, and your overall thoughts on the state of the code.

The Wyvern DAO (distributed autonomous organization) will be a smart contract responsible for managing the upcoming Wyvern Exchange, a decentralized digital asset exchange running on the Ethereum blockchain.

The Wyvern DAO is structured as a delegated shareholder association – the DAO smart contract controls assets and executes transactions according to majority tokenholder vote, where shareholders have the option to delegate their votes to a trusted party by locking tokens.

You’ll be responsible for implementing a simple web frontend for the Wyvern DAO, interfacing with Metamask / Parity Chrome extension client-side using Web3.js. The web application should support the following functionality:

  • Display list of DAO proposals (transactions to be executed)
  • Display list of delegates and their associated delegators
  • Allow users to create proposals
  • Allow users to vote on proposals (yea or nay)

General notes

  • Site should be mobile-friendly; animations can be omitted on mobile where necessary but all text needs to be readable
  • Consistent typography; I can provide a few initial font ideas if you like, or you can experiment as preferred.
  • Three pages: Landing, About, Contact. I don't need any dynamic content (we'll do that separately).

Page: Landing (most of the work)

  1. Top menubar: title ("Project Wyvern") and pagelinks
@protinam
protinam / example.md
Last active November 30, 2017 23:48
Prototype API Usage Example
0x00D619c908011189CB43De5c8B4032a0d11c6C0e