本文定义了一组 Provider 方法,这些方法用来定义 DApp (Decentralized Application) 如何与 CKB 区块链的节点之间进行交互。
为防止不同的 Provider 定义不同的方法名称,导致定义和交互方式的碎片化,我们希望通过这个文档定义一组通用的 Provider 方法。
pragma solidity ^0.4.24; | |
/** | |
* @title -FoMo-3D v0.7.1 | |
* ┌┬┐┌─┐┌─┐┌┬┐ ╦╦ ╦╔═╗╔╦╗ ┌─┐┬─┐┌─┐┌─┐┌─┐┌┐┌┌┬┐┌─┐ | |
* │ ├┤ ├─┤│││ ║║ ║╚═╗ ║ ├─┘├┬┘├┤ └─┐├┤ │││ │ └─┐ | |
* ┴ └─┘┴ ┴┴ ┴ ╚╝╚═╝╚═╝ ╩ ┴ ┴└─└─┘└─┘└─┘┘└┘ ┴ └─┘ | |
* _____ _____ | |
* (, / /) /) /) (, / /) /) | |
* ┌─┐ / _ (/_ // // / _ // _ __ _(/ | |
* ├─┤ ___/___(/_/(__(_/_(/_(/_ ___/__/_)_(/_(_(_/ (_(_(_ |
pragma solidity ^0.4.25; | |
contract Donation { | |
uint fundLimit = 1 ether; | |
address owner; | |
event fundMoved(address _to, uint _amount); | |
modifier onlyowner { if (msg.sender == owner) _; } | |
address[] _giver; | |
uint[] _values; |
pragma solidity ^0.4.18; | |
contract D { | |
uint public realN; | |
address public realSender; | |
function delegatecallSetN(address _e, uint _n) public { | |
_e.delegatecall(bytes4(keccak256("setN(uint256)")), _n); // D's storage is set, E is not modified | |
} | |
} |
pragma solidity ^0.4.24; | |
/** | |
* @title -FoMo-3D v0.7.1 | |
* ┌┬┐┌─┐┌─┐┌┬┐ ╦╦ ╦╔═╗╔╦╗ ┌─┐┬─┐┌─┐┌─┐┌─┐┌┐┌┌┬┐┌─┐ | |
* │ ├┤ ├─┤│││ ║║ ║╚═╗ ║ ├─┘├┬┘├┤ └─┐├┤ │││ │ └─┐ | |
* ┴ └─┘┴ ┴┴ ┴ ╚╝╚═╝╚═╝ ╩ ┴ ┴└─└─┘└─┘└─┘┘└┘ ┴ └─┘ | |
* _____ _____ | |
* (, / /) /) /) (, / /) /) | |
* ┌─┐ / _ (/_ // // / _ // _ __ _(/ | |
* ├─┤ ___/___(/_/(__(_/_(/_(/_ ___/__/_)_(/_(_(_/ (_(_(_ |
/** | |
*Submitted for verification at Etherscan.io on 2017-12-12 | |
*/ | |
// Copyright (C) 2015, 2016, 2017 Dapphub | |
// This program is free software: you can redistribute it and/or modify | |
// it under the terms of the GNU General Public License as published by | |
// the Free Software Foundation, either version 3 of the License, or | |
// (at your option) any later version. |
// File: contracts/zeppelin/upgradable/Initializable.sol | |
pragma solidity >=0.4.24 <0.6.0; | |
/** | |
* @title Initializable | |
* | |
* @dev Helper contract to support initializer functions. To use it, replace |
abstract class Dough { | |
} | |
class ThinDough extends Dough { | |
} | |
class ThickDough extends Dough { | |
} |
Reference: https://medium.com/@gargar454/deploy-a-mongodb-cluster-in-steps-9-using-docker-49205e231319#.ff9lbtdl9 | |
this post talks about 3 Nodes,Mongodb 2.6.5. In order to use mongo 3.0, a few changes has been made. Assume using root | |
1. First we need 2 servers with docker installed | |
1.1 recommend use Ubuntu 14.04 on aliyun, then install daocloud for docker installation and monitoring | |
curl -sSL https://get.daocloud.io/docker | sh | |
1.2 install daocloud monitoring program |
ckb-rich-node RPC base on ckb-rpc and ckb-indexer-rpc.
Both RPCs are JSON-RPC protocol, more information can refer to ckb-rich-node.