ShelterSplit Rail · MIT · no dependencies
Any game can add a shelter button.
One script tag gives players a "Give to the shelter" button and a live meter read straight from the chain, on Arc, Tempo, Arbitrum, Avalanche, Base, Robinhood Chain and Monad. The gift goes from the player's wallet to the shelter's wallet, and the contracts pass it on in the same transaction. Where a gift router and a relay are set up, the player signs once and pays no gas; the relay never holds the gift. See the disclosure below about who holds Pink Paw's wallet today.
Try it
Needs a browser wallet on Arc testnet with test USDC from the Circle faucet. One transaction; USDC also pays the network fee.
How a gasless gift moves
- The player signs once. One USDC
ReceiveWithAuthorization(EIP-3009). No gas, no approve, no transaction from their wallet. - A relay submits it. It pays the gas but cannot change the amount, the memo or the payee: the nonce is bound to the router and the memo.
- The DonateRouter pays the shelter. It pulls the USDC and splits it through ShelterSplit to the shelter wallet in the same transaction.
- The router has no owner and keeps no balance.
- It reverts if any part of a gift would reach the split's treasury.
- Every payout is a public event; the “Shelters received” total in the Try it panel reads them live.
<script src="https://tokentails.com/rail/widget.js"
data-chain="5042002"
data-split="0x457c89e10a6e66633eda5bf82fd086febb5db147"
data-shelter="Pink Paw"
data-amount="10000000000000000"></script>
<!-- gasless, where a DonateRouter and a relay exist:
data-mode="gasless" data-router="0x…" data-usdc="0x…" data-relay="https://<your relay>/shelter/relay" -->
For AI agents: standard x402
The Token Tails cat-card endpoint answers 402 Payment Required with the standard x402 exact scheme. Its payTo is the shelter's wallet: the agent signs one USDC transferWithAuthorization, a facilitator settles it and pays the gas, and the agent gets a shelter-cat card back.
Works with the rail's SDK in one call: payAndFetch(url, { maxAmountBase: 10000n, provider }). Standard x402 clients: the off-the-shelf x402-fetch client reads the offer, signs it and passes the public facilitator's verify step on a testnet; a full settlement through that facilitator is still being tested. On mainnet the scheme opens once Token Tails records the shelter's wallet handover.
Disclosure: On testnet, payouts go to a wallet Token Tails holds for the shelter. On mainnet, payouts go to Pink Paw's wallet, which Token Tails created. The contracts are non-custodial. This page uses testnet tokens with no real value.