Skip to content

Instantly share code, notes, and snippets.

View JayWelsh's full-sized avatar
🕉️

Jay Welsh JayWelsh

🕉️
View GitHub Profile
@JayWelsh
JayWelsh / base-custom-decimal-erc20-how-to.md
Created March 21, 2024 00:42
How to deploy a custom decimal place ERC-20 token contract to Base Network

Context:

  1. I was initially pointed towards https://github.com/ethereum-optimism/optimism/blob/c04cefe0258a3a13266fe7f3df830f392f4a14dc/packages/contracts-bedrock/src/universal/OptimismMintableERC20Factory.sol#L89C14-L89C53

  2. However, this version of the OptimismMintableERC20Factory wasn't (and I think still isn't) officially deployed to a production environment for Base, and so it was suggested by the Optimism team to make the deployment of the latest code independently, there is more context on this here: ethereum-optimism/developers#143

  3. This lead to me trying to make a deployment of the factory myself, however this was shortsighted of me in hindsight and lead to the suggestion to not deploy the whole factory but rather to just deploy the reference contract itself, without involving the factory side of things, more context: ethereum-optimism/developers#147

Conclusion

@JayWelsh
JayWelsh / results-uppercase.json
Created November 7, 2021 21:35
Uppercase results of: function retrieveLastWord(string memory firstLetterOfSeed10, string memory firstLetterOfSeed11)
{
"A + A": "_óI*6ø€\u0018ý,ýÕr.¡\u0004””š3©Â[>ð\u001f½õÊk£;",
"A + C": ">\t¾Sw9ˆµ \\¸tOn­i\u0013»™\u000bü–Öf9?çç\u000f\u0003\u0017 ",
"A + E": "X\u0012á0Þ͊«ÃXø\u0010@¡þþŽa7àřT'¦¨»\u0015Z\bàf",
"A + F": "‡)\u0019z8±\u000f\u0007\u001eè-dÄzMT=ãC[À\u001aob<Yì«bÙ\u0013?",
"A + G": "\u0010\u000e\u0000-­¨-éËÿŒŸB®(\u001aP€[[7:ƒ¦þ\u001bA½¨RJ\u0004",
"A + H": " ˆBF1 ›©3ª$Ò½íNqÍ…ù˜J*Ipît0\u0016›\u0006œ",
"A + I": "6æ‘%¿µnºRŽ[%íF—(ŸôVðpA5ðÃF6Ü\bË/²",
"A + K": "±¼f¨’Ü鲟íež‰Œ Û\ns£\u0019x›:!\u0007¸ì¡Î\nžN",
"A + M": "\nÿËJç9CŸ‹ºÞ{­ï¸\u0015(–…›\u0006®)\r—ýô¡\u0015åeK",
@JayWelsh
JayWelsh / results.json
Created November 7, 2021 20:43
Results of: function retrieveLastWord(string memory firstLetterOfSeed10, string memory firstLetterOfSeed11)
{
"a + a": "®cã\u0011VMMÛßãj˜$A+%ü¼ND\rK›‡}\ný&ñì|",
"a + b": "&\u0003»NƒLU|‚Ô¾Þ\u0013ϸ¿é~P·h÷¿¬¶\u0017ø¬æyՍ",
"a + c": "¨7kÈ\u0018V¾…ú†'õ¼ŽÁ\u0005\nÑ!\u001bÆ\u0015\u001c\u0000ÚáKIn0i",
"a + d": "©ßà\u0017–ö\u0016ëiˆÆ8L\f;u…º4G9&ú\u00047–—ö^o‰?",
"a + h": "\u000ežÈ\u0019u\u0018È\u0013Œ¼-š_½CÊ=\u0011\u0018lÅÜBKYÆçJè3¾I",
"a + i": "›Ôª‚®å!x´àÐß\u0004\u0006A¥þ)©,ö\u001a`\u000e\u0018QžXUÐÔA",
"a + j": "\u0005ÁHãÙ\u0003p‚ÂüH?ÄÖ¸5;™^\u0013¥z\"ó\"Ìå\"\\9’B",
"a + k": "\u00132TyÇ¡Š×²^lDUr±:\fÚÿ\u0001È]Ž¾\u001dð´[Ò[.",
"a + l": "\u0004€¦\u001bYp¤\u0007P5€#P„•»\u0017\u0015\u0018O\"çQÿnWý¼‘\të",
@JayWelsh
JayWelsh / example-verify.js
Created September 20, 2021 22:17
An example of how to verify a signed message on Ethereum
const util = require('ethereumjs-util');
const Web3 = require('web3');
// msg is the plaintext message (preimage)
// sig is the signed message
// walletAddress is the address that you want to verify the message comes from
const verifySignature = async (msg, sig, walletAddress) => {
const web3 = new Web3(null);
const res = util.fromRpcSig(sig);
@JayWelsh
JayWelsh / SimulatedKyber.sol
Last active October 18, 2019 05:38
SimulatedKyber.sol
pragma solidity 0.5.7;
pragma experimental ABIEncoderV2;
import { IERC20 } from "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import { SafeMath } from "openzeppelin-solidity/contracts/math/SafeMath.sol";
contract SimulatedKyber {
using SafeMath for uint256;
IERC20 public dai;

Keybase proof

I hereby claim:

  • I am jaywelsh on github.
  • I am revolution0x (https://keybase.io/revolution0x) on keybase.
  • I have a public key ASCpsaeYnH1i3zRh49eTcmJXjPiTOrfD9xOe1NPwYiaRsgo

To claim this, I am signing this object: