Last active
February 16, 2021 20:24
-
-
Save metanomial/36d9cd861339d9271edce6c96ee959cf to your computer and use it in GitHub Desktop.
TweetNFT Bot
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
TweetNFT Bot | |
Idle* | |
mention invokation -> Investigate Reply Status | |
scheduled minting -- 72 hours -> Fetch OEmbed | |
Investigate Reply Status | |
invoking tweet is not a reply -> Must Be Reply Error | |
invoking tweet is a reply -> Investigate Context | |
Must Be Reply Error | |
error message sent -> Store Message ID | |
error message failed -> Log Critical Failure | |
Investigate Context | |
reply to a frontrunning optional message -> Investigate Challenger | |
reply to error message -> Investigate Minting Status | |
reply to any other tweets -> Investigate Minting Status | |
Investigate Minting Status | |
already minted -> Already Minted Error | |
not yet minted -> Investigate Wallet Address | |
Already Minted Error | |
error message sent -> Idle | |
error message failed -> Log Critical Failure | |
Investigate Challenger | |
challenger is author of original tweet -> Reply Successful Front-run | |
challenger is anyone else -> Reply Frontrunning Clarification | |
Reply Frontrunning Clarification | |
reply sent -> Idle | |
reply failed -> Log Critical Failure | |
Investigate Wallet Address | |
no address provided -> Must Provide Wallet Address Error | |
bad address prefix -> Must Provide Wallet Address Error | |
wallet address too long -> Invalid Wallet Address Error | |
wallet address fails checksum -> Invalid Wallet Address Error | |
valid address -> Fetch OEmbed | |
Must Provide Wallet Address Error | |
error message sent -> Store Message ID | |
error message failed -> Log Critical Failure | |
Invalid Wallet Address Error | |
error message sent -> Store Message ID | |
error message failed -> Log Critical Failure | |
Store Message ID | |
stored -> Idle | |
failed -> Log Critical Failure | |
Fetch OEmbed | |
oembed fetched -> Screenshot Tweet | |
oembed failed -> Log Critical Failure | |
Screenshot Tweet | |
screenshot saved -> Distribute through IPFS | |
screenshot failed -> Log Critical Failure | |
Distribute through IPFS | |
distributed -> Investigate Authorship Status | |
failed -> Log Critical Failure | |
Investigate Authorship Status | |
parent tweet is authored by invoker -> Reply Success | |
parent tweet is not authored by invoker -> Reply Success with Frontrunning Option | |
Reply Success | |
success message sent -> Idle | |
success message failed -> Log Critical Failure | |
Reply Success with Frontrunning Option | |
success message sent -> Store Message ID | |
success message failed -> Log Critical Failure | |
Reply Successful Front-run | |
success message sent -> Idle | |
success message failed -> Log Critical Failure | |
Log Critical Failure | |
logged -- to be handled manually -> Idle |
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
function render(model) { | |
let current_state_name = model.active_states[0].name; | |
return $("h1", { | |
style: { | |
color: "darkBlue" | |
} | |
}, | |
`The current state is: ${current_state_name}`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment