This file contains 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
Verifying my identity on Peepeth.com 0x99b9bb23d300dda4a1dc9eb8d2333704b235c165 |
This file contains 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
it('should require Auction to be ended', async () => { | |
let playerId = getNextCommonPlayerId(); | |
await instance.createCommonAuction.sendTransaction(playerId, fakeTokenURI); | |
let auctionsCount = (await instance.totalAuctionsCount()).toNumber(); | |
let lastAuctionIndex = auctionsCount - 1; | |
// Start auction: | |
await instance.incrementBid.sendTransaction(lastAuctionIndex, { value: web3.toWei(0.01, 'ether'), from: accounts[1] }); | |
try { |
This file contains 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
mapping (uint256 => Auction) auctionsByTokenId | |
struct Auction { | |
address highestBidder | |
uint256 highestBidAmount | |
uint256 endsAtBlock | |
uint256 tokenId | |
} | |
uint256 constant INITIAL_BID = 0.01 eth | |
uint256 constant MIN_BID_INCREMENT = 0.01 eth | |
uint256 constant EXPIRED_TOKEN_COST = 0.05 eth |
This file contains 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 Web3 = require('web3'); | |
const fetch = require('node-fetch'); | |
const ipfsAPI = require('ipfs-api'); | |
const ipfs = ipfsAPI('localhost', '5002'); | |
const POLLING_INTERVAL = 5000; | |
const EVENTS = { | |
Transfer: {} | |
}; |
This file contains 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 Web3 = require('web3'); | |
const fetch = require('node-fetch'); | |
const POLLING_INTERVAL = 5000; | |
const EVENTS = { | |
Transfer: {} | |
}; | |
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:7545")); |
This file contains 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
import React from 'react'; | |
class InputList extends React.Component { | |
constructor({ items }) { | |
super({ items }); | |
this.state = { items }; | |
} | |
render() { |
This file contains 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
// ctrl | |
() => { | |
this.dataObj = new supergloo.pager('connected_users'); | |
} | |
// html |
This file contains 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
import { authApiFetch } from '../util/fetch'; | |
export function loadImpa() { | |
return (dispatch) => { | |
authApiFetch('/api/get-impa', { | |
method: 'GET' | |
}).then((data) => { | |
if (data.error) { |
This file contains 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 _writeHead = res.writeHead; // Store the original function | |
res.writeHead = function(statusCode, headers) { | |
res.writeHead = _writeHead; // Put the original back | |
if (statusCode === 401) { | |
// Change a 401 statusCode to a 403 in order to prevent browser's BASIC AUTH dialog from appearing. | |
// This allows the Backbone app's login page to handle the credentials. | |
_writeHead.call(res, 403, headers); | |
} else { | |
res.writeHead(statusCode, headers); // Call the original | |
} |