Skip to content

Instantly share code, notes, and snippets.

View junhoyeo's full-sized avatar
🏴‍☠️

Junho Yeo junhoyeo

🏴‍☠️
View GitHub Profile
https://apple.stackexchange.com/questions/265445/terminal-safari-cannot-resolve-host-but-chrome-can-connect
// Decompiled by library.dedaub.com
// 2024.03.03 03:26 UTC
// Compiled using the solidity compiler version 0.8.23
// Data structures and variables inferred from the use of storage instructions
uint256 _getCirculatingSupply; // STORAGE[0x1]
uint256 stor_2; // STORAGE[0x2]
uint256 stor_0_0_2; // STORAGE[0x0] bytes 0 to 2
mapping (uint256 => struct_1412) map_3; // STORAGE[0x3]
const asyncFlatMap = async <T extends any, U extends any>(
array: T[],
callback: (value: T, index: number, array: T[]) => Promise<[] | U | U[]>,
): Promise<U[]> => {
const result = await Promise.all(array.map(callback));
return result.flat() as U[];
};
const handler = () => {}
// params should be serialized key?
const [pages, setPages] = useState()
useEffect(() => {
while (cursor) {
const { data, cursor } = requester(params)
setPages(prev => [...prev, data])
}
}, [params])

Q. 왜 OHM(자체 토큰)을 바로 스테이킹하지 않고 sOHM으로 바꿔 스테이킹하나요?

OHM 을 스테이킹하면, sOHM 을 주는 게 맞을걸요! 보통 우리가 스테이킹을 하면, 스마트 컨트랙트 안의 상태로 “스테이킹 했다는 사실”이 기록되는데요(ex> { “주노”: 50 OHM, “이든”: 100 OHM } 대충 뭐 이런식). 그런데 이 구현의 문제는, 이렇게 하면 주노가 스테이킹된 50옴을 그대로 양도할 수 없어요(=유동화를 못해요, 여기에도 unstaking period 가 있는지는 모르겠는데, 오스모를 스테이킹 한 기간 동안은 그걸 팔거나 이관하지 못하잖아요?). 그래서 OlympusDAO 에서는 스테이킹한 사람들에게 sOHM 이라는 토큰을 발행해주고, “나중에 다시 가져오면 OHM으로 바꿔줄게!” 하는 거예요. 약간 채권같은거죠!!

간단한 예시: 앵커 (앵커에 UST를 Deposit(사실상 Staking) 하면, 그 증표로 aUST를 주잖아요!)

var param = "chapterNo=0101&current_frame_count=1&currentPosition="+ 13245+'&courseCd=HLSC60332&takeCourseSeq=40116154&_'+$.now();
$.get('ProgressSave.aspx',param,function(data){
if(data=="N"){
alert('다른 위치에서 로그인 되었습니다. 학습이 종료되며 로그아웃됩니다.');
top.close();
}
});
if target.respond_to?(:source_build_phase) == true
source_files = target.source_build_phase.files
dummy = source_files.find do |file|
file.file_ref.name == 'GCDAsyncSocket.m'
end
if dummy != nil
puts target.name
end
@junhoyeo
junhoyeo / git-branch-deleteall
Last active January 18, 2022 18:37
Remove all branches
git branch | grep -v "main" | xargs git branch -D
@junhoyeo
junhoyeo / router.ts
Created December 7, 2021 10:41
Remove query parameter from current route
export const removeQueryParameter = (name: string) => {
const params = new URLSearchParams(location.search)
params.delete(name)
history.replaceState(null, '', '?' + params + location.hash)
}
const Terminal = () => {
return (
<TerminalContainer>
<TerminalControls>
<Control style={{ backgroundColor: '#FF5F56' }} />
<Control style={{ backgroundColor: '#FFBD2E' }} />
<Control style={{ backgroundColor: '#27C93F' }} />
</TerminalControls>
<TerminalCommand>yarn add @frogress/line</TerminalCommand>