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
function getBids(uint page) public onlyContract view returns(uint32[16] rabbitID, address[16]rabbitSeller, uint[16]startMoney, uint[16]finishMoney ) { | |
uint pagecount = 16; | |
uint pageend = 0; | |
uint start = 0; | |
if (page < 1) { | |
page = 1; | |
} | |
pageend = page * pagecount; |
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
function removeBids(uint32 _rabbitID) public onlyContract { | |
for (uint i = 0; i < bidsArray.length; i++) { | |
if (bidsArray[i].rabbitID == _rabbitID) { | |
delete bidsArray[i]; | |
bidsArray[i] = bidsArray[bidsArray.length-1]; | |
bidsCount--; | |
return; | |
} | |
} | |
} |
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; | |
/** | |
* @title Ownable | |
* @dev The Ownable contract has an owner address, and provides basic authorization control | |
* functions, this simplifies the implementation of "user permissions". | |
*/ | |
contract Ownable { | |
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.19; | |
contract TEST { | |
uint data = 1; | |
function start() public | |
{ | |
uint i = 2; | |
f1(i); | |
f2(i); |
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
// https://maxfarseer.gitbooks.io/react-course-ru/content/zhiznennii_tsikl_komponenta.html | |
// https://maxfarseer.gitbooks.io/react-course-ru/content/prodvinutoe_ispolzovanie.html | |
// https://reactjs.org/docs/faq-ajax.html | |
import React, { Component } from 'react'; | |
import { Link } from "react-router-dom"; | |
import { promisifyAll } from 'bluebird' | |
import ReactDOM from 'react-dom'; | |
import { getWeb3Async } from '../util/web3' |
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
// https://maxfarseer.gitbooks.io/react-course-ru/content/zhiznennii_tsikl_komponenta.html | |
// https://maxfarseer.gitbooks.io/react-course-ru/content/prodvinutoe_ispolzovanie.html | |
// https://reactjs.org/docs/faq-ajax.html | |
import React, { Component } from 'react'; | |
import { Link } from "react-router-dom"; | |
import { promisifyAll } from 'bluebird' | |
//import ReactDOM from 'react-dom'; | |
import { getWeb3Async } from '../util/web3' |
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 Web3EthContract = require('web3-eth-contract'); | |
var mysql = require('mysql'); | |
//var addr = '0x82bbb666969181e1e743dc004d3ee1f8563e6507'; | |
var addr = '0x345492ebbe79de005d527669e8e54efb5849a3a1'; | |
var fromAddress = "0x4Ece223a70F46056419957EbDa1e31d5D79fF03a"; |
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 Web3 = require('web3'); | |
//var mysql = require('mysql'); | |
var publicABI = [{"constant":false,"inputs":[{"name":"add","type":"address"}],"name":"transferOwnershipServer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"rabbitid","type":"uint32"},{"name":"name","type":"string"},{"name":"description","type":"string"}],"name":"setNameRabbit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"value","type":"uint256"}],"name":"getMoneyContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"page","type":"uint256"}],"name":"getBids","outputs":[{"name":"rabbitID","type":"uint32[16]"},{"name":"rabbitSeller","type":"address[16]"},{"name":"startMoneyBids","type":"uint256[16]"},{"n |
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
const expectRevert = require('./assertRevert'); | |
const ABI_tkn = require('./ABI_token');// remote token | |
var Web3 = require('web3'); | |
const Safe = artifacts.require("./Safe.sol"); | |
// use the given Provider, e.g in Mist, or instantiate a new websocket provider | |
var web3 = new Web3(Web3.givenProvider || 'http://127.0.0.1:8545'); | |
var GasCost = 470000; | |
var gasPrice_value = 200000000000; | |
let meta; |