This site requires Javascript to be enabled.

Guzzler club gasless transaction

The Guzzler Club offers a gasless transaction solution on the Archway network, allowing users to interact with decentralized applications (dapps) without needing an ARCH token balance in their wallet. This guide covers how the solution works, core features, and how users can benefit from gasless transactions. You can access the Guzzler Club here.

Benefits to users

  1. New Archway Explorers: Enable new users to use dapps on Archway without requiring an initial ARCH balance.
  2. Archway Pros: Allow experienced users to save on transaction costs by leveraging free transactions.

Core features

  1. Finite Allocation of ARCH for Gas:
  • Every account receives a finite allocation of ARCH to spend on gas per epoch (21 days).
  • This allocation is automatically renewed at the start of each epoch.
  1. Earn Additional Free Transactions:
    • Users can increase their allocation of free transactions by completing basic tasks:
      • Stake ARCH: Stake ARCH tokens to earn extra gas credits.
      • Hold Drop Camp 'Astronomy' Patch NFT: Possessing this NFT increases your free transaction quota.
      • Hold a Revealed Archie NFT: Holding this NFT also boosts your allocation.
  2. Broadcast Transactions Without ARCH Tokens:
    • Users can perform transactions such as minting an NFT on Ambur or swapping USDC to AXV without needing any ARCH tokens in their wallet.

Dapp frontend integration

We've added a basic fee granter implementation guide that shows how you can use arch3.js to execute a transaction where the feegranter pays the gas fees. This is exactly what a frontend would need to do to utilize the Gas Guzzeler solution.

The the Guzzler Club mainnet contract address is archway1avwvqzu9gv86g5fxx5p2xqe0w33wklt27jusdrhszwccnfnxx0rsmzz8nu and this would be used as the fee granter address. The testnet address is archway17n7jp9drsltmwcjz4awet9khy5v0xnyrxdhrv0mwpr8m6cfxxcrsdz9zur.

In order for a user's account to take advantage of the Gas Guzzler fee grant, their account would have to be whitelisted by the fee granter contract address above. This happens when an account accesses the Guzzler Club and perform the required tasks which could be as simple as simple as linking their twitter account.

To check if an account is whitelisted and still has an allowance you can use the following command substituting $USER_ADDRESS with the actual address:

mainnet

testnet

archwayd query wasm contract-state smart archway1avwvqzu9gv86g5fxx5p2xqe0w33wklt27jusdrhszwccnfnxx0rsmzz8nu '{"member":{"address":"$USER_ADDRESS"}}' --chain-id archway-1 --node https://rpc.mainnet.archway.io:443 --output json | jq

You also have the option of checking this via javascript:

mainnet

testnet

import { ArchwayClient } from '@archwayhq/arch3.js';const client = await ArchwayClient.connect('https://rpc.mainnet.archway.io:443');const contractAddress = 'archway1avwvqzu9gv86g5fxx5p2xqe0w33wklt27jusdrhszwccnfnxx0rsmzz8nu';const userAddress = '<Add address>';const msg = {  member:{address: userAddress}};const data = await client.queryContractSmart(  contractAddress,  msg);console.log("Data: ", data);

Here’s an example response:

{  "data": {    "membership": true,    "updated": 0,    "allowance": "3000000000000000000"  }}
  • The membership flag is true if the address is on the Guzzler contract whitelist (i.e., their transactions can be granted)
  • Allowance is the current amount of aarch worth of gas fees the user is able to spend, which can be increased on the Guzzler Club. The ideal flow therefore involves checking if membership is true and allowance is greater than 0 for a specific address. If both conditions are met, then pass the Guzzler address as the granter.