Skip to content

Instantly share code, notes, and snippets.

View fabdarice's full-sized avatar

fabda fabdarice

View GitHub Profile
@fabdarice
fabdarice / gist:06498b3a5bdc93f920116b8091096900
Created October 17, 2021 03:32
NFT Drop - Best Practices
##NFT Drop - Best Practices
Every successful NFT projects start with a great idea, great artists, an amazing team, and a dedicated, enthused community.
But one aspect that most NFT projects tend to neglect is the minting process.
As someone participating in a dozen drops weekly, I often witness NFT drops that end up with the majority of the faithful community members wasting hundreds of dollars (or thousands) on gas, being front-run by bots (like mine), and with a distribution of the supply being lower than 30% ownership.
If you have 50K discord members, and a 10K supply, even team should aim for a distribution as close to 100% ownership as possible.
Building a successful NFT drop is difficult; You have to think like those bots, think one or two steps ahead and lay traps for them.
@fabdarice
fabdarice / gist:bac9cf81905f0d4a2dba45786e3223af
Created November 22, 2020 14:56
Own Validator Inclusion Distance
{
"alert": {
"alertRuleTags": {},
"conditions": [
{
"evaluator": {
"params": [
3
],
"type": "gt"
@fabdarice
fabdarice / gist:9b88e47952023d5078a3cb91b6cf21c5
Created November 22, 2020 14:56
Network Inclusion Distance
{
"cards": {
"cardPadding": null,
"cardRound": null
},
"color": {
"cardColor": "#b4ff00",
"colorScale": "sqrt",
"colorScheme": "interpolateBlues",
"exponent": 0.5,
event Debug(bytes32 message, uint8 v, bytes32 r, bytes32 s, address to, uint256 value);
function transferWithSignature(bytes32 _hashMessage, uint8 _v, bytes32 _r, bytes32 _s, address _to, uint256 _value) public onlyOwner {
Debug(_hashMessage, _v, _r, _s, _to, _value);
}
// This outputs :
Debug(message: 0x592fa743889fc7f92ac2a37bb1f5ba1daf2a5c84741ca0e0061d243a2e6707ba, v: 27, r: 0x410d09389efb07d5930183062324305b4891f48920d40afb1ea4c9f127f6c5c3, s: 0x5f5cff84353dbce91769da597b9e2314bf5a8140620f09ce1eb3e4bd25d3afa4, to: 0x0000000000000000000000000000000000000000, value: 1.117485660423987862439666034562377252282925994837e+48)
@fabdarice
fabdarice / node-nexus.json
Last active April 10, 2018 00:09
Nexus Network
{
"count": 10785236,
"photos": [{
"photo_id": 27932,
"photo_title": "Atardecer en Embalse",
"photo_url": "http://www.panoramio.com/photo/27932",
"photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/27932.jpg",
"longitude": -64.404945,
"latitude": -32.202924,
"width": 500,
pragma solidity ^0.4.17;
import './MedicalRecord.sol';
contract Hospital {
MedicalRecord public medicalRecord;
struct Patient {
bytes32 fullName;
bool access;
import './MedicalRecord.sol';
contract Hospital {
MedicalRecord public medicalRecord;
function Hospital(address _contract) public {
medicalRecord = MedicalRecord(_contract);
}
function enterHospital(bytes32 _fullName) public {
@fabdarice
fabdarice / Dispatcher.sol
Created February 7, 2018 07:35
OldContract
pragma solidity ^0.4.4;
/**
* The dispatcher is a minimal 'shim' that dispatches calls to a targeted
* contract. Calls are made using 'delegatecall', meaning all storage and value
* is kept on the dispatcher. As a result, when the target is updated, the new
* contract inherits all the stored data and value from the old contract.
*/
import './Upgradeable.sol';
contract Dispatcher is Upgradeable {
0x08b41D8A406F941126fc1D15eCe163fbFA113d54
@fabdarice
fabdarice / Contract Verification & Publication
Last active August 23, 2022 10:30
Useful Solidity/Web3/Truffle commands
1) go to https://ropsten.etherscan.io/verifyContract?a=0xa32b21ba14fd476757e392db5d1bbc833eaedaf5
2) enter contract address, name, compiler
3) copy code of contract flatten out (delete import and replace by actual code)
4) truffle console
5) var Eth = require('ethjs')
6) Eth.abi.encodeParams(["uint256", "uint256", "uint256", "address", "uint256"], ["1508105298", "1508710098", "200", "0x3d208fabaf7e919985d5d2f068f28d6a9022e8d5", "5000000000000000000000000000"])
7) copy paste result of encodeParams without '0x'