Skip to content

Instantly share code, notes, and snippets.

🦅
Fighting for freedom

Luis Iván Cuende luisivan

🦅
Fighting for freedom
Block or report user

Report or block luisivan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@luisivan
luisivan / AragonERC20Wrapper.sol
Last active May 29, 2019
Aragon wrapper for ERC20 tokens
View AragonERC20Wrapper.sol
/* Based on https://github.com/MyBitFoundation/MyBit-DAO.tech/blob/master/apps/MyTokens/contracts/MyTokens.sol */
/* solium-disable function-order */
pragma solidity 0.4.24;
import "@aragon/os/contracts/apps/AragonApp.sol";
import "@aragon/os/contracts/common/IForwarder.sol";
import "@aragon/os/contracts/lib/token/ERC20.sol";
View gist:9dc29f83083e37fe44a3042fb214a587
did:muport:QmTAtPgkEN9Y6z7p6dMeXgKVkc37DqaU8QSXGG97Qoj4fY
@luisivan
luisivan / CounterApp.sol
Created May 21, 2018
Example counter app using aragonOS
View CounterApp.sol
import "@aragon/os/contracts/apps/AragonApp.sol";
contract Counter is AragonApp {
// ...
function increment() auth(INCREMENT_ROLE) external {
value += 1;
Increment(msg.sender);
}
function decrement() auth(DECREMENT_ROLE) external {
@luisivan
luisivan / script.js
Created May 21, 2018
aragon.js example
View script.js
// Listen for events and reduce them to a state
const state$ = app.store((state, event) => {
// Initial state
if (state === null) state = 0
// Build state
switch (event.event) {
case 'Decrement':
state--
break
@luisivan
luisivan / Aragon Contributor License Agreement.md
Last active Jul 30, 2018
Aragon Contributor License Agreement
View Aragon Contributor License Agreement.md

Aragon Contributor License Agreement (CLA)

By Submitting any Contribution (all as defined below), You agree to the terms and conditions set forth in this contributor license agreement (hereinafter the "Agreement").

We are very grateful for your interest in contributing to Aragon (hereinafter, "Aragon", "We" or "Us"). As you know, Aragon is an whose purpose is the developing, disseminating, editing, managing and running of the Project (as defined below).

To this effect, Aragon must have a contributor license agreement accepted by each Contributor, indicating agreement to the license terms below. As such, this Agreement is a legally binding document, so please read it carefully before agreeing to it.

1. Definitions

@luisivan
luisivan / DevOps contractor.md
Last active Feb 15, 2018
DevOps contractor offer for Aragon
View DevOps contractor.md

DevOps contractor

Although the Aragon app is truly decentralized, we have multiple servers for our community chat (Rocket Chat) and for internal collaboration tools.

We are looking for a contractor that can help:

  • Orchestrate those servers
  • Automate the future update processes
  • Automate encrypted backups of the data
@luisivan
luisivan / Counter.sol
Created Jan 30, 2018
Example aragonOS-powered app
View Counter.sol
pragma solidity ^0.4.0;
import "@aragon/core/contracts/apps/App.sol";
contract Counter is App {
/// Events
event Increment(uint indexed blockNumber);
event Decrement(uint indexed blockNumber);
/// State
View d5a097877b835c71581d1af86b333ffc5a207923bc2047c417e7af0c3d89dea5 signature
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
d5a097877b835c71581d1af86b333ffc5a207923bc2047c417e7af0c3d89dea5
-----BEGIN PGP SIGNATURE-----
wsFcBAEBCAAQBQJZ8KPiCRDcWc9p8ZgB9QAANMQQAMNel3pJWZZcPDafUBsBdVcs
Q6q2thgK7cZoFdfqVg+6D+o7Cv7BvwaG8FDjlo4OO+Up+yzwzwFVnJ0daE6qsGoc
hx2gteNNX3S6qOY/muNcAviAb0UXqVFS034GLIM1WlFOILkvPVj8Ujpc16Zl/+1Y
ith2OfD/pwQcOCSeotF2BhjzTPyox+pbvun/veH7xfLE4Cwo8hFJWY5VUt9wI9Uf
@luisivan
luisivan / metamask-protocol.js
Created Mar 14, 2017
Serving MetaMask our the metamask:// Electron custom protocol
View metamask-protocol.js
// distPath can greatly vary. Just point it to where you want to serve MetaMask's build files
protocol.registerFileProtocol('metamask', (req, cb) => {
const filePath = req.url.replace('metamask://app/', '')
const distPath = (process.defaultApp) ? `${url.resolve(__dirname, '.metamask')}/dist/chrome/${filePath}` : path.resolve(`${__dirname}/metamask/${filePath}`)
cb({ path: distPath })
})
@luisivan
luisivan / metamask-init.js
Created Mar 14, 2017
Injecting our MetaMask fork into an Electron dapp
View metamask-init.js
const injectMetaMask = async () => {
const contentScriptReq = await fetch('metamask://app/scripts/contentscript.js')
const blob = await contentScriptReq.blob()
const s = document.createElement('script')
s.type = 'text/javascript'
s.src = URL.createObjectURL(blob)
document.getElementsByTagName('head')[0].appendChild(s)
return true
}
You can’t perform that action at this time.