Last active
September 28, 2022 09:55
-
-
Save HarmonicPool/0b7339fc17160182a04a957c742664a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Turbo Plutus 🔥 | |
* an easy to use library for smart contract generation with NO learning curve | |
* | |
* example usage: | |
* ```ts | |
* import makeSmartContract from "Turbo_Plutus🔥.ts" | |
* | |
* const shotMyselfInTheFootContract = makeSmartContract(); | |
* ``` | |
* | |
* > **NOTE:** please understand this file is a joke; for no reson in the world you should use this thing | |
**/ | |
const hexChars = "0123456789abcdef".slice(''); | |
function getRandomHexChar() | |
{ | |
return hexChars[ Math.round( Math.random() * (hexChars.length - 1) ) ]; | |
} | |
function getRandomHexByte() | |
{ | |
return getRandomHexChar() + getRandomHexChar(); | |
} | |
function makeSmartContract() | |
{ | |
const nBytes = Math.round( Math.random() * 16000 ) + 20; | |
let contract = "000001"; | |
for( let i = 0; i < nBytes; i++ ) | |
{ | |
contract += getRandomHexByte(); | |
} | |
return contract; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
⭐ ⭐ ⭐ ⭐ ⭐