Skip to content

Instantly share code, notes, and snippets.

@HarmonicPool
Last active September 28, 2022 09:55
Show Gist options
  • Save HarmonicPool/0b7339fc17160182a04a957c742664a5 to your computer and use it in GitHub Desktop.
Save HarmonicPool/0b7339fc17160182a04a957c742664a5 to your computer and use it in GitHub Desktop.
/** 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;
}
@ahaxu
Copy link

ahaxu commented Sep 28, 2022

⭐ ⭐ ⭐ ⭐ ⭐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment