Skip to content

Instantly share code, notes, and snippets.

View Jeongseup's full-sized avatar
🏃‍♂️
Running

Jeongseup Jeongseup

🏃‍♂️
Running
View GitHub Profile
@Jeongseup
Jeongseup / hello_world.sol
Created December 14, 2021 09:05
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.10+commit.fc410830.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// compiler version must be greater than or equal to 0.8.10 and less than 0.9.0
pragma solidity ^0.8.10;
contract HelloWorld {
string public greet = "Hello World!";
}
@Jeongseup
Jeongseup / first_app.sol
Created December 14, 2021 09:10
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.10+commit.fc410830.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
contract Counter {
uint public count;
// Function to get the current count
function get() public view returns (uint) {
return count;
}
pragma solidity ^0.4.16;
contract owned {
address public owner;
function owned() public {
owner = msg.sender;
}
modifier onlyOwner {
@Jeongseup
Jeongseup / httpget.go
Created January 13, 2023 03:27 — forked from kylelemons/httpget.go
Send a bunch of HTTP requests via threads and goroutines
package main
import (
"fmt"
"http"
"flag"
"runtime"
"bytes"
"log"
)
pragma circom 2.1.4;
template Num2Bits(nBits) {
signal input x;
signal output b[nBits];
for (var i = 0; i < nBits; i++) {
b[i] <-- x \ (2 ** i) % 2;
}
@Jeongseup
Jeongseup / prometheus-async-custom-exporter.go
Created August 8, 2023 05:11
prometheus async custom exporter
package main
import (
"fmt"
"log"
"net/http"
"time"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
@Jeongseup
Jeongseup / deubg_test.go
Created November 2, 2023 15:06
Cosmos SDK Study - How to parse each validators pubkey to their address
// 1. git clone https://github.com/cosmos/cosmos-sdk.git
// 2. add a new debug_test.go file
// 3. copy this code in your test file
// run test code
// reference: https://github.com/cosmos/cosmos-sdk/blob/main/client/debug/main.go
package debug
import (
@Jeongseup
Jeongseup / memo.md
Created December 2, 2023 08:12
How to understand Chainlink CCIP

https://github.com/smartcontractkit/ccip/blob/ccip-develop/contracts/src/v0.8/ccip/offRamp/EVM2EVMOffRamp.sol#L248C15-L248C15

체인링크 노드로부터 어떤 사이너가 offlamp란 컨트랙트 콜을 함.

offlamp 에 콜이 들어오면 전달 받은 데이터를 해석해서 2가지 일을 함.

  1. execute -> 실제 온체인 데이터 업데이트 (누구에게 토큰을 실제로 보내는 역할)
  2. trailExecute & sendMessage -> 업데이트한 내용 or 전달받은 데이터를 receive하는 개발자들이 사용할 컨트랙트쪽으로 쏴주는 역할
set your private key and validator address as a env. (If you don't know where your private key is, it is in a file called validator.key. or it should also be included in the mail you received during onboarding. )
PRIVATE_KEY="PUT YOUR PRIVATE KEY HERE"
VAL_ADDRESS="PUT YOUR VALIDATOR ADDRESS HERE"
All steps are necessary.
- Step 1
@Jeongseup
Jeongseup / Golang Anypb Testing Code
Last active March 5, 2024 05:56
Golang Anypb Testing Code
# Reademe