Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am transmissionsdev on github.
  • I am transmissions (https://keybase.io/transmissions) on keybase.
  • I have a public key whose fingerprint is 3850 7E6D CAFE 1D6D 816B 2205 999D 93A2 9D45 27B5

To claim this, I am signing this object:

@transmissions11
transmissions11 / 📊 Weekly development breakdown
Last active October 29, 2020 00:45
📊 Weekly development breakdown
TypeScript 19 hrs 10 mins ████████████████▉░░░░ 80.9%
JavaScript 2 hrs 28 mins ██▏░░░░░░░░░░░░░░░░░░ 10.5%
JSON 1 hr 42 mins █▌░░░░░░░░░░░░░░░░░░░ 7.2%
Other 20 mins ▎░░░░░░░░░░░░░░░░░░░░ 1.4%
YAML 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.0%
{"lastUpload":"2021-01-30T22:53:05.302Z","extensionVersion":"v3.4.3"}
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreif32xnfyjibtixfcjbl7oxrir4kzo6njmtvrdtn2du3qk3ldz67ba ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@transmissions11
transmissions11 / MultiSig.sol
Created December 13, 2020 06:53
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.7.4+commit.3f05b770.js&optimize=false&runs=200&gist=
pragma solidity >=0.6.0 <0.8.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/access/Ownable.sol";
contract MuliSig is Ownable {
uint internal keyholderAmount;
address[] internal keyholders;
mapping(address => mapping(string => bool)) internal attestations;
function allKeyholdersAttest(string memory key) public view returns (bool) {
for (uint i = 0; i < keyholders.length; i++) {
@transmissions11
transmissions11 / MultiSig.sol
Last active December 17, 2020 09:06
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.7.4+commit.3f05b770.js&optimize=true&runs=200&gist=
pragma solidity >=0.6.0 <0.8.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/access/Ownable.sol";
contract MuliSig is Ownable {
uint internal keyholderAmount;
address[] internal keyholders;
enum ActionCode {VOTE_TO_REMOVE_KEYHOLDER, VOTE_TO_ADD_KEYHOLDER, VOTE_TO_INCREASE_KEYHOLDER_AMOUNT, LOCK_OWNER_OUT, ATTEST_TO_DATA}
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreig4qsrs2cojs3i45cmm73ph52oaqbj5fpbbyazxnx2kdsbjukmvyi ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
font:
normal:
family: MesloLGS NF
window:
decorations: Transparent
padding:
x: 8
y: 30
@transmissions11
transmissions11 / mulDiv.sol
Last active January 28, 2022 05:46
mulDiv Optimization Challenge
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator
) internal pure returns (uint256 z) {
assembly {
// Store x * y in z for now.
z := mul(x, y)
// Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.0;
contract Test {
mapping(uint256 => uint256) public a;
mapping(uint256 => uint256) public b;
function test1() public {
b[0]++;
b[0]--;