This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract KeyValueStorage { | |
mapping(address => mapping(bytes32 => uint256)) _uintStorage; | |
mapping(address => mapping(bytes32 => address)) _addressStorage; | |
mapping(address => mapping(bytes32 => bool)) _boolStorage; | |
/**** Get Methods ***********/ | |
function getAddress(bytes32 key) public view returns (address) { | |
return _addressStorage[msg.sender][key]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
import "./Ownable.sol"; | |
import "./StorageState.sol"; | |
contract Proxy is StorageState , Ownable { | |
function Proxy(KeyValueStorage storage_ , address _owner) public { | |
_storage = storage_; | |
_storage.setAddress("owner",_owner); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
import "./SafeMath.sol"; | |
import "./StorageState.sol"; | |
contract DelegateV1 is StorageState { | |
using SafeMath for uint256; | |
function setNumberOfOwners(uint256 num) public { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
import "./DelegateV1.sol"; | |
import "./StorageState.sol"; | |
import "./Ownable.sol"; | |
contract DelegateV2 is StorageState { | |
modifier onlyOwner() { | |
require(msg.sender == _storage.getAddress("owner")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
import "./KeyValueStorage.sol"; | |
contract StorageState { | |
KeyValueStorage _storage; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global describe it artifacts */ | |
const KeyValueStorage = artifacts.require('KeyValueStorage') | |
const DelegateV1 = artifacts.require('DelegateV1') | |
const DelegateV2 = artifacts.require('DelegateV2') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var StellarSdk = require('stellar-sdk'); | |
var rp = require('request-promise'); | |
var express = require('express'); | |
var router = express.Router(); | |
var server = new StellarSdk.Server('https://horizon-testnet.stellar.org'); | |
StellarSdk.Network.useTestNetwork(); | |
var transaction; | |
createAccount = (req,res)=>{ | |
console.log("creating account"); | |
console.log(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.4.21; | |
contract Ownable { | |
address public owner; | |
address public creater; | |
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); | |
/** | |
* @dev The Ownable constructor sets the original `owner` of the contract to the sender | |
* account. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat << "EOF" | |
______ __ __ __ __ __ __ __ ___ _______. __ __ | |
/ __ \ | | | | | | | | | | | | | | / \ / || | | | | |
| | | | | | | | | | | | | | | |__| | / ^ \ | (----`| |__| | | |
| | | | | | | | | | | | | | | __ | / /_\ \ \ \ | __ | | |
| `--' '--.| `--' | | | | `----.| `----.| | | | / _____ \ .----) | | | | | | |
\_____\_____\\______/ |__| |_______||_______||__| |__| /__/ \__\ |_______/ |__| |__| |
OlderNewer