Skip to content

Instantly share code, notes, and snippets.

View cylim's full-sized avatar
👻
Enjoying life ~

CY Lim cylim

👻
Enjoying life ~
View GitHub Profile
@cylim
cylim / combineTokens.js
Created July 22, 2022 03:31
Combine Coingecko ID and Alchemy Top 100 ERC20 tokens
This file has been truncated, but you can view the full file.
// DATA from coingecko coins/list
// https://api.coingecko.com/api/v3/coins/list?include_platform=true
const list = [{ "id": "01coin", "symbol": "zoc", "name": "01coin", "platforms": {} }, { "id": "0-5x-long-algorand-token", "symbol": "algohalf", "name": "0.5X Long Algorand", "platforms": { "ethereum": "" } }, { "id": "0-5x-long-altcoin-index-token", "symbol": "althalf", "name": "0.5X Long Altcoin Index", "platforms": { "ethereum": "" } }, { "id": "0-5x-long-ascendex-token-token", "symbol": "asdhalf", "name": "0.5X Long AscendEx", "platforms": { "ethereum": "" } }, { "id": "0-5x-long-bitcoin-cash-token", "symbol": "bchhalf", "name": "0.5X Long Bitcoin Cash", "platforms": { "ethereum": "" } }, { "id": "0-5x-long-bitcoin-token", "symbol": "half", "name": "0.5X Long Bitcoin", "platforms": { "ethereum": "" } }, { "id": "0-5x-long-cardano-token", "symbol": "adahalf", "name": "0.5X Long Cardano", "platforms": { "ethereum": "" } }, { "id": "0-5x-long-chainlink-token", "symbol": "linkhalf", "name": "0.5X Long Chainli
const ONEUtil = require('./util')
const EventMessage = require('./event-message')
const EventMaps = require('./events-map.json')
const axios = require('axios')
// Different smart contract, different address, used to determined whether it is.
const CONTRACT_ADDRESS = ['one1erxse89x3wzn7uu30smwjfm8wz5d3e8quuvkgq', 'one1wsawrzv304dhvt8dh3gl438qckklgvfjgx2xj4']
const getTx = async (hash) => {
const { data } = await axios.post('https://api.s0.t.hmny.io', {
jsonrpc: '2.0',
@cylim
cylim / 3box
Created November 11, 2021 16:56
did:3:kjzl6cwe1jw147p5pv7e4991qifddqj7izpyza72od6qietg3r8tmad5v5o3ba0
did:3:bafyreibga6edpuk3trnsv7j27exd2o6tjedscx4cs4yiezh2rdbwvzr3se
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:muport:QmToyiQikvz6MA3n28bXnyYYbReFq6FnhVwdMUTgCbPHtU ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
Verifying my Blockstack ID is secured with the address 16uL3oqtF9FbNgzjTtmnSXzPyijBEBCKKN https://explorer.blockstack.org/address/16uL3oqtF9FbNgzjTtmnSXzPyijBEBCKKN
packager your.package.name;
import android.app.Application;
import android.os.Process;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
public class ExitManagerModule extends ReactContextBaseJavaModule {
@cylim
cylim / ExitManager.h
Last active April 8, 2019 03:35
Exit Manager for React Native ios
#import <React/RCTBridgeModule.h>
@interface ExitManager : NSObject <RCTBridgeModule>
@end
@cylim
cylim / Blockchain.py
Created September 27, 2018 08:12
simple blockchain by codeacademy
from block import Block
class Blockchain:
def __init__(self):
self.chain = []
self.unconfirmed_transactions = []
self.genesis_block()
def genesis_block(self):
transactions = []