Skip to content

Instantly share code, notes, and snippets.

View Nipol's full-sized avatar
😎

yoonsung.eth Nipol

😎
View GitHub Profile
@Nipol
Nipol / attestation.txt
Created March 28, 2021 01:14
zkparty phase2 tusted setup MPC contribution summary
{
"ceremony": "zk_transaction_1_1",
"ceremonyId": "hIfLWePJPn6ldES7OZjB",
"time": "2021-03-28T01:14:51.063Z",
"contributionNumber": 126,
"hash": "31061992 52423d61 ce6b8ab5 4ea0696a\n 45a4da69 0234ca50 369843a6 0786b23c\n 1ed328e8 6f1aec82 a8241b67 bb0d5f62\n 8bec6e1f 9d9caa77 b1474312 ddd86108\n"
}
@Nipol
Nipol / Beacon.sol
Created March 12, 2021 14:11
Beacon Sample like 1167
pragma solidity ^0.8.2;
contract Beacon {
fallback() external payable {
(bool ok, bytes memory returnData) = address(0xD80a28B303b54bD892EC30a607F60Ff725D25389).staticcall("");
require(ok, string(returnData));
address implementation = abi.decode(returnData, (address));
function newManager(
string calldata tokenName,
string calldata tokenSymbol,
uint256 mintingAmount,
uint256 requireAmount,
uint256 burningAmount
) external payable {
// eth value
uint256 value = msg.value;
// token making

Keybase proof

I hereby claim:

  • I am nipol on github.
  • I am yoonsung (https://keybase.io/yoonsung) on keybase.
  • I have a public key ASASlKV9VzAEUCG8uxfllU500lpn1s3T6J_qFSGF1P0-_Qo

To claim this, I am signing this object:

...
"properties": {
"image": "parity/parity:stable",
"command": ["--no-ipc", "--no-warp", "--no-serve-light", "--min-peers=99", "--max-peers=100", "--pruning-memory=128", "--cache-size=8192"],
"ports": [
...
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"containerGroups_parity_name": {
"defaultValue": "paritysync",
"type": "String"
}
},
"variables": {},
pragma solidity ^0.5.0;
contract ERC1271 {
// bytes4(keccak256("isValidSignature(bytes,bytes)")
bytes4 constant internal MAGICVALUE = 0x20c13b0b;
/**
* @dev Should return whether the signature provided is valid for the provided data
* @param _data Arbitrary length data signed on the behalf of address(this)
* @param _signature Signature byte array associated with _data
function _setTimelock(
bytes4 functionSelector, bytes memory arguments, uint256 extraTime
) internal {
// Ensure that the specified extra time will not cause an overflow error.
require(extraTime < _A_TRILLION_YEARS, "Supplied extra time is too large.");
// Get timelock ID using the supplied function arguments.
bytes32 timelockID = keccak256(abi.encodePacked(arguments));
// For timelock interval or expiration changes, first drop any existing
function takeAdminAction(
AdminActionType adminActionType, uint160 argument, bytes calldata signatures
) external {
_verifyOrderedSignatures(
KeyType.Admin,
_getAdminActionID(
adminActionType, argument, _nonce
).toEthSignedMessageHash(),
signatures
);
function _deployNewKeyRingIfNeeded(
address userSigningKey, address expectedKeyRing
) internal returns (address keyRing) {
// Only deploy if a key ring doesn't already exist at the expected address.
uint256 size;
assembly { size := extcodesize(expectedKeyRing) }
if (size == 0) {
// Get initialization calldata using the initial user signing key.
bytes memory initializationCalldata = _constructInitializationCalldata(
userSigningKey