Skip to content

Instantly share code, notes, and snippets.

View andytudhope's full-sized avatar
💭
https://living.thebluebook.co.za

Andy Tudhope andytudhope

💭
https://living.thebluebook.co.za
View GitHub Profile
{meta {:name "Test"
:description "Demonstration of collectible command"
:documentation ""}
views/preview
(let [{{{symbol :symbol token :token tx-hash :tx-hash} :params} :content outgoing :outgoing timestamp-str :timestamp-str} @properties]
(let [collectible-token (query [:get-collectible-token symbol token])]
[view {:flex-direction :column
:align-items :flex-start}
[nft-token collectible-token]
, . ,
._/), .(\/),
ii// )/) ,-=-. ,-=-. ,-=-. ,-=-. (\/|/)
,^=-9 ,//) )=-="' '"=-="' '"=-="' '"=-="' '"=-="/ }/)
""_,),,/ " ,-=-. ,-=-. ,-=-. ,-=-. ,/`~
""" )))\))=-="' '"=-="' '"=-="' '"=-="' '"=-="
<< << << <<
((( >((( > ((( > ((( >
("`-''-/").___..--''"`-._
`6_ 6 ) `-. ( ).`-.__.`)
(_Y_.)' ._ ) `._ `. ``-..-`
_..`--'_..-_/ /--'_.' ,'
(il),-'' (li),' ((!.-'
@andytudhope
andytudhope / scaredy-cat-bot.lua
Created March 3, 2024 10:40
An updated bot for the ao arena game
-- Initializing global variables to store the latest game state and game host process.
LatestGameState = LatestGameState or nil
-- Prevents the agent from taking multiple actions at once.
InAction = InAction or false
Logs = Logs or {}
colors = {
red = "\27[31m",
green = "\27[32m",
@andytudhope
andytudhope / aoWifHat.lua
Last active March 5, 2024 17:43
A memecoin for ao which illustrates a different way of using the token.lua blueprint with hopefully more prosocial outcomes
-- import the necessaries
local json = require('json')
CRED = "Sa0iBLPNyJQrwpTTG-tWLQU-1QeUAJA73DdxGGiKoJc"
if not Balances then Balances = { [ao.id] = 0 } end
if not CredSent then CredSent = { [ao.id] = 0 } end
if Name ~= 'aoWifHat' then Name = 'aoWifHat' end
@andytudhope
andytudhope / what-stake.lua
Last active March 7, 2024 06:15
A better way to stake on memes
-- Key the Proposals table by the name so that any process can propose multiple handlers
Proposals = Proposals or {
["init"] = {
stake = 0,
pattern = "none",
handle = "test",
stakers = {} -- Track stakers and their individual stakes for later unstaking
}
}
-- Keep track of which community-proposed handlers are currently active
@andytudhope
andytudhope / rakis-bot.lua
Last active March 17, 2024 12:49
A good bot to begin with
-- Initializing global variables to store the latest game state and game host process.
LatestGameState = LatestGameState or nil
-- Prevents the agent from taking multiple actions at once.
InAction = InAction or false
Logs = Logs or {}
colors = {
red = "\27[31m",
green = "\27[32m",