Skip to content

Instantly share code, notes, and snippets.

View n1c01a5's full-sized avatar
🏗️
#BUILDING Web3 Devtool

n1c0 n1c01a5

🏗️
#BUILDING Web3 Devtool
View GitHub Profile
did:muport:QmS3RFQvU6xKyE4CQmYn7ExCYd3yvWxao9xs8zGwKmR8M9
/* ____/\\\\\\\\\______/\\\\\\\\\\\\\\\________/\\\\\\\\\_______/\\\\\_______/\\\________/\\\__/\\\\\\\\\\\\\\\____/\\\\\\\\\____________ */
/* __/\\\///////\\\___\/\\\///////////______/\\\////////______/\\\///\\\____\/\\\_______\/\\\_\/\\\///////////___/\\\///////\\\__________ */
/* __\/\\\_____\/\\\___\/\\\_______________/\\\/_____________/\\\/__\///\\\__\//\\\______/\\\__\/\\\_____________\/\\\_____\/\\\_________ */
/* ___\/\\\\\\\\\\\/____\/\\\\\\\\\\\______/\\\______________/\\\______\//\\\__\//\\\____/\\\___\/\\\\\\\\\\\_____\/\\\\\\\\\\\/_________ */
/* ____\/\\\//////\\\____\/\\\///////______\/\\\_____________\/\\\_______\/\\\___\//\\\__/\\\____\/\\\///////______\/\\\//////\\\________ */
/* _____\/\\\____\//\\\___\/\\\_____________\//\\\____________\//\\\______/\\\_____\//\\\/\\\_____\/\\\_____________\/\\\____\//\\\______ */
/* ______\/\\\_____\//\\\__\/\\\______________\///\\\___________\///\\\__/\\\________\//\\\\\______\/\\\_____________\/\\\_____\//\\\____ */
/**
* @authors: [@n1c01a5]
* @reviewers: []
* @auditors: []
* @bounties: []
* @deployments: []
*/
pragma solidity ^0.4.25;
@n1c01a5
n1c01a5 / recover_full_2.sol
Last active May 6, 2019 10:03
add this fn getClaimIDsByAddress
/**
* @authors: [@n1c01a5]
* @reviewers: []
* @auditors: []
* @bounties: []
* @deployments: []
*/
pragma solidity ^0.4.25;
pragma solidity ^0.4.25;
/** @title IArbitrable
* Arbitrable interface.
* When developing arbitrable contracts, we need to:
* -Define the action taken when a ruling is received by the contract. We should do so in executeRuling.
* -Allow dispute creation. For this a function must:
* -Call arbitrator.createDispute.value(_fee)(_choices,_extraData);
* -Create the event Dispute(_arbitrator,_disputeID,_rulingOptions);
pragma solidity ^0.4.25;
/** @title IArbitrable
* Arbitrable interface.
* When developing arbitrable contracts, we need to:
* -Define the action taken when a ruling is received by the contract. We should do so in executeRuling.
* -Allow dispute creation. For this a function must:
* -Call arbitrator.createDispute.value(_fee)(_choices,_extraData);
* -Create the event Dispute(_arbitrator,_disputeID,_rulingOptions);
@n1c01a5
n1c01a5 / ballot.sol
Created March 29, 2019 18:16
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=true&gist=
pragma solidity >=0.4.22 <0.6.0;
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {
// deploy on 0x8194c987cdc3e66d926b1f2f691b9d3ea93a3d7f
pragma solidity ^0.4.24;
interface IArbitrable {
event MetaEvidence(uint indexed _metaEvidenceID, string _evidence);
event Dispute(Arbitrator indexed _arbitrator, uint indexed _disputeID, uint _metaEvidenceID, uint _evidenceGroupID);
pragma solidity ^0.5.5;
contract Arbitrator {
enum DisputeStatus {Waiting, Appealable, Solved}
modifier requireArbitrationFee(bytes memory _extraData) {
require(msg.value >= arbitrationCost(_extraData), "Not enough ETH to cover arbitration costs.");
_;
}
/* eslint-disable no-undef */ // Avoid the linter considering truffle elements as undef.
const {
expectThrow
} = require('openzeppelin-solidity/test/helpers/expectThrow')
const {
increaseTime
} = require('openzeppelin-solidity/test/helpers/increaseTime')
const ArbitrableTokenList = artifacts.require('./ArbitrableTokenList.sol')
const AppealableArbitrator = artifacts.require(