Skip to content

Instantly share code, notes, and snippets.

img {
position: absolute;
top: 80px;
right: -74px;
@include bp(sm) {
position: relative;
width: 100%;
right: 0;
top: 0;
Verifying my identity on Peepeth.com 0x99b9bb23d300dda4a1dc9eb8d2333704b235c165
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 {
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
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: {}
};
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"));
import React from 'react';
class InputList extends React.Component {
constructor({ items }) {
super({ items });
this.state = { items };
}
render() {
@nicovalencia
nicovalencia / pseudo.js
Created January 24, 2017 22:36
el-table
// ctrl
() => {
this.dataObj = new supergloo.pager('connected_users');
}
// html
import { authApiFetch } from '../util/fetch';
export function loadImpa() {
return (dispatch) => {
authApiFetch('/api/get-impa', {
method: 'GET'
}).then((data) => {
if (data.error) {
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
}