Test the on-chain guard: a non-whitelisted call the account rejects on chain
curl --request POST \
--url https://api.hellopie.xyz/v1/minds/{mindId}/wallet/guard-test \
--cookie hf_session=import requests
url = "https://api.hellopie.xyz/v1/minds/{mindId}/wallet/guard-test"
headers = {"cookie": "hf_session="}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {cookie: 'hf_session='}};
fetch('https://api.hellopie.xyz/v1/minds/{mindId}/wallet/guard-test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hellopie.xyz/v1/minds/{mindId}/wallet/guard-test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_COOKIE => "hf_session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hellopie.xyz/v1/minds/{mindId}/wallet/guard-test"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("cookie", "hf_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hellopie.xyz/v1/minds/{mindId}/wallet/guard-test")
.header("cookie", "hf_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hellopie.xyz/v1/minds/{mindId}/wallet/guard-test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'hf_session='
response = http.request(request)
puts response.read_body{
"txHash": "<string>",
"explorer": "<string>",
"reason": "<string>",
"target": {
"address": "<string>",
"label": "WETH",
"function": "transfer"
}
}Wallet
Test the on-chain guard: a non-whitelisted call the account rejects on chain
The owner’s proof of a rejected action. The Mind’s key tries a call that is not on its role’s whitelist (a 1 wei ERC-20 transfer on WETH 0x4200000000000000000000000000000000000006 to the account itself); the relayer broadcasts it without simulation, so the governed account reverts it on chain. Nothing is stored as a payment and nothing can move. Owner only, not for try-out users, once a minute per Mind.
POST
/
v1
/
minds
/
{mindId}
/
wallet
/
guard-test
Test the on-chain guard: a non-whitelisted call the account rejects on chain
curl --request POST \
--url https://api.hellopie.xyz/v1/minds/{mindId}/wallet/guard-test \
--cookie hf_session=import requests
url = "https://api.hellopie.xyz/v1/minds/{mindId}/wallet/guard-test"
headers = {"cookie": "hf_session="}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {cookie: 'hf_session='}};
fetch('https://api.hellopie.xyz/v1/minds/{mindId}/wallet/guard-test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hellopie.xyz/v1/minds/{mindId}/wallet/guard-test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_COOKIE => "hf_session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hellopie.xyz/v1/minds/{mindId}/wallet/guard-test"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("cookie", "hf_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hellopie.xyz/v1/minds/{mindId}/wallet/guard-test")
.header("cookie", "hf_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hellopie.xyz/v1/minds/{mindId}/wallet/guard-test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'hf_session='
response = http.request(request)
puts response.read_body{
"txHash": "<string>",
"explorer": "<string>",
"reason": "<string>",
"target": {
"address": "<string>",
"label": "WETH",
"function": "transfer"
}
}Response
The reverted transaction and the decoded reason