Package: autocorns
autocornsA team of Crypto Unicorns botsDisclaimerI invokeautocornsto help my unicorns. You may choose to invokeautocornsto helpyourunicorns, too.
If you do choose to call uponautocorns, know that you are doing so at your own risk. I am not liable or
responsible for any damage or losses you may incur.autocornsexpect your account credentials to be stored as an Ethereum keystore file and for you to have access to the corresponding password.
If you do not know what this means, you probably shouldn't call upon theautocorns.Installationautocornsis written in Python and uses:moonwormbrownieYou can installautocornsby running:pip install autocornsBotsThe Dark Forest WardenThe Dark Forest Warden escorts Crypto Unicorns safely through the Dark Forest.To call on the Warden to helpyourunicorns (42,69, and420, say), use this spell:autocornswarden\--networkmatic\--sender<pathtokeystorefile>\--max-fee-per-gas"40 gwei"\--max-priority-fee-per-gas"30 gwei"\--confirmations5\--corns4269420You will be prompted to unlock your keystore with the password before the transactions are submitted.The BiologistThe Biologist can be used to inspect information about unicorn genetics and breeding.To get this information, the Biologist crawls genetic data directly from the Crypto Unicorns smart
contract. It also queries the Moonstream database for some information.Commands that use Moonstream data will require setting up aMoonstreamaccount
and loading the appropriate query into your account. If you need help with this, ask the Moonstream
teamon Discord.CheckpointingAll Biologist subcommands that crawl data from the blockchain support checkpoints. This means that
you can start a crawl and then update it over time in case you get rate limited by your web3 provider
or you want to add data about new unicorns.The--checkpointargument allows you to load an existing checkpoint.Any subcommand that supports--checkpointalso allows you to set the--update-checkpointflag which
will update the checkpoint file in place with any new crawled data.Unicorn DNAsTo build aJSON Linesfile containing the DNAs of each unicorn:autocornsbiologistdnas\--networkmatic\--address0xdC0479CC5BbA033B3e7De9F178607150B3AbCe1f\--start<startingtokenID>\--end<endingtokenID>\--num-workers<numberofthreadstocrawlwith>\--timeout<numberofsecondstowaitbeforetimingout>\>dnas.jsonTo resume crawling from a previously stored DNAs file:autocornsbiologistdnas\--networkmatic\--address0xdC0479CC5BbA033B3e7De9F178607150B3AbCe1f\--start<startingtokenID>\--end<endingtokenID>\--num-workers<numberofthreadstocrawlwith>\--timeout<numberofsecondstowaitbeforetimingout>\--checkpointdnas.json\--update-checkpointUnicorn metadata (lifecycle stages, classes)To retrieve the classes and lifecycle stages of unicorns, use:autocornsbiologistmetadata\--networkmatic\--address0xdC0479CC5BbA033B3e7De9F178607150B3AbCe1f\--start<startingtokenID>\--end<endingtokenID>\--num-workers<numberofthreadstocrawlwith>\--timeout<numberofsecondstowaitbeforetimingout>\>metadata.jsonTo resume crawling from a previously stored metadata file:autocornsbiologistmetadata\--networkmatic\--address0xdC0479CC5BbA033B3e7De9F178607150B3AbCe1f\--start<startingtokenID>\--end<endingtokenID>\--num-workers<numberofthreadstocrawlwith>\--timeout<numberofsecondstowaitbeforetimingout>\--checkpointmetadata.json\--update-checkpointNumber of mythic body parts per unicornTo calculate the number of mythic body parts per unicorn, we need the DNAs of those unicorns as an
input. Therefore, this command depends on the output of theautocorns biologists dnascommand.NOTE: Since unicorn eggs do not officially have body parts, and since solidity does not have any other
way of handling null values, eggs show up as having 6 mythic body parts. The merge command (described
below) takes care of this. But if you are just using the file produced by this command, then this is
something that you will also have to handle.Once you have written the output ofautocorns biologists dnasto a file, saydnas.json, you can
invoke this command as:autocornsbiologistmythic-body-parts\--networkmatic\--address0xdC0479CC5BbA033B3e7De9F178607150B3AbCe1f\--dnasdnas.json\--num-workers<numberofthreadstocrawlwith>\--timeout<numberofsecondstowaitbeforetimingout>\>mythic-body-parts.jsonTo resume crawling from a previously stored checkpoint:autocornsbiologistmythic-body-parts\--networkmatic\--address0xdC0479CC5BbA033B3e7De9F178607150B3AbCe1f\--dnasdnas.json\--num-workers<numberofthreadstocrawlwith>\--timeout<numberofsecondstowaitbeforetimingout>\--checkpointmythic-body-parts.json\--update-checkpointMerging into a single fileYou can use theautocorns biologist mergecommand to merge metadata and mythic body parts information
into a single file.The merge command correctly sets the number of mythic body parts for unicorn eggs to 0 (from the default
of6that comes from the smart contract).To run this command:autocornsbiologistmerge\--metadatametadata.json\--mythic-body-partsmythic-body-parts.json\>merged.json