1Shot Gas Station V1 (Arbitrum)

1Shot Gas Station V1 (Arbitrum)

0x4E43...429CArbitrumArbitrum
LiFix402

Contract Level Prompt

Foundational semantic layer for AI interpretation.

psychology
This smart contract lets EOA's swap ERC-20 tokens that are x402-compatible for native gas tokens.

callDiamondWithEIP3009SignatureToNative()

nonpayable

Functional Prompt

This function allows the caller to present at EIP-3009 authorization with a Li.Fi Diamond Calldata quote that will swap the tokens associated with the authorization for native gas tokens indicated in the Diamond Calldata.

Input Parameters

input
tokenAddressaddress

The address of the token asset that the authorization was signed for.

input
fromaddress

The address which signed the authorization. This address must match the address in the `diamondCalldata`.

input
valueuint256

The amount of token to swap for native gas token.

input
validAfteruint256

The unix timestamp after which the authorization is valid.

input
validBeforeuint256

The unix timestamp before which the authorization is valid.

input
noncebytes32

A random 32 byte hex string to prevent replays

input
signaturebytes

A signature payload provided by the `from` address.

input
diamondCalldatabytes

A swap route computed by the [Li.Fi quote endpoint](https://li.quest/v1/quote).

Output Parameters

output
successbytes

Did the transaction succeed.