Skip to content

Instantly share code, notes, and snippets.

@retotrinkler
retotrinkler / MP_CLA.md
Last active April 10, 2017 07:33
Melonport Contributor License Agreement

Contributor License Agreement

By contributing software and/or code to a Project, you agree to the terms and conditions set forth in this Contribution License Agreement:

The following terms are used throughout this agreement:

You - the person or legal entity including its affiliates asked to accept this agreement. An affiliate is any entity that controls or is controlled by the legal entity, or is under common control with it.

Project - is an umbrella term that refers to any and all Melonport AG open source projects.

Contributor License Agreement

By contributing software and/or code to a Project, you agree to the terms and conditions set forth in this Contribution License Agreement:

The following terms are used throughout this agreement:

You - the person or legal entity including its affiliates asked to accept this agreement. An affiliate is any entity that controls or is controlled by the legal entity, or is under common control with it.

Project - is an umbrella term that refers to the Melonport AG Oyente Github repository.

pragma solidity ^0.4.11;
/// @title ERC20 Token Protocol
/// @author Melonport AG <[email protected]>
/// @notice See https://github.com/ethereum/EIPs/issues/20
contract ERC20Protocol {
// CONSTANT METHODS
function totalSupply() constant returns (uint256 totalSupply) {}
@retotrinkler
retotrinkler / PreminedAsset.md
Last active July 20, 2017 14:11
Melon Kovan Token Instructions

Premined Assets

  1. Goto Browser Solidity

  2. Input Source Code

  3. Select Compiler Version: 0.4.13+commit.0fb4cb1a.Emscripten.clang

  4. Select Enable Optimization

pragma solidity ^0.4.11;
/// @title ERC20 Token Protocol
/// @author Melonport AG <[email protected]>
/// @notice See https://github.com/ethereum/EIPs/issues/20
contract ERC20Protocol {
// CONSTANT METHODS
function totalSupply() constant returns (uint256 totalSupply) {}
@retotrinkler
retotrinkler / CryptoCompare.sol
Created July 20, 2017 17:19
CryptoCompare Data Feed file
pragma solidity ^0.4.11;
import "github.com/melonproject/protocol/contracts/datafeeds/PriceFeedProtocol.sol";
import "github.com/melonproject/protocol/contracts/assets/Asset.sol";
import "github.com/melonproject/protocol/contracts/dependencies/ERC20.sol";
import "github.com/melonproject/protocol/contracts/dependencies/SafeMath.sol";
import "github.com/melonproject/protocol/contracts/dependencies/Owned.sol";
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol";
import "github.com/Arachnid/solidity-stringutils/strings.sol";
@retotrinkler
retotrinkler / MarketImpact.md
Last active August 21, 2017 12:53
Melon Challenge

Motivation

We are looking for someone with strong analytical skills - who can help us w defining parameter values for the Melon protocol but is also strong in building reference implementations (most likely Haskell, Scala or WebAssembly)

Description

Melon funds are intended to be technology regulated funds. Meaning the code in place should prevent embezzling of Investors investments in Melon funds.

The same way you don't need an Accountant to check the balances of the Bitcoin blockchain after each trade - you should not need a Fund Administrator (entitiy enforcing rules of Regulator) when using Melon funds (ofc you always can if preferred).

@retotrinkler
retotrinkler / example.sol
Created August 24, 2017 16:22
Oyente Example
// THIS CONTRACT CONTAINS A BUG - DO NOT USE
contract Fund {
/// Mapping of ether shares of the contract.
mapping(address => uint) shares;
/// Withdraw your share.
function withdraw() {
if (msg.sender.call.value(shares[msg.sender])())
shares[msg.sender] = 0;
}
}
@retotrinkler
retotrinkler / uPort
Created September 14, 2017 16:57
An example of how uPort, Zug Gov and Melon could collaborate - Modifications welcome!
pragma solidity ^0.4.16;
/// @title Desing by contract (Hoare logic)
/// @author Melonport AG <[email protected]>
/// @notice Gives deriving contracts design by contract modifiers
contract DBC {
// MODIFIERS
modifier pre_cond(bool condition) {
@retotrinkler
retotrinkler / termsAndConditions.md
Last active September 18, 2017 09:11
Terms and Conditions - Application description

Terms and Conditions

The goal of this is to have a simple application, which users can use to register for our upcoming Melon funds competitions. In order to register for the competition users need to sign (using their private key) that they have read, understood and accepted the Terms and Conditions presented to them.

Approach

Initialize Repo