Make the generated wallet visible on the chain

const provider = await Provider.create(FUEL_BETA_5_NETWORK_URL);

  const recipient: WalletUnlocked = Wallet.generate({ provider });
  • This method creates a new wallet on fuel.
const txResponse = await myWallet.transfer(
    recipient.address,
    100,
    BaseAssetId
  );

  await txResponse.waitForResult();

  const transactionSummary = await txResponse.getTransactionSummary();

Here I’ll have to make a transaction that will fund the newly created wallet address.
After that, I’ll have to make another transaction where I’ll take the amount back as my main intention is to just create the wallet not to make the fund transaction. So I was hoping that there is an operation where I just create it with zero balance and is also visible on the chain.
It becomes a fund refund kinda transaction. I was more hoping it could be a paymaster kind of operation.

Is the idea to just make the account visible in the block explorer?

If so, you could just create a fake token and send one unit of that token to each of the new accounts.

Not entirely sure that would be cheaper though.

Why do you need the account to show up in the block explorer?

@nick

Is the idea to just make the account visible in the block explorer?

yes, But I don’t want the fund refund kind of scenario. I want to use a paymaster similar to aptos where I can just call 0x1::create_account function and the gas is sponsored from the paymaster.

Is it possible to create a wallet with zero balance on-chain using the SDK?

Presently, we don’t have good tooling yet for that style of fee system just yet.

A pay-master style predicate would resolve this more wholistically, but it has not been standardized or normalized in our tooling just yet.

Short term solution:

  • Just send the user some ETH for gas

Mid term solution:

  • Fee payer standardization in predicates and multi-user msg_sender support in smart contracts

Long term solution:

  • Complete fee payer infrastructure with Fuel Station.

The good news is that Fuel supports multi-user fee payer like interactions with our existing transaction model, we just don’t have this tooled very well right now in our offered predicate design.

1 Like

In regard to your zero-balance question, account indexing happens when a transaction sends any native asset to an owner account.

So long as you send that account some asset (which could be any kind of native asset), it will get picked up in block explorer indexing.

1 Like

@nick How can I deploy a predicate

Hey @shivamlync please take a look at this multisig tutorial for details about predicates.

TLDR you don’t deploy a predicate. When building a predicate program it generates a predicate root akin to an EOA

1 Like