Skip to content

Instantly share code, notes, and snippets.

View rfikki's full-sized avatar

Rocky Fikki rfikki

View GitHub Profile
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/**
* @title Interface for the external CurrencyCoin contract.
* @dev This interface defines the functions that the WrappedCurrencyCoin contract
* will call on the original 2015 Currency.sol contract.
@rfikki
rfikki / gist:80703762d5e836790215a8421df9e6d5
Created July 4, 2025 18:44 — forked from simondlr/gist:45f0c8024a88d8dc54f8
Standard Token Contract on Ethereum
//Most, basic default, standardised Token contract.
//Based on standardised APIs & slightly extended. https://github.com/ethereum/wiki/wiki/Standardized_Contract_APIs
//adds AddressApproval & AddressApprovalOnce events
//approve & approveOnce works on premise that approved always takes precedence.
//adds unapprove to basic coin interface.
contract Coin {
function sendCoin(uint _value, address _to) returns (bool _success) {}
function sendCoinFrom(address _from, uint _value, address _to) returns (bool _success) {}
function coinBalance() constant returns (uint _r) {}
@rfikki
rfikki / WrappedCurrencyCoin.sol
Created June 18, 2025 21:55
WrappedCurrencyCoin wrapper for 2015 currency.sol located here: 0x8494F777d13503BE928BB22b1F4ae3289E634FD3
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface CurrencyCoin {
function coinBalanceOf(address _owner) external returns (uint256);
function sendCoin(uint256 _amount, address _receiver) external;
Contract at 0x318143cFd742FB637f4833FF0EAfEe66c9a35327
Created: (Aug-25-2015 02:58:28 AM UTC)
Solidity version: 0.1.3-0/.-/clang/int linked to libethereum-0.9.92-0/.-/clang/int
Change to: v0.1.3+commit.028f561d tested on 3.5
Text Wrap Enable Optimization
https://chriseth.github.io/browser-solidity/#version=soljson-v0.3.5+commit.5f97274a.js&optimize=true
Bytecode:
@rfikki
rfikki / Currency.sol
Created February 15, 2025 14:35
Source Verification for Etherscan.io Contract: 0x8494F777d13503BE928BB22b1F4ae3289E634FD3
// Submitted to Etherscan.io for verification for contract at 0x8494F777d13503BE928BB22b1F4ae3289E634FD3
/* rfikki was here in 2015 */
contract currency {
struct Account {
uint balance;
mapping ( address => uint) withdrawers;
}
@rfikki
rfikki / FinneyDonationGamble
Created January 11, 2025 14:35 — forked from FrankHold/FinneyDonationGamble
Ethereum Contract 0x233820087a752349ee20daab1c18e0b7c546d3f6 : Finney Donation Gamble - Solidity
// Doku see https://drive.google.com/file/d/0Bzjj9RC5wV6KRndsd1FQOGFPb0E/view?usp=sharing
contract FinneyDonationGamble {
// Basics
address foundation = 0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae;
// History
uint256 Bets_total_number; // Number of bets
uint256 Bets_since_last_win; // Number of bets since last win
uint256 Sum_of_Payouts; // Sum pay out
uint256 Sum_of_Donations; // Sum donations
/**
*Code author/customizations by rfikki - [email protected]
*Created for illustration only
*Using OpenZeppelin as basis
*To be submitted for verification at Etherscan.io on 2023-xx-xx
*/
// File: @openzeppelin/contracts/utils/Context.sol
@rfikki
rfikki / wordle1.md
Created January 18, 2022 15:59 — forked from Arachnid/wordle1.md

Total missed: 2

Total guesses: 6158

First guess: spend

aback

  • ⬜⬜🟩🟩🟩: quack

abate

Generate state:
bazel run //tools/genesis-state-gen --define=ssz=mainnet -- \
--num-validators=64 \
--output-ssz=/tmp/genesis.ssz \
--mainnet-config
BN1:
bazel run //beacon-chain --define ssz=mainnet -- \
--http-web3provider \
@rfikki
rfikki / rinkeby-lightclient-peers-latest.txt
Last active October 9, 2021 06:57
Rinkeby Lightclient Peers (Updated 04/18/2021)
admin.addPeer("enode://28e75598c11d7fbef66ccd9cd2283fa9ac41aaab356d429007e58595fb9179ef98f0ea8bc236e456b55883c86b20cf021f361c137bba0709abce0070c81fda3b@15.236.32.166:30303");
admin.addPeer("enode://b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6@159.89.28.211:30303");
admin.addPeer("enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@52.169.42.101:30303");
admin.addPeer("enode://573295b2652117992aaf64f555405bc77de62567d880c708ec350e785f6b35b0a8d4cff4df43539811bb05822077d7c0c842a9870833f5aac4590c367095eb3b@13.48.101.134:30303");