Skip to content

Instantly share code, notes, and snippets.

View hskang9's full-sized avatar
🏠
Working from home

Hyungsuk Kang hskang9

🏠
Working from home
View GitHub Profile
import { Web3Button, useWeb3Modal } from "@web3modal/react";
import { useState, useEffect } from "react";
import Or from "components/signin/Or";
import Welcome from "components/signin/Welcome";
import { useRouter } from "next/router";
import { useAccount } from "wagmi";
function IndexPage() {
// open modal in first connections
use std::io::{Error, ErrorKind};
use std::str::FromStr;
use std::collections::HashSet;
use std::convert::TryInto;
const WIDTH : usize = 9;
const GRID_SIZE : usize = WIDTH * WIDTH;
#[derive(Debug, PartialEq)]
# Install Cargo contract
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
# Arch Linux
if [ -f "/etc/arch-release" ]; then
pacman -S binaryen
cargo install cargo-dylint dylint-link
cargo install --force --locked cargo-contract
# Debian/Ubuntu
elif [ -f "/etc/debian_version" ]; then
apt-get install -y binaryen
@hskang9
hskang9 / proof2.sol
Created October 22, 2021 19:06
frontier EVM cannot inherit library for interface
// SPDX-License-Identifier: Apache-2.0
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
@hskang9
hskang9 / proof.sol
Created October 22, 2021 18:56
frontier evm cannot compile array of interface
// SPDX-License-Identifier: Apache-2.0
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
@hskang9
hskang9 / AnyswapV5ERC20.sol
Created October 13, 2021 04:47
Anyswap + Astar bridge Compatible token
// SPDX-License-Identifier: Apache-2.0
import "@openzeppelin/contracts/access/AccessControl.sol";
pragma solidity ^0.8.2;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
@hskang9
hskang9 / pos_test_keys
Last active March 10, 2021 19:00
Pos integration node keys
PoS-1
Secret phrase `climb program start trust year leg lift exile merge spell involve brave` is account:
Secret seed: 0xf5d2f243c96ba900b284e89246a672ad5d00bef0d01821f98790cc6cd736543b
Public key (hex): 0x02266a7d2bbd20b690d6bced0a572d47d1523342e6c71f41a5fdbb8a1caed36e
Account ID: 0x02266a7d2bbd20b690d6bced0a572d47d1523342e6c71f41a5fdbb8a1caed36e
SS58 Address: 5C7XN7dhNDfiedUpzqD9MrvQ6XBV8AYUvwYX8n8ZTmzSrt7c
PoS-2
Secret phrase `grace sudden public step process midnight slender toast head combine later cheap` is account:
@hskang9
hskang9 / pos_installation.sh
Last active November 17, 2020 08:15
PoS node setup
sudo apt update
# May prompt for location information
sudo apt install -y cmake pkg-config libssl-dev git build-essential clang libclang-dev curl nginx
# Install Rust
curl https://sh.rustup.rs -sSf | sh -s -- -y
source ~/.cargo/env
rustup install nightly-2020-09-20
rustup toolchain install nightly-2020-09-20
rustup target add wasm32-unknown-unknown --toolchain nightly-2020-09-20
#!/usr/bin/python3
import random
random.seed(1)
# Translators
members = ["Hyungsuk Kang", "Denise Kim", "ge su", "JHH"]
# Assignments board
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
// This class is the configuration for the state. It holds the values (in this
// case the title) provided by the parent (in this case the App widget) and
// used by the build method of the State. Fields in a Widget subclass are