Skip to content

Instantly share code, notes, and snippets.

View kartojal's full-sized avatar

kartojal kartojal

View GitHub Profile
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreih72rbpgxn76dliagy4bcwwdtxr3g3i4onpbzdf5dbf5lqtxhsosm ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@kartojal
kartojal / 3box.txt
Created February 29, 2020 22:17
3box.txt
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreif4xosce7tohc2fih3eifdqdidexfnf2ttixe7h3dmm2nugimnhxu ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreif4xosce7tohc2fih3eifdqdidexfnf2ttixe7h3dmm2nugimnhxu ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@kartojal
kartojal / ballot.sol
Created August 20, 2019 18:18
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.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.6.0;
contract Ballot {
bytes32 test;
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
0xF4bd0ed7bdC435b08457bDC307D6A300B81992d0
@kartojal
kartojal / SimpleStaker.sol
Created September 28, 2018 19:19
Simple Staker ERC20
pragma solidity ^0.4.24;
import "https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
/**
* @title SimpleStaker
*
* Smart contract for staking ERC20 tokens, enabling an organization to track externally the deposits and withdrawals of his users via Events.
* The user needs to approve this smart contract to move the tokens to the smart contract balance. Once the user make the deposit,
### Keybase proof
I hereby claim:
* I am kartojal on github.
* I am kartojal (https://keybase.io/kartojal) on keybase.
* I have a public key whose fingerprint is F9C6 9024 37EA 0603 5455 48E4 B98E F45A 7F52 5DB3
To claim this, I am signing this object:
@kartojal
kartojal / index.js
Last active August 3, 2017 08:10
requirebin sketch
// qs library code url (Javascript) https://github.com/ljharb/qs/tree/master/lib
var qs = require('qs');
var obj = {"some": {"depth": {"object": "hello world"}}, "a_number":123, "a_string": "Richard"};
var convertedToQueryString = qs.stringify(obj);
document.getElementById('box1').value = JSON.stringify(obj, null, 2);
document.getElementById('box2').value = convertedToQueryString; // ready for url
@kartojal
kartojal / index.js
Last active August 3, 2017 08:03
requirebin sketch
var qs = require('qs');
var obj = {
"some": {
"depth": {
"object": "hello world"
}
},
"a_number":123,
"a_string": "Richard"