Skip to content

Instantly share code, notes, and snippets.

View fielding's full-sized avatar
🙊

Fielding Johnston fielding

🙊
View GitHub Profile
@fielding
fielding / contracts...MasterNodeFund.sol
Created June 1, 2023 04:00
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.8.18+commit.87f61d96.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@identity.com/gateway-protocol-eth/contracts/Gated.sol";
import "./MasterNodeFundCertificate.sol";
contract MasterNodeFund is Gated, MasterNodeFundCertificate {
@fielding
fielding / .deps...npm...@identity.com...gateway-protocol-eth...contracts...Gated.sol
Created June 1, 2023 03:40
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.8.18+commit.87f61d96.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import {IGatewayTokenVerifier} from "./interfaces/IGatewayTokenVerifier.sol";
contract Gated {
address private _gatewayTokenContract;
uint256 private _gatekeeperNetwork;
/// The gateway token is not valid.
@fielding
fielding / worker-inline-css.js
Last active January 16, 2022 22:47 — forked from Nooshu/worker-inline-css.js
Use a CF worker to add inline CSS to the head.
// set the site we are modifying
const site = 'www.example.com';
// do this on a fetch
addEventListener('fetch', event => {
const request = event.request
const url = new URL(request.url)
event.respondWith(handleRequest(request))
});
@fielding
fielding / wut.js
Last active May 1, 2020 17:13
potent snipped from dashboard
// was
if (isEmbedsLoading && !isEmbedsLoading) {
this.handleResetLocalChanges();
}
// probably the intended
if (isEmbedsLoading && !prevProps.isEmbedsLoading) {
this.handleResetLocalChanges();
}
function getPageName(url) {
var index = url.lastIndexOf("/") + 1;
var filenameWithExtension = url.substr(index);
var filename = filenameWithExtension.split(".")[0];
return filename;
}
var url = window.location.href;
var fileName = getPageName(url);
@fielding
fielding / store.js
Created October 30, 2019 02:50
blah
// this is @Lukeed's 'sublet' with some small changes to allow for automatic dependency tracking as well as
// explicit registering of change effects
// prob should use a weakMap for these
const reactionsMap = {};
const contextMap = {};
let ctx;
export const setContext = id => {
ctx = id;

QA Tasks

complete

  • multiple timer events on promo cards
  • screen from wallet to profile doing that weird dance
  • wallet graph being visible on the profile screen
  • graph date selectors being visible when transactions are extended ( that is actually according to the mockup, but I had planned to fix that)
  • smooth out transactions extending thing
const Info = ({ title, img, alt, message, details, className, buttonText = 'Done', handleClick = () => {} }) => (
<div className={className !== undefined ? `${styles['acc__info']} ${styles[className]}` : styles['acc__info']}>
<h2>{title}</h2>
<div className={styles.card}>
<div className={styles['acc__info__container']}>
<img src={img} alt={alt} />
</div>
<h4>{message}</h4>
<p>{details}</p>
</div>
This file has been truncated, but you can view the full file.
[
{
"id": 5402626308964352,
"name": "A.J. Applegate",
"nickNames": [],
"imageKeyIds": [
4659648506363904,
5653361667866624,
6170424375246848,
6560949142028288,
[
{
"name": "Chongqing",
"country": "China",
"displayName": "Chongqing (China)"
},
{
"name": "Shanghai",
"country": "China",
"displayName": "Shanghai (China)"