Skip to content

Instantly share code, notes, and snippets.

@jparklev
Last active December 22, 2025 22:54
Show Gist options
  • Select an option

  • Save jparklev/129ac61e4ba7d88292f13bf8a273bec5 to your computer and use it in GitHub Desktop.

Select an option

Save jparklev/129ac61e4ba7d88292f13bf8a273bec5 to your computer and use it in GitHub Desktop.
Ethena S4 hyENA Grant Delegation - ERC-1271 Signatures

Ethena S4 hyENA Grant Delegation Signatures

ERC-1271 signatures from 22 Rumpel Wallets (Gnosis Safes) delegating their Ethena S4 hyENA grants.

Signed Message

Each wallet signed this message (with their own address):

I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).

Address: {wallet_address}
Timestamp: 2025-12-22T21:53:33.867Z

Transaction

Mainnet tx: 0xcb6316257a18883fe9bcabd8c467ac9e9fb35dba9bbbfec6342b1f6bac4d37f5

Verify a Signature

Using cast (Foundry)

cast call --rpc-url https://ethereum-rpc.publicnode.com \
    0x492a3Bf40B7884e2fbe4839fF4ABF637F7Ff7980 \
    'isValidSignature(bytes,bytes)(bytes4)' \
    $(cast --from-utf8 'I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).

Address: 0x492a3Bf40B7884e2fbe4839fF4ABF637F7Ff7980
Timestamp: 2025-12-22T21:53:33.867Z') \
    0x

Returns 0x20c13b0b if valid (ERC-1271 magic value for isValidSignature(bytes,bytes)).

Using the verification script

Requires Node.js and ethers:

npm install ethers
curl -O https://gist.githubusercontent.com/jparklev/129ac61e4ba7d88292f13bf8a273bec5/raw/verify-1271.mjs
node verify-1271.mjs

The script auto-fetches wallet data from this gist and verifies all 22 signatures.

Files

  • ethenaS4-messages.json - Complete signing data (wallets, messages, hashes)
  • verify-1271.mjs - Node.js verification script
  • README.md - This file

Technical Details

  • Signature type: ERC-1271 (smart contract signatures)
  • Safe version: v1.3.0
  • Method: isValidSignature(bytes,bytes) returning 0x20c13b0b
  • Signing mechanism: Gnosis Safe SignMessageLib via Rumpel Module
{
"description": "Ethena S4 ERC-1271 signing data for Rumpel Wallets",
"signTimestamp": "2025-12-22T21:53:33.867Z",
"destinationVault": "0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C",
"chain": "Ethereum Mainnet",
"walletCount": 22,
"wallets": [
{
"address": "0x492a3Bf40B7884e2fbe4839fF4ABF637F7Ff7980",
"points": "743587336430",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x492a3Bf40B7884e2fbe4839fF4ABF637F7Ff7980\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0x0a349e4b72520bb2dc79eaa2d6090e4c84a8114e6d16c0e313fe4c9243b9bfb0"
},
{
"address": "0xe7c241B82c2cd7e96E6ea656b08752f8C01DEc9a",
"points": "420936697049",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0xe7c241B82c2cd7e96E6ea656b08752f8C01DEc9a\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0x1f7086380436283ce251baa33b4da59827d31553955b7483956fcf958156a20f"
},
{
"address": "0x8e34b466AACD3e7A5B375875174b32800132e816",
"points": "26133538903",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x8e34b466AACD3e7A5B375875174b32800132e816\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0xf361ddffa4379e49271922d615424f81e79b3d14018558745e13c1e4b85e8505"
},
{
"address": "0x763727fDa5E4D26f44582cD0c7a925e3796c9865",
"points": "22800000000",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x763727fDa5E4D26f44582cD0c7a925e3796c9865\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0x48ce8d38a7aab5a79d885a848abcfc9c0c0249c974aa1f60de0c11cf827a0b66"
},
{
"address": "0x398FC27E8255083F353d46ae35F012fa542651BF",
"points": "22049243387",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x398FC27E8255083F353d46ae35F012fa542651BF\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0x4c01795bc43288f9a27f3cba9c171b38682ac39bcc676ef9d80f53396c3d18d1"
},
{
"address": "0x29784CB45D8B9DcE99F9a685F0372ce47506d4f3",
"points": "9180647316",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x29784CB45D8B9DcE99F9a685F0372ce47506d4f3\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0xd422a3566d4abec5023726c056c063d614ec6d8a9151bbe0b7918ac8e1fe8cae"
},
{
"address": "0x634503e8ce2d5b8F7915059fFf4d129B80720986",
"points": "7234776981",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x634503e8ce2d5b8F7915059fFf4d129B80720986\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0xbe9daa736cada716d34ee62df45d03594b76ad088cd285a7a24f6bc901476497"
},
{
"address": "0x67490861EBeAf8d81BF14C7ef83012AF6F7C1d32",
"points": "5845229835",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x67490861EBeAf8d81BF14C7ef83012AF6F7C1d32\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0x4ff4b0b14bf21ff2b31dd33f5befaa3941a904607f1ed2b6e6d31212d196e04e"
},
{
"address": "0x34422b9814f200Ca1BeEf97e3b11038bD190250b",
"points": "5496054457",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x34422b9814f200Ca1BeEf97e3b11038bD190250b\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0x05c84cbc6d552747bdc95cb75e79e209ce2366587b0c8ab008e6aceb973de053"
},
{
"address": "0x1c934fE001B0870ad1C55E4bc962d7c23CEb52D9",
"points": "5332741447",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x1c934fE001B0870ad1C55E4bc962d7c23CEb52D9\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0x2b993dbd9cbab80c2a6c01f9a06e9952a05e27bc7b4f94484572a1b502d3bd3e"
},
{
"address": "0xE6B461DE4fa13E064Eb5E44cEa09382207Fd8599",
"points": "4232600524",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0xE6B461DE4fa13E064Eb5E44cEa09382207Fd8599\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0x300f7125462f240ce3f8b5d6ef59a4b03a9905394aa8bc23c90eee7cb7e52867"
},
{
"address": "0x5777ccD3B8ac7E651eaf2506D996e6a5773515c5",
"points": "3800000082",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x5777ccD3B8ac7E651eaf2506D996e6a5773515c5\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0xd31b8789459cbeaeba6211db418cd98952929344cdc62efc6626dc24bf90e5ac"
},
{
"address": "0x0eE4064aE966F5e32deAec8Bcc17076328EbF439",
"points": "2478501707",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x0eE4064aE966F5e32deAec8Bcc17076328EbF439\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0xd2a359efada12bb7436cbee5e5b29f5427658fe45042217c44570ab1a0ab0e8c"
},
{
"address": "0x806bD06A6f12C88558D6577F83b349958998402e",
"points": "2196404636",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x806bD06A6f12C88558D6577F83b349958998402e\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0x7461567063835ef48901fe9735dee4f789d74e3385e392064a16565e40ae3225"
},
{
"address": "0xd5ddE0E0e2Ac668D887dADbb378D62389a7DB403",
"points": "2142151200",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0xd5ddE0E0e2Ac668D887dADbb378D62389a7DB403\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0xbfc1d5ea81eb68085e9b75ae1f84284c0d4344e8f1405880d857b4a6c0d65d80"
},
{
"address": "0x5a0B4Aa8eaDEB08f8055c7cA7592B4B2fCD821ea",
"points": "2067244278",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x5a0B4Aa8eaDEB08f8055c7cA7592B4B2fCD821ea\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0x9da7e7c4699936cd44e24cce664c91345bd6fff5e6134722e9bc6b6c2e46c79c"
},
{
"address": "0x035696d14dF7035e584c086Bfda7D9Bea71BD01f",
"points": "1779915674",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x035696d14dF7035e584c086Bfda7D9Bea71BD01f\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0x40187f259a7fe630cb9cf21d7cfa8e1cc9696ecc456355d16c6e43b4a0fe358f"
},
{
"address": "0x39d8FBeD80af431561168fED85559F2A0902f2f2",
"points": "1660351165",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x39d8FBeD80af431561168fED85559F2A0902f2f2\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0x8ddf26d64179cfebc4843de6c1e6d2c7139ff6a3227ef1ccd28ba14b13e36255"
},
{
"address": "0x5995Fb0c5602eD24fd129227De801eb2b4b1E842",
"points": "1601940635",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x5995Fb0c5602eD24fd129227De801eb2b4b1E842\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0xb8e6205dd01eae7a231ed05904c847f05908519d2ec07264a63af484b5a4f840"
},
{
"address": "0xf92d068C0E9345BbC36b76825f5caa431b37A763",
"points": "609476592",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0xf92d068C0E9345BbC36b76825f5caa431b37A763\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0x3105e6be9289be3af57e3d1999a4514fcd51e19f0034f911361fd0df709038be"
},
{
"address": "0x33270Fc9b126343259D2F057316147C8eE0A2b61",
"points": "212214973",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0x33270Fc9b126343259D2F057316147C8eE0A2b61\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0x416d573142d1e9bc6af2e12c43b34cc03d4f44bd789bc3212effa8c77d7fb076"
},
{
"address": "0xB498546e5628EDB8f342eB102A990af57C941c6B",
"points": "198914040",
"message": "I delegate my Ethena S4 hyENA grant and its requirements to 0xC3b789BD1489E8f50324Ba53DcBC536699BBEd8C on HyperCore (HyperEVM).\n\nAddress: 0xB498546e5628EDB8f342eB102A990af57C941c6B\nTimestamp: 2025-12-22T21:53:33.867Z",
"hash": "0xc6c4a0324ea4f187f942648ddde73fec10a0967b5a8664de23c223797fbfc0fd"
}
]
}
#!/usr/bin/env node
/**
* Ethena S4 ERC-1271 Signature Verification Script
*
* Verifies that each Rumpel Wallet (Safe) has successfully signed
* the delegation message via ERC-1271.
*
* Usage:
* node verify-1271.mjs [--rpc-url <url>] [--messages-file <path>]
*
* Can also fetch messages directly from gist (standalone mode):
* curl -s <this-script-url> | node
*
* Requirements:
* - ethers (npm install ethers)
*/
import { ethers } from "ethers";
import fs from "fs";
import path from "path";
import { fileURLToPath } from "url";
// Gist URL for standalone execution
const MESSAGES_GIST_URL = "https://gist.githubusercontent.com/jparklev/129ac61e4ba7d88292f13bf8a273bec5/raw/ethenaS4-messages.json";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
// ERC-1271 magic values for valid signature
const MAGIC_VALUE_BYTES32 = "0x1626ba7e"; // isValidSignature(bytes32,bytes)
const MAGIC_VALUE_BYTES = "0x20c13b0b"; // isValidSignature(bytes,bytes) - legacy, used by Safe v1.3
// Default RPC URL (public Ethereum mainnet)
const DEFAULT_RPC_URL = "https://ethereum-rpc.publicnode.com";
// ERC-1271 interface - Safe v1.3 uses the bytes version
const ERC1271_ABI = [
"function isValidSignature(bytes data, bytes signature) external view returns (bytes4)",
];
async function verifySignature(provider, safeAddress, message) {
const contract = new ethers.Contract(safeAddress, ERC1271_ABI, provider);
try {
const messageBytes = ethers.toUtf8Bytes(message);
const result = await contract.isValidSignature(messageBytes, "0x");
return result === MAGIC_VALUE_BYTES;
} catch (error) {
return { error: error.message };
}
}
async function main() {
// Parse command line arguments
const args = process.argv.slice(2);
let rpcUrl = DEFAULT_RPC_URL;
let messagesFile = path.join(__dirname, "out", "ethenaS4-messages.json");
for (let i = 0; i < args.length; i++) {
if (args[i] === "--rpc-url" && args[i + 1]) {
rpcUrl = args[++i];
} else if (args[i] === "--messages-file" && args[i + 1]) {
messagesFile = args[++i];
}
}
// Load messages file (local or from gist)
let data;
if (fs.existsSync(messagesFile)) {
data = JSON.parse(fs.readFileSync(messagesFile, "utf-8"));
console.log(`Loaded from local file: ${messagesFile}`);
} else {
console.log(`Local file not found, fetching from gist...`);
const response = await fetch(MESSAGES_GIST_URL);
if (!response.ok) {
console.error(`Failed to fetch messages from gist: ${response.status}`);
process.exit(1);
}
data = await response.json();
console.log(`Loaded from gist: ${MESSAGES_GIST_URL}`);
}
const wallets = data.wallets;
console.log("=== Ethena S4 ERC-1271 Signature Verification ===\n");
console.log(`RPC URL: ${rpcUrl}`);
console.log(`Messages file: ${messagesFile}`);
console.log(`Sign timestamp: ${data.signTimestamp}`);
console.log(`Wallets to verify: ${wallets.length}\n`);
// Connect to provider
const provider = new ethers.JsonRpcProvider(rpcUrl);
// Verify each wallet
let passed = 0;
let failed = 0;
const results = [];
for (const wallet of wallets) {
process.stdout.write(`Verifying ${wallet.address}... `);
const result = await verifySignature(provider, wallet.address, wallet.message);
if (result === true) {
console.log("✓ VALID");
passed++;
results.push({ address: wallet.address, valid: true });
} else if (result.error) {
console.log(`✗ ERROR: ${result.error}`);
failed++;
results.push({ address: wallet.address, valid: false, error: result.error });
} else {
console.log("✗ INVALID");
failed++;
results.push({ address: wallet.address, valid: false });
}
}
// Summary
console.log("\n=== Summary ===");
console.log(`Total: ${wallets.length}`);
console.log(`Passed: ${passed}`);
console.log(`Failed: ${failed}`);
if (failed > 0) {
console.log("\nFailed wallets:");
results.filter(r => !r.valid).forEach(r => {
console.log(` ${r.address}${r.error ? ` (${r.error})` : ""}`);
});
process.exit(1);
}
console.log("\nAll signatures verified successfully!");
}
main().catch((err) => {
console.error(err);
process.exit(1);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment