View demo.ts
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 { Sequelize } from "sequelize"; | |
import { getPostgresStore } from "@connext/store"; | |
import { connect as connext } from "@connext/client"; | |
import { | |
ColorfulLogger, | |
getTestReceiptToSign, | |
getTestVerifyingContract, | |
signReceiptMessage, | |
} from "@connext/utils"; | |
import { |
View prysm-digitalocean-setup
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
# VM Specs | |
- Ubuntu 4GB RAM | |
- 20GB HD | |
# Prerequisites | |
- Docker | |
```sh | |
$ curl -fsSL https://get.docker.com -o get-docker.sh | |
$ sudo sh get-docker.sh |
View node-queries.sql
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
-- GET NODE FREE BALANCE ACROSS ALL CHANNELS FOR TOKEN | |
SELECT ("latestState" #> '{balances}' -> ( | |
SELECT array_position( | |
array( | |
SELECT jsonb_array_elements_text("latestState" #> '{tokenAddresses}')), | |
'0xEcFcaB0A285d3380E488A39B4BB21e777f8A4EaC' -- TOKEN ADDRESS | |
)::integer - 1 | |
) #> '{0,amount,_hex}') | |
FROM channel INNER JOIN app_instance | |
ON app_instance."channelMultisigAddress" = channel."multisigAddress" |
View machine.js
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
View admin.ts
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 { connect } from "ts-nats"; | |
import { StateChannelJSON, toBN, CoinTransfer } from "@connext/types"; | |
import { Zero, AddressZero } from "ethers/constants"; | |
import { formatEther } from "ethers/utils"; | |
type FreeBalanceAppState = { | |
activeApps: any[]; | |
tokenAddresses: string[]; | |
balances: CoinTransfer[][]; | |
}; |
View counter.ts
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 { ethers } from "@nomiclabs/buidler"; | |
import { Signer, Wallet } from "ethers"; | |
import chai from "chai"; | |
import { deployContract, solidity } from "ethereum-waffle"; | |
import CounterArtifact from "../artifacts/Counter.json"; | |
import { Counter } from "../typechain/Counter"; | |
chai.use(solidity); | |
const { expect } = chai; |
View WeenusToken.sol
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
pragma solidity ^0.6.0; | |
// Send an 0 value transaction with no data to mint 1,000 new tokens | |
// | |
// Symbol : DAI | |
// Name : Dai Stablecoin System | |
// Total supply: 1,000,000.000000000000000000 + faucet minting | |
// Decimals : 18 | |
// Version : 1 | |
// Chain ID : 4 |
View 3Box
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
3Box is a social profiles network for web3. This post links my 3Box profile to my Github account! | |
✅ did:muport:QmZZQ3eTyyxKXyGv7GLdHGQWFg3BthznK9UeTGFaWdHpVw ✅ | |
Create your profile today to start building social connection and trust online. https://3box.io/ |
View MockDai.sol
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
pragma solidity ^0.5.2; | |
/** | |
* @title Roles | |
* @dev Library for managing addresses assigned to a Role. | |
*/ | |
library Roles { | |
struct Role { | |
mapping (address => bool) bearer; | |
} |
View MolochFlat.sol
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
pragma solidity 0.5.3; | |
// produced by the Solididy File Flattener (c) David Appleton 2018 | |
// contact : dave@akomba.com | |
// released under Apache 2.0 licence | |
// input /Users/rahul/Desktop/connext/connext/moloch-monorepo/packages/moloch/contracts/Moloch.sol | |
// flattened : Friday, 08-Feb-19 19:41:10 UTC | |
library SafeMath { | |
/** | |
* @dev Multiplies two unsigned integers, reverts on overflow. | |
*/ |
NewerOlder