NPTNZFOTBQ7DVTR4OVV7SEMBNYFP2ZZS
[
"autonomous agent",
{
"doc_url": "https://devid.org/github.json",
"getters": "{
$username2address = ($github_username) => var['u2a_'||$github_username];
$address2username = ($address) => var['a2u_'||$address];
}",
"init": "{
$overwrite_delay = 3; // in days
$attestor = 'OYW2XTDKSNKGSEZ27LMGNOPJSYIXHBHC'; // mainnet
// $attestor = 'QBIAZQZWO3YK2I2C3X37DCVY643S4NI4'; // testnet
// $attestor = 'QMWQRJV6NCYGUI6X7BWRKLLBQVQYLZ27'; // testkit tests
require(trigger.address == $attestor, "only the attestor can call this AA");
}",
"messages": {
"cases": [
{
"if": "{trigger.data.address AND trigger.data.github_username}",
"messages": [
{
"app": "state",
"state": "{
$address = trigger.data.address;
$github_username = trigger.data.github_username;
require(is_valid_address($address), "address not valid");
require(has_only($github_username, '\w-'), "github username not valid");
$existing_owner = var['u2a_'||$github_username];
if ($existing_owner){ // would overwrite
require($existing_owner != $address, "the same owner");
$pending_varname = 'pending_'||$address||'_'||$github_username;
$pending_ts = var[$pending_varname];
if (!$pending_ts){
var[$pending_varname] = timestamp;
response['message'] = "This attestation would overwrite an existing record and can't be activated immediately for security reasons. Please repeat your attestation in "||$overwrite_delay||" days to activate the new owner of this github username.";
return;
}
require(timestamp > $pending_ts + $overwrite_delay * 24 * 3600, "the delay period is still ongoing");
var[$pending_varname] = false;
// the old a2u stays intact
}
var['u2a_'||$github_username] = $address;
var['a2u_'||$address] = $github_username;
response['message'] = $github_username||' => '||$address;
}"
}
]
},
{
"if": "{trigger.data.withdraw AND trigger.data.amount}",
"messages": [
{
"app": "payment",
"payload": {
"asset": "base",
"outputs": [
{
"address": "{$attestor}",
"amount": "{trigger.data.amount}"
}
]
}
}
]
}
]
}
}
]
MCI: 10863551 Not bounced Response: {
"responseVars": {
"message": "hsngerami => DEYNCAWQJ2FKNJQZGRA5YS3N5CVCK6WW"
},
"info": "no messages after filtering"
} MCI: 10816042 Not bounced Response: {
"responseVars": {
"message": "fernandomema => 6HYETOE3XUFQDUWAJIOVOR4TL4CC4O2B"
},
"info": "no messages after filtering"
} MCI: 10784485 Not bounced Response: {
"responseVars": {
"message": "drhinote => C4IEP7G6MRZKYMZJX7FXW7UESI2BCOY7"
},
"info": "no messages after filtering"
} MCI: 10707195 Not bounced Response: {
"responseVars": {
"message": "magrisya => ZQEBPJ2NBJYJ7BNJM5LIS2TIGHQOMSRK"
},
"info": "no messages after filtering"
} MCI: 10438668 Not bounced Response: {
"responseVars": {
"message": "abeasley88 => G32I42KO4BZY2WWVAL4LXEBFSDQZGKW3"
},
"info": "no messages after filtering"
} MCI: 10412141 Not bounced Response: {
"responseVars": {
"message": "sy-media => AIPFLEFQO74TRHKU6PEXZGJ2U2HH4LVQ"
},
"info": "no messages after filtering"
} MCI: 10341473 Not bounced Response: {
"responseVars": {
"message": "This attestation would overwrite an existing record and can't be activated immediately for security reasons. Please repeat your attestation in 3 days to activate the new owner of this github username."
},
"info": "no messages after filtering"
} MCI: 10341462 Bounced Response: {
"error": "the same owner"
} MCI: 9645830 Not bounced Response: {
"responseVars": {
"message": "pmiklos => HSKZM2UZCMDAEOJWIOU2VTN6UM5ZX4ZW"
},
"info": "no messages after filtering"
} MCI: 9577690 Not bounced Response: {
"responseVars": {
"message": "wahyutalpos => K26NUGTCFGDXJAPXQJZRXBYFO74CEHYE"
},
"info": "no messages after filtering"
} Show transactions in assets: All bytes
No transactions found, it may be worth changing the filter
Unit ID
Date
From
Direction
To
Amount
18.09.2024 16:03:52
in
NPTNZFOTBQ7DVTR4OVV7SEMBNYFP2ZZS
23.08.2024 15:40:31
in
NPTNZFOTBQ7DVTR4OVV7SEMBNYFP2ZZS
07.08.2024 18:03:04
in
NPTNZFOTBQ7DVTR4OVV7SEMBNYFP2ZZS
01.07.2024 18:27:33
in
NPTNZFOTBQ7DVTR4OVV7SEMBNYFP2ZZS
26.02.2024 06:36:48
in
NPTNZFOTBQ7DVTR4OVV7SEMBNYFP2ZZS