Skip to content

Instantly share code, notes, and snippets.

import Web3 from 'web3'
import provider from 'eth-provider'
import {
getAppLocator,
getDefaultEthNode,
getEthNetworkType,
getIpfsGateway,
} from './local-settings'
import { getNetworkConfig } from './network-config'
import { getInjectedProvider } from './web3-utils'
@osarrouy
osarrouy / TECHNICAL_CHALLENGE.md
Last active September 15, 2019 11:17
Aragon Black | Technical Challenge

TECHNICAL CHALLENGE

The goal of this technical challenge is for the challenger to demonstrate his / her ability to:

  1. produce high quality Solidity code
  2. use the Aragon stack [mostly aragonOS]
  3. follow best practices

Overview

@osarrouy
osarrouy / state.json
Last active August 28, 2019 13:01
Fundraising React State | After Reducer
{
"constants": {
"PPM": BigNumber
},
"contracts": {
"marketMaker": address,
"formula": address,
"tap": address,
"reserve": address
},
@osarrouy
osarrouy / feedback.md
Last active July 2, 2019 13:37
Apiary Audit Feedback

4 Key Observations/Recommendations

The AragonFundraisingController's purpose is to forward and keep in sync other contracts. This forces it to be in sync with all of the other contracts it interacts with, effectively writing a lot of boilerplate to serve as the interface for the whole application. This is a problem because if some functionality is added or removed in any of the market maker, reserve or tap contracts, the controller needs to be updated. Another different way is to remove the controller altogether and have the web interface call the right contract for each functionality. For the methods that keep the collateral tokens (addCollateralToken) and the beneficiary (updateBeneficiary) in sync, a different contract can be used as a ledger having the collateral token list and the beneficiary available (or even split in 2 contracts: one ledger for collateral tokens and the other for the beneficiary); each of the contracts (market maker, reserve and tap) will be able to retrieve the list of co

@osarrouy
osarrouy / EXTERMINATING_ANGEL.md
Created March 17, 2019 18:17
The Exterminating Angel

The Exterminating Angel

Text from Bernard Aspe

The machine

The device presented under the title Chaos machine is complex. There is no intention here towards analysing all its aspects, I only retain the most striking one: money is exchanged for money, but this exchange, if we can say so, has a particular price here, because «real» money is destroyed, burned, and it is at this cost that we can obtain a bit of «virtual» money. But it is precisely through this destruction that what should give rise to a currency conversion reveals something else.

Lacan recalled that, wherever we seek to conceive a causal relationship, if we look closely, a gap is revealed, a hiatus between the terms supposedly joined by this causal relationship. Here, it is first of all this gap which is shown to us. As what we see are two events disconnected from each other: a bill that burns, a code that appears.

3Box is a social profiles network for web3. This post links my 3Box profile to my Github account!
✅ did:muport:QmQvvep2qzurtqX8sxaewKqM111j71Po6drKoW4bzUZGGt ✅
Create your profile today to start building social connection and trust online. https://3box.io/
@osarrouy
osarrouy / script.js
Created January 24, 2019 09:58
Event listener
const reducer = (state, event) => {
// handle all events including the future one from upcoming organism votes
case 'NewOrganism':
const organism = app.external(organismAddress, organismJsonInterface)
$state = app.store(reducer, [organism.events()])
}
let state$ = app.store(reducer)
@osarrouy
osarrouy / Kit.sol
Created December 7, 2018 16:10
Weird bug in custom DAOKit
pragma solidity 0.4.24;
import "@aragon/os/contracts/factory/DAOFactory.sol";
import "@aragon/os/contracts/apm/Repo.sol";
import "@aragon/os/contracts/lib/ens/ENS.sol";
import "@aragon/os/contracts/lib/ens/PublicResolver.sol";
import "@aragon/os/contracts/evmscript/IEVMScriptRegistry.sol"; // needed for EVMSCRIPT_REGISTRY_APP_ID
import "@aragon/os/contracts/apm/APMNamehash.sol";
import "@aragon/apps-shared-minime/contracts/MiniMeToken.sol";
@osarrouy
osarrouy / keybase.md
Last active July 21, 2018 15:48
keybase.md

Keybase proof

I hereby claim:

  • I am osarrouy on github.
  • I am osarrouy (https://keybase.io/osarrouy) on keybase.
  • I have a public key ASDHEphamQ3s1TRzv8xnJzRa4PIDrGSKOyVe8dVD2wKHhAo

To claim this, I am signing this object: