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.11; | |
contract owned { | |
address public owner; | |
function owned() public { | |
owner = msg.sender; | |
} | |
modifier onlyOwner { |
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 MAINET_RPC_URL = 'https://mainnet.infura.io/metamask' ; | |
var ROPSTEN_RPC_URL = 'https://ropsten.infura.io/metamask' ; | |
var KOVAN_RPC_URL = 'https://kovan.infura.io/metamask' ; | |
var RINKEBY_RPC_URL = 'https://rinkeby.infura.io/metamask' ; | |
var CURRENT_URL = MAINET_RPC_URL ; | |
$( document ).ready(function() { | |
web3 = new Web3(new Web3.providers.HttpProvider(CURRENT_URL)); |
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 MAINET_RPC_URL = 'https://mainnet.infura.io/metamask' ; | |
var ROPSTEN_RPC_URL = 'https://ropsten.infura.io/metamask' ; | |
var KOVAN_RPC_URL = 'https://kovan.infura.io/metamask' ; | |
var RINKEBY_RPC_URL = 'https://rinkeby.infura.io/metamask' ; | |
var CURRENT_URL = MAINET_RPC_URL ; | |
$( document ).ready(function() { | |
web3 = new Web3(new Web3.providers.HttpProvider(CURRENT_URL)); |
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.11; | |
/** | |
* @title SafeMath | |
* @dev Math operations with safety checks that throw on error | |
*/ | |
library SafeMath { | |
function mul(uint256 a, uint256 b) internal returns (uint256) { | |
uint256 c = a * b; |
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.11; | |
// Безопасные расчеты между контрагентами | |
contract order { | |
address public buyer; // покупатер | |
address public seller; // продавец | |
address public deliver; // доставщик | |
uint public itemId; // код товара |
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.2; | |
// расчеты между контрагентами | |
contract order { | |
address buyer; // покупатер | |
address seller; // продавец | |
address deliver; // страховая компания | |
uint itemId; // код товара |
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.11; | |
/** | |
* @title SafeMath | |
* @dev Math operations with safety checks that throw on error | |
*/ | |
library SafeMath { | |
function mul(uint256 a, uint256 b) internal returns (uint256) { | |
uint256 c = a * b; |