분류 전체보기
-
[Blockchain] on ramp와 off rampBlockChain/Blockchain 2024. 9. 25. 21:47
Hook에 대해서 알아보다가 onRamp라는 단어를 처음 접했다. on ramp는 유저가 본인의 지갑으로 법정 화폐(flat)을 토큰으로 교환하는 과정 off ramp는 유저가 은행계좌를 대상으로 토큰을 법정 화폐로 교환하는 과정 즉자신의 지갑으로 현금이 토큰이 되면 온램프자신의 지갑의 토큰을 통장으로 현금화 시키면 off ramp라는 것이다. 즉 이러한 램프 서비스를 지원하는 기업들이 있다. Moonpay가 대표적이다.그러나 우리나라 카드는 절대 거래가 되지 않는다. ㅠㅠ
-
[Solidity/openzeppelin] AddressUpgradeableBlockChain/solidity 2024. 9. 25. 21:46
pragma solidity ^0.8.1;library AddressUpgradeable { function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } function sendValue(a..
-
[solidity/openzepplin] initializable.sol 분석BlockChain/solidity 2024. 9. 25. 21:44
몇 줄이 안되지만 필요하다.변수명 설명uint8 private_initialized초기화가 되었는지 기본 0bool private_initializing초기화하는 중인지 기본 falsepragma solidity ^0.8.2;import "../../utils/AddressUpgradeable.sol";abstract contract Initializable { uint8 private _initialized; bool private _initializing; event Initialized(uint8 version); modifier initializer() { bool isTopLevelCall = !_initializing; require( ..
-
[solidity] Tokenvesting 분석BlockChain/solidity 2024. 9. 25. 21:43
https://github.com/abdelhamidbakhta/token-vesting-contracts/blob/main/contracts/TokenVesting.sol 여기 있는 소스를 분석하도록 하겠다. 대표적인 token-vesting 즉, 토크노믹스에 나오는 allocation을 자동으로 할당해주는 컨트랙트이다. # 1. 변수들 정리VestingSchedule이라는 구조체가 있다. 형태이름역할boolinitialized초기화 진행되었는지 여부addressbeneficiaryrelease된 후 토큰 수령 주소uint256cliff클리프 타임스탬프uint256start베스팅 기간 시작하는 타임스탬프uint256durationVesting기간 얼마만큼 설정할거냐uint256slicePeriodS..
-
[Flutter] local push notification 되게 하기Flutter 2024. 9. 24. 04:06
IOS에서는 로컬 푸쉬 알람이 뜨는데 안드로이드에서 안 되어서 한참 헤맸다. 결국 되게 했는데, chatgpt를 믿기보다는 google 검색을 통한 것이 훨씬 도움이 된다. 레거시 소스가 많으면 chatgpt가 도움이 되지만 flutter에 대한 최신 자료 및 오류들은 chatgpt가 처음엔 효율이 좋으나 기능이 막히면 결코 효과적이지 못하다는 것을 다시 한 번 깨닫는다. 이건 버전때문에 오류가 나는 것이라고 생각되면 chatgpt 보다는 google 검색을 하도록 하자. 한참을 고생했다. await _flutterLocalNotificationsPlugin.zonedSchedule( 0, 'TEST', 'TEST MESSAGE', tz.TZDateTime.now(tz.local..