Skip to content

Instantly share code, notes, and snippets.

View amadeobrands's full-sized avatar
🦄
Moving Forward

Amadeo Brands amadeobrands

🦄
Moving Forward
View GitHub Profile
interface Lender {
function goWild() external;
}
contract FlashERC20 is ERC20 {
using SafeMath for uint256;
function flash(uint256 amount) external {
balances[msg.sender] = balances[msg.sender].add(amount);
Lender(msg.sender).goWild();
### Keybase proof
I hereby claim:
* I am amadeobrands on github.
* I am amadeobrands (https://keybase.io/amadeobrands) on keybase.
* I have a public key ASD1ymSUpregqXJYt7-qiSxjK8zxBoaKLJGje1KEmV7WEgo
To claim this, I am signing this object:
Verifying my Blockstack ID is secured with the address 1NB7BJELHTzuBuSyUvXevTmJjY8sUZgGhS https://explorer.blockstack.org/address/1NB7BJELHTzuBuSyUvXevTmJjY8sUZgGhS
0x72d1527BdFC3ba8b848C8f5375FF5835d36c55E5
pragma solidity ^0.4.6;
contract tokenRecipient {function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData);}
contract MCAP {
/* Public variables of the token */
string public standard = 'MCAP 1.0';

Keybase proof

I hereby claim:

  • I am amadeobrands on github.
  • I am amadeo (https://keybase.io/amadeo) on keybase.
  • I have a public key ASCWfQW5Silngz_8RwTwo_eW11UW2G0LSV5943fGqwKL7Ao

To claim this, I am signing this object:

0xeaB0B9e5dAa318149F670aCF7D1600EdAf74Bc9C
public class OpenIDHandler extends RequestHandler {
public enum ResponseType {
INTERNAL_SERVER_ERROR("Internal Server Error", IMxRuntimeResponse.INTERNAL_SERVER_ERROR),
UNAUTHORIZED("Unauthorized", IMxRuntimeResponse.UNAUTHORIZED);
String title;
int status;
ResponseType(String title, int httpStatus) {
this.title = title;
@amadeobrands
amadeobrands / conditionals-contract.js
Created March 27, 2017 13:28
Smart contract conditionals | Solidity
pragma solidity ^0.4.0;
contract SomeContract {
uint someVar;
function getMyVar() constant returns (string, uint) {
if(someVar > 2) {
return ("greater two", someVar);
} else if (someVar == 2) {
return ("is exactly two", someVar);
} else {
@amadeobrands
amadeobrands / simpleContract.js
Last active April 3, 2017 09:34
Simple smartcontract function | Solidity
pragma solidity ^0.4.0;
contract SimpleDapp {
uint someVar;
function setSomeVar (uint myVar) {
someVar = myVar;
}
function getSomeVar() constant returns (uint) {
return someVar;