Skip to content

Instantly share code, notes, and snippets.

View novaknole's full-sized avatar

Giorgi Lagidze novaknole

View GitHub Profile
@novaknole
novaknole / setup.md
Last active May 15, 2025 09:03 — forked from bhouse/setup.md
YubiKey GPG + GitHub setup

Yubikey + GPG + Github + Keybase

The following guide are steps that can be used to generate GPG keys on a YubiKey, use the gpg keys to sign github commits, and publish the public gpg key to Keybase.

Why is this a good idea?

  1. Generating and storing GPG keys on a YubiKey allows the private key to be protected and ported between physical machines.
  2. Signing git commits adds an extra layer of verification that code changes originated from an trusted source.
  3. Using a YubiKey + touch-to-sign requires a physical presence to use the GPG signing key.
  4. GitHub supports restricting commits to a repo to only those that are signed.
  5. Putting a physical stamp on your code commits invokes a feeling of pride.
function hashMessage(address sender) internal pure returns(bytes32) {
bytes32 payloadHash = keccak256(abi.encode(sender, salt));
bytes32 messageHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", payloadHash));
return messageHash;
}
We create Genesis Contract, with 10,000 NFT's max. Users in the pre-sale mode can mint max 5, and in the public sale,
they can mint as many as they want, though, each mint transaction can mint max 20. So one user can mint 20 and
then call mint again and mint another 20.. When Genesis's public sale is done, we build another contract Called Stage2Airdrop
and depending on how many users bought on Genesis, we give them specific badge NFTs.
if user bought 5, we give him black ops badge NFT
Question 1: if user bought 10, we give him 2 black ops and if user bought 14,
we give him 2 black ops + 1 Special ops ? Is this correct assumption ?
If user has black ops badge id on Stage2Aidrop contract, he is always gonna have this.
/*
* SPDX-License-Identifier: GPL-3.0
*/
pragma solidity ^0.6.8;
pragma experimental ABIEncoderV2;
import "@aragon/govern-core/contracts/GovernRegistry.sol";
import "@aragon/govern-token/contracts/GovernTokenFactory.sol";
pragma solidity ^0.6.8;
contract Finance {
address owner;
constructor() public {
owner = msg.sender;
jobs:
deploy-govern-console:
runs-on: ubuntu-latest
container: fleek/create-react-app:node-15
name: deploys to rinkeby/mainnet depending on the branch
steps:
- uses: actions/checkout@v2
- name: Install dependencies and build the project
run: yarn && yarn build
working-directory: packages/govern-core
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
import {
ethereum,
JSONValue,
TypedMap,
Entity,
Bytes,
Address,
BigInt
# Do not edit subgraph.yaml,this is a generated file.
# Instead, edit subgraph.template.yaml and run `yarn manifest-<network>-[staging]`
specVersion: 0.0.2
description: A template for Aragon subgraphs
repository: https://github.com/aragon/govern
schema:
file: ./schema.graphql
dataSources:
#Govern Registry
# GovernRegistry
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract ContractTest {
bytes public byteParam;
function setBytes(bytes memory param) public {
byteParam = param;
pragma solidity 0.5.17;
import '../interfaces/ApproveAndCallReceiver.sol';
import '../interfaces/ILockManager.sol';
import '../interfaces/IGuardiansRegistry.sol';
import '../interfaces/IERC20.sol';
import '../ANTv2MultiMinter.sol';
contract ANJLockMinter is ApproveAndCallReceiver, ILockManager {