Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 { Contract, utils } from 'ethers' | |
import { getProvider } from './contracts' // https://docs.ethers.org/v5/api/providers/ | |
import L2ResolverAbi from './L2ResolverAbi.json' // https://gist.github.com/hughescoin/adf1c90b67cd9b2b913b984a2cc98de9 | |
const BASENAME_L2_RESOLVER_ADDRESS = '0xC6d566A56A1aFf6508b41f6c90ff131615583BCD' | |
const convertChainIdToCoinType = (chainId) => { | |
// L1 resolvers to addr | |
if (chainId === 1) { // 1 is mainnet chain id | |
return 'addr' | |
} |
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
//SPDX-License-Identifier: Unlicense | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; | |
import "@openzeppelin/contracts/utils/Strings.sol"; | |
import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; | |
contract HonorSystemNFT is ERC165 { |
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
$ cat genesis.json | jq '.app_state["staking"]["params"]["max_validators"]=125' > tmp_genesis.json && mv tmp_genesis.json genesis.json |
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 BALANCES_SHEET = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0]; | |
var WITHDRAWALS_SHEET = SpreadsheetApp.getActiveSpreadsheet().getSheets()[1]; | |
var DEPOSITS_SHEET = SpreadsheetApp.getActiveSpreadsheet().getSheets()[2]; | |
var OWNERS_SHEET = SpreadsheetApp.getActiveSpreadsheet().getSheets()[4]; | |
// Use this code for Google Docs, Forms, or new Sheets. | |
function onOpen() { | |
SpreadsheetApp.getUi() // Or DocumentApp or SlidesApp or FormApp. | |
.createMenu('Sheetcoin') | |
.addItem('View Balance', 'viewBalance') |
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
#!/bin/bash | |
rm -rf ~/.gaiacli | |
rm -rf ~/.gaiad | |
gaiad init mynode --chain-id testchain | |
gaiacli config keyring-backend file | |
(echo '1234567890'; echo '1234567890') | gaiacli keys add me | |
(echo '1234567890'; echo '1234567890') | gaiacli keys add you |
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
// Welcome! require() some modules from npm (like you were using browserify) | |
// and then hit Run Code to run your code on the right side. | |
// Modules get downloaded from browserify-cdn and bundled in your browser. | |
var utils = require('ethereumjs-util') | |
var ethSigUtil = require('eth-sig-util') | |
//var buffer = require('buffer') | |
//var Buffer = buffer.Buffer | |
//console.log(Buffer) | |
// everything comes from coinbsae wallet which uses web3 1.2.1 calling web3.eth.sign(msg, address) |
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
func purge_local_git_branches() { | |
red='\033[0;31m' | |
echo "${red}Purging local branches no longer found on remote..." | |
git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done | |
} |
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
query { | |
allCups( | |
first: 10, | |
condition: { deleted: false }, | |
orderBy: RATIO_ASC | |
filter: { | |
lad: { equalTo: "0x_address_goes_here" } | |
}) { | |
totalCount | |
pageInfo { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
NewerOlder