Scan EIP-712 Signed Message for Security Risks
curl --request POST \
--url https://api.webacy.com/scan/{fromAddress}/eip712 \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"msg": {
"from": "0x6535d5F76F021FE65E2ac73D086dF4b4Bd7ee5D9",
"data": {
"types": {
"EIP712Domain": [
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"SafeTx": [
{
"name": "to",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "data",
"type": "bytes"
},
{
"name": "operation",
"type": "uint8"
},
{
"name": "safeTxGas",
"type": "uint256"
},
{
"name": "baseGas",
"type": "uint256"
},
{
"name": "gasPrice",
"type": "uint256"
},
{
"name": "gasToken",
"type": "address"
},
{
"name": "refundReceiver",
"type": "address"
},
{
"name": "nonce",
"type": "uint256"
}
]
},
"primaryType": "SafeTx",
"domain": {
"chainId": 1,
"verifyingContract": "0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6"
},
"message": {
"to": "0xfbffef83b1c172fe3bc86c1ccb036ab9f3efcaf2",
"value": "0",
"data": "0x804e1f0a000000000000000000000000ef279c2ab14960aa319008cbea384b9f8ac35fc6",
"operation": 1,
"baseGas": "0",
"gasPrice": "0",
"gasToken": "0x0000000000000000000000000000000000000000",
"refundReceiver": "0x0000000000000000000000000000000000000000",
"nonce": 42,
"safeTxGas": "0"
}
}
}
}
'import requests
url = "https://api.webacy.com/scan/{fromAddress}/eip712"
payload = { "msg": {
"from": "0x6535d5F76F021FE65E2ac73D086dF4b4Bd7ee5D9",
"data": {
"types": {
"EIP712Domain": [
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"SafeTx": [
{
"name": "to",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "data",
"type": "bytes"
},
{
"name": "operation",
"type": "uint8"
},
{
"name": "safeTxGas",
"type": "uint256"
},
{
"name": "baseGas",
"type": "uint256"
},
{
"name": "gasPrice",
"type": "uint256"
},
{
"name": "gasToken",
"type": "address"
},
{
"name": "refundReceiver",
"type": "address"
},
{
"name": "nonce",
"type": "uint256"
}
]
},
"primaryType": "SafeTx",
"domain": {
"chainId": 1,
"verifyingContract": "0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6"
},
"message": {
"to": "0xfbffef83b1c172fe3bc86c1ccb036ab9f3efcaf2",
"value": "0",
"data": "0x804e1f0a000000000000000000000000ef279c2ab14960aa319008cbea384b9f8ac35fc6",
"operation": 1,
"baseGas": "0",
"gasPrice": "0",
"gasToken": "0x0000000000000000000000000000000000000000",
"refundReceiver": "0x0000000000000000000000000000000000000000",
"nonce": 42,
"safeTxGas": "0"
}
}
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
msg: {
from: '0x6535d5F76F021FE65E2ac73D086dF4b4Bd7ee5D9',
data: {
types: {
EIP712Domain: [
{name: 'chainId', type: 'uint256'},
{name: 'verifyingContract', type: 'address'}
],
SafeTx: [
{name: 'to', type: 'address'},
{name: 'value', type: 'uint256'},
{name: 'data', type: 'bytes'},
{name: 'operation', type: 'uint8'},
{name: 'safeTxGas', type: 'uint256'},
{name: 'baseGas', type: 'uint256'},
{name: 'gasPrice', type: 'uint256'},
{name: 'gasToken', type: 'address'},
{name: 'refundReceiver', type: 'address'},
{name: 'nonce', type: 'uint256'}
]
},
primaryType: 'SafeTx',
domain: {chainId: 1, verifyingContract: '0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6'},
message: {
to: '0xfbffef83b1c172fe3bc86c1ccb036ab9f3efcaf2',
value: '0',
data: '0x804e1f0a000000000000000000000000ef279c2ab14960aa319008cbea384b9f8ac35fc6',
operation: 1,
baseGas: '0',
gasPrice: '0',
gasToken: '0x0000000000000000000000000000000000000000',
refundReceiver: '0x0000000000000000000000000000000000000000',
nonce: 42,
safeTxGas: '0'
}
}
}
})
};
fetch('https://api.webacy.com/scan/{fromAddress}/eip712', 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.webacy.com/scan/{fromAddress}/eip712",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'msg' => [
'from' => '0x6535d5F76F021FE65E2ac73D086dF4b4Bd7ee5D9',
'data' => [
'types' => [
'EIP712Domain' => [
[
'name' => 'chainId',
'type' => 'uint256'
],
[
'name' => 'verifyingContract',
'type' => 'address'
]
],
'SafeTx' => [
[
'name' => 'to',
'type' => 'address'
],
[
'name' => 'value',
'type' => 'uint256'
],
[
'name' => 'data',
'type' => 'bytes'
],
[
'name' => 'operation',
'type' => 'uint8'
],
[
'name' => 'safeTxGas',
'type' => 'uint256'
],
[
'name' => 'baseGas',
'type' => 'uint256'
],
[
'name' => 'gasPrice',
'type' => 'uint256'
],
[
'name' => 'gasToken',
'type' => 'address'
],
[
'name' => 'refundReceiver',
'type' => 'address'
],
[
'name' => 'nonce',
'type' => 'uint256'
]
]
],
'primaryType' => 'SafeTx',
'domain' => [
'chainId' => 1,
'verifyingContract' => '0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6'
],
'message' => [
'to' => '0xfbffef83b1c172fe3bc86c1ccb036ab9f3efcaf2',
'value' => '0',
'data' => '0x804e1f0a000000000000000000000000ef279c2ab14960aa319008cbea384b9f8ac35fc6',
'operation' => 1,
'baseGas' => '0',
'gasPrice' => '0',
'gasToken' => '0x0000000000000000000000000000000000000000',
'refundReceiver' => '0x0000000000000000000000000000000000000000',
'nonce' => 42,
'safeTxGas' => '0'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.webacy.com/scan/{fromAddress}/eip712"
payload := strings.NewReader("{\n \"msg\": {\n \"from\": \"0x6535d5F76F021FE65E2ac73D086dF4b4Bd7ee5D9\",\n \"data\": {\n \"types\": {\n \"EIP712Domain\": [\n {\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n }\n ],\n \"SafeTx\": [\n {\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"data\",\n \"type\": \"bytes\"\n },\n {\n \"name\": \"operation\",\n \"type\": \"uint8\"\n },\n {\n \"name\": \"safeTxGas\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"baseGas\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"gasPrice\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"gasToken\",\n \"type\": \"address\"\n },\n {\n \"name\": \"refundReceiver\",\n \"type\": \"address\"\n },\n {\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n }\n ]\n },\n \"primaryType\": \"SafeTx\",\n \"domain\": {\n \"chainId\": 1,\n \"verifyingContract\": \"0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6\"\n },\n \"message\": {\n \"to\": \"0xfbffef83b1c172fe3bc86c1ccb036ab9f3efcaf2\",\n \"value\": \"0\",\n \"data\": \"0x804e1f0a000000000000000000000000ef279c2ab14960aa319008cbea384b9f8ac35fc6\",\n \"operation\": 1,\n \"baseGas\": \"0\",\n \"gasPrice\": \"0\",\n \"gasToken\": \"0x0000000000000000000000000000000000000000\",\n \"refundReceiver\": \"0x0000000000000000000000000000000000000000\",\n \"nonce\": 42,\n \"safeTxGas\": \"0\"\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.webacy.com/scan/{fromAddress}/eip712")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"msg\": {\n \"from\": \"0x6535d5F76F021FE65E2ac73D086dF4b4Bd7ee5D9\",\n \"data\": {\n \"types\": {\n \"EIP712Domain\": [\n {\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n }\n ],\n \"SafeTx\": [\n {\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"data\",\n \"type\": \"bytes\"\n },\n {\n \"name\": \"operation\",\n \"type\": \"uint8\"\n },\n {\n \"name\": \"safeTxGas\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"baseGas\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"gasPrice\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"gasToken\",\n \"type\": \"address\"\n },\n {\n \"name\": \"refundReceiver\",\n \"type\": \"address\"\n },\n {\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n }\n ]\n },\n \"primaryType\": \"SafeTx\",\n \"domain\": {\n \"chainId\": 1,\n \"verifyingContract\": \"0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6\"\n },\n \"message\": {\n \"to\": \"0xfbffef83b1c172fe3bc86c1ccb036ab9f3efcaf2\",\n \"value\": \"0\",\n \"data\": \"0x804e1f0a000000000000000000000000ef279c2ab14960aa319008cbea384b9f8ac35fc6\",\n \"operation\": 1,\n \"baseGas\": \"0\",\n \"gasPrice\": \"0\",\n \"gasToken\": \"0x0000000000000000000000000000000000000000\",\n \"refundReceiver\": \"0x0000000000000000000000000000000000000000\",\n \"nonce\": 42,\n \"safeTxGas\": \"0\"\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.webacy.com/scan/{fromAddress}/eip712")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"msg\": {\n \"from\": \"0x6535d5F76F021FE65E2ac73D086dF4b4Bd7ee5D9\",\n \"data\": {\n \"types\": {\n \"EIP712Domain\": [\n {\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n }\n ],\n \"SafeTx\": [\n {\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"data\",\n \"type\": \"bytes\"\n },\n {\n \"name\": \"operation\",\n \"type\": \"uint8\"\n },\n {\n \"name\": \"safeTxGas\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"baseGas\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"gasPrice\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"gasToken\",\n \"type\": \"address\"\n },\n {\n \"name\": \"refundReceiver\",\n \"type\": \"address\"\n },\n {\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n }\n ]\n },\n \"primaryType\": \"SafeTx\",\n \"domain\": {\n \"chainId\": 1,\n \"verifyingContract\": \"0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6\"\n },\n \"message\": {\n \"to\": \"0xfbffef83b1c172fe3bc86c1ccb036ab9f3efcaf2\",\n \"value\": \"0\",\n \"data\": \"0x804e1f0a000000000000000000000000ef279c2ab14960aa319008cbea384b9f8ac35fc6\",\n \"operation\": 1,\n \"baseGas\": \"0\",\n \"gasPrice\": \"0\",\n \"gasToken\": \"0x0000000000000000000000000000000000000000\",\n \"refundReceiver\": \"0x0000000000000000000000000000000000000000\",\n \"nonce\": 42,\n \"safeTxGas\": \"0\"\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"simulation": {
"domainRisk": {},
"partyRisk": {},
"counterpartyRisk": {},
"functionRisk": {
"selector": "<string>",
"functionName": "<string>",
"signature": "<string>",
"category": "<string>",
"description": "<string>",
"risks": [
"<string>"
],
"safeOperation": "<string>",
"safeMlScore": 123
}
},
"block": 123,
"timestamp": "2023-11-07T05:31:56Z",
"chain": "eth"
}Trading DD
Scan EIP-712 Signed Message for Security Risks
Analyzes an EIP-712 typed data signature for security risks including malicious domains, suspicious contracts, and potential phishing attempts. Supports Ethereum (1), BSC (56), Polygon (137), Optimism (10), Arbitrum (42161), and Base (8453). The chain is determined by the chainId field in the EIP-712 domain.
POST
/
scan
/
{fromAddress}
/
eip712
Scan EIP-712 Signed Message for Security Risks
curl --request POST \
--url https://api.webacy.com/scan/{fromAddress}/eip712 \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"msg": {
"from": "0x6535d5F76F021FE65E2ac73D086dF4b4Bd7ee5D9",
"data": {
"types": {
"EIP712Domain": [
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"SafeTx": [
{
"name": "to",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "data",
"type": "bytes"
},
{
"name": "operation",
"type": "uint8"
},
{
"name": "safeTxGas",
"type": "uint256"
},
{
"name": "baseGas",
"type": "uint256"
},
{
"name": "gasPrice",
"type": "uint256"
},
{
"name": "gasToken",
"type": "address"
},
{
"name": "refundReceiver",
"type": "address"
},
{
"name": "nonce",
"type": "uint256"
}
]
},
"primaryType": "SafeTx",
"domain": {
"chainId": 1,
"verifyingContract": "0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6"
},
"message": {
"to": "0xfbffef83b1c172fe3bc86c1ccb036ab9f3efcaf2",
"value": "0",
"data": "0x804e1f0a000000000000000000000000ef279c2ab14960aa319008cbea384b9f8ac35fc6",
"operation": 1,
"baseGas": "0",
"gasPrice": "0",
"gasToken": "0x0000000000000000000000000000000000000000",
"refundReceiver": "0x0000000000000000000000000000000000000000",
"nonce": 42,
"safeTxGas": "0"
}
}
}
}
'import requests
url = "https://api.webacy.com/scan/{fromAddress}/eip712"
payload = { "msg": {
"from": "0x6535d5F76F021FE65E2ac73D086dF4b4Bd7ee5D9",
"data": {
"types": {
"EIP712Domain": [
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"SafeTx": [
{
"name": "to",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "data",
"type": "bytes"
},
{
"name": "operation",
"type": "uint8"
},
{
"name": "safeTxGas",
"type": "uint256"
},
{
"name": "baseGas",
"type": "uint256"
},
{
"name": "gasPrice",
"type": "uint256"
},
{
"name": "gasToken",
"type": "address"
},
{
"name": "refundReceiver",
"type": "address"
},
{
"name": "nonce",
"type": "uint256"
}
]
},
"primaryType": "SafeTx",
"domain": {
"chainId": 1,
"verifyingContract": "0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6"
},
"message": {
"to": "0xfbffef83b1c172fe3bc86c1ccb036ab9f3efcaf2",
"value": "0",
"data": "0x804e1f0a000000000000000000000000ef279c2ab14960aa319008cbea384b9f8ac35fc6",
"operation": 1,
"baseGas": "0",
"gasPrice": "0",
"gasToken": "0x0000000000000000000000000000000000000000",
"refundReceiver": "0x0000000000000000000000000000000000000000",
"nonce": 42,
"safeTxGas": "0"
}
}
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
msg: {
from: '0x6535d5F76F021FE65E2ac73D086dF4b4Bd7ee5D9',
data: {
types: {
EIP712Domain: [
{name: 'chainId', type: 'uint256'},
{name: 'verifyingContract', type: 'address'}
],
SafeTx: [
{name: 'to', type: 'address'},
{name: 'value', type: 'uint256'},
{name: 'data', type: 'bytes'},
{name: 'operation', type: 'uint8'},
{name: 'safeTxGas', type: 'uint256'},
{name: 'baseGas', type: 'uint256'},
{name: 'gasPrice', type: 'uint256'},
{name: 'gasToken', type: 'address'},
{name: 'refundReceiver', type: 'address'},
{name: 'nonce', type: 'uint256'}
]
},
primaryType: 'SafeTx',
domain: {chainId: 1, verifyingContract: '0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6'},
message: {
to: '0xfbffef83b1c172fe3bc86c1ccb036ab9f3efcaf2',
value: '0',
data: '0x804e1f0a000000000000000000000000ef279c2ab14960aa319008cbea384b9f8ac35fc6',
operation: 1,
baseGas: '0',
gasPrice: '0',
gasToken: '0x0000000000000000000000000000000000000000',
refundReceiver: '0x0000000000000000000000000000000000000000',
nonce: 42,
safeTxGas: '0'
}
}
}
})
};
fetch('https://api.webacy.com/scan/{fromAddress}/eip712', 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.webacy.com/scan/{fromAddress}/eip712",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'msg' => [
'from' => '0x6535d5F76F021FE65E2ac73D086dF4b4Bd7ee5D9',
'data' => [
'types' => [
'EIP712Domain' => [
[
'name' => 'chainId',
'type' => 'uint256'
],
[
'name' => 'verifyingContract',
'type' => 'address'
]
],
'SafeTx' => [
[
'name' => 'to',
'type' => 'address'
],
[
'name' => 'value',
'type' => 'uint256'
],
[
'name' => 'data',
'type' => 'bytes'
],
[
'name' => 'operation',
'type' => 'uint8'
],
[
'name' => 'safeTxGas',
'type' => 'uint256'
],
[
'name' => 'baseGas',
'type' => 'uint256'
],
[
'name' => 'gasPrice',
'type' => 'uint256'
],
[
'name' => 'gasToken',
'type' => 'address'
],
[
'name' => 'refundReceiver',
'type' => 'address'
],
[
'name' => 'nonce',
'type' => 'uint256'
]
]
],
'primaryType' => 'SafeTx',
'domain' => [
'chainId' => 1,
'verifyingContract' => '0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6'
],
'message' => [
'to' => '0xfbffef83b1c172fe3bc86c1ccb036ab9f3efcaf2',
'value' => '0',
'data' => '0x804e1f0a000000000000000000000000ef279c2ab14960aa319008cbea384b9f8ac35fc6',
'operation' => 1,
'baseGas' => '0',
'gasPrice' => '0',
'gasToken' => '0x0000000000000000000000000000000000000000',
'refundReceiver' => '0x0000000000000000000000000000000000000000',
'nonce' => 42,
'safeTxGas' => '0'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.webacy.com/scan/{fromAddress}/eip712"
payload := strings.NewReader("{\n \"msg\": {\n \"from\": \"0x6535d5F76F021FE65E2ac73D086dF4b4Bd7ee5D9\",\n \"data\": {\n \"types\": {\n \"EIP712Domain\": [\n {\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n }\n ],\n \"SafeTx\": [\n {\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"data\",\n \"type\": \"bytes\"\n },\n {\n \"name\": \"operation\",\n \"type\": \"uint8\"\n },\n {\n \"name\": \"safeTxGas\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"baseGas\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"gasPrice\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"gasToken\",\n \"type\": \"address\"\n },\n {\n \"name\": \"refundReceiver\",\n \"type\": \"address\"\n },\n {\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n }\n ]\n },\n \"primaryType\": \"SafeTx\",\n \"domain\": {\n \"chainId\": 1,\n \"verifyingContract\": \"0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6\"\n },\n \"message\": {\n \"to\": \"0xfbffef83b1c172fe3bc86c1ccb036ab9f3efcaf2\",\n \"value\": \"0\",\n \"data\": \"0x804e1f0a000000000000000000000000ef279c2ab14960aa319008cbea384b9f8ac35fc6\",\n \"operation\": 1,\n \"baseGas\": \"0\",\n \"gasPrice\": \"0\",\n \"gasToken\": \"0x0000000000000000000000000000000000000000\",\n \"refundReceiver\": \"0x0000000000000000000000000000000000000000\",\n \"nonce\": 42,\n \"safeTxGas\": \"0\"\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.webacy.com/scan/{fromAddress}/eip712")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"msg\": {\n \"from\": \"0x6535d5F76F021FE65E2ac73D086dF4b4Bd7ee5D9\",\n \"data\": {\n \"types\": {\n \"EIP712Domain\": [\n {\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n }\n ],\n \"SafeTx\": [\n {\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"data\",\n \"type\": \"bytes\"\n },\n {\n \"name\": \"operation\",\n \"type\": \"uint8\"\n },\n {\n \"name\": \"safeTxGas\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"baseGas\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"gasPrice\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"gasToken\",\n \"type\": \"address\"\n },\n {\n \"name\": \"refundReceiver\",\n \"type\": \"address\"\n },\n {\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n }\n ]\n },\n \"primaryType\": \"SafeTx\",\n \"domain\": {\n \"chainId\": 1,\n \"verifyingContract\": \"0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6\"\n },\n \"message\": {\n \"to\": \"0xfbffef83b1c172fe3bc86c1ccb036ab9f3efcaf2\",\n \"value\": \"0\",\n \"data\": \"0x804e1f0a000000000000000000000000ef279c2ab14960aa319008cbea384b9f8ac35fc6\",\n \"operation\": 1,\n \"baseGas\": \"0\",\n \"gasPrice\": \"0\",\n \"gasToken\": \"0x0000000000000000000000000000000000000000\",\n \"refundReceiver\": \"0x0000000000000000000000000000000000000000\",\n \"nonce\": 42,\n \"safeTxGas\": \"0\"\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.webacy.com/scan/{fromAddress}/eip712")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"msg\": {\n \"from\": \"0x6535d5F76F021FE65E2ac73D086dF4b4Bd7ee5D9\",\n \"data\": {\n \"types\": {\n \"EIP712Domain\": [\n {\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n }\n ],\n \"SafeTx\": [\n {\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"data\",\n \"type\": \"bytes\"\n },\n {\n \"name\": \"operation\",\n \"type\": \"uint8\"\n },\n {\n \"name\": \"safeTxGas\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"baseGas\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"gasPrice\",\n \"type\": \"uint256\"\n },\n {\n \"name\": \"gasToken\",\n \"type\": \"address\"\n },\n {\n \"name\": \"refundReceiver\",\n \"type\": \"address\"\n },\n {\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n }\n ]\n },\n \"primaryType\": \"SafeTx\",\n \"domain\": {\n \"chainId\": 1,\n \"verifyingContract\": \"0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6\"\n },\n \"message\": {\n \"to\": \"0xfbffef83b1c172fe3bc86c1ccb036ab9f3efcaf2\",\n \"value\": \"0\",\n \"data\": \"0x804e1f0a000000000000000000000000ef279c2ab14960aa319008cbea384b9f8ac35fc6\",\n \"operation\": 1,\n \"baseGas\": \"0\",\n \"gasPrice\": \"0\",\n \"gasToken\": \"0x0000000000000000000000000000000000000000\",\n \"refundReceiver\": \"0x0000000000000000000000000000000000000000\",\n \"nonce\": 42,\n \"safeTxGas\": \"0\"\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"simulation": {
"domainRisk": {},
"partyRisk": {},
"counterpartyRisk": {},
"functionRisk": {
"selector": "<string>",
"functionName": "<string>",
"signature": "<string>",
"category": "<string>",
"description": "<string>",
"risks": [
"<string>"
],
"safeOperation": "<string>",
"safeMlScore": 123
}
},
"block": 123,
"timestamp": "2023-11-07T05:31:56Z",
"chain": "eth"
}Authorizations
Path Parameters
EVM address that will sign the message
Query Parameters
Force refresh cached risk data
Body
application/json
⌘I
