1Shot Gas Station V1 (Arbitrum)

1Shot Gas Station V1 (Arbitrum)

0x4E43...429CArbitrumArbitrum
LiFix402

Contract Level Prompt

Foundational semantic layer for AI interpretation.

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

tokenAddressaddress

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

fromaddress

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

valueuint256

The amount of token to swap for native gas token.

validAfteruint256

The unix timestamp after which the authorization is valid.

validBeforeuint256

The unix timestamp before which the authorization is valid.

noncebytes32

A random 32 byte hex string to prevent replays

signaturebytes

A signature payload provided by the `from` address.

diamondCalldatabytes

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

Output Parameters

successbytes

Did the transaction succeed.