Frequently Asked Questions

Halliday Smart Accounts

What is the difference between a signer (authenticator) and the Halliday Smart Account?

In the context of Halliday Smart Accounts, the signer (or authenticator) behind the scenes is a public-private key pair that signs off on transactions, thereby proving that the transactions originate from the intended user. The private key is entirely in the player's control, as only the player should have access to that private key. The signer can be from an existing external wallet provider (i.e. Metamask), or a unique public-private key pair that is generated via social login. The Smart Account then, with the appropriate signature from the signer, is the address that issues the transactions on chain.

The Halliday Smart Account is powered by ERC-4337. In essence, it is a smart contract on chain that has all the functionality of a traditional wallet, but with additional features since it is programmable. This is the account that will hold all of the player's assets and funds. Users can retrieve their Halliday Smart Account details by calling getOrCreateHallidayAAWallet().

  • The address of the Halliday Smart Account will be different than the wallet address! The term user's account address refers to the user's Halliday Smart Account Address.
  • There is cryptography that maps the wallet address 1:1 to the Halliday Smart Account address, allowing for features such as social recovery.
  • The wallet address is generally not used for any Halliday Smart Account operations, since it only signs off on transactions. However, you can set it to be the in_game_player_id for your players, and then use it as the player's id in the context of the Halliday SDK.
    • You can still use the signer for personal use, unassociated with the Halliday Smart Account!
  • The signer owns and controls the Halliday Smart Account. All transactions sent by the Halliday Smart Account will need to be approved (signed off) by the authenticator. In our SDK, we handle this logic for you, so you don't need to click "approve" every time.
    • Thus, the signer does not issue any transactions, but rather the Halliday Smart Account will. A signature from this signer is needed before any transaction can be issued by the Halliday Smart Account.
  • The player's Halliday Smart Account (the contract) will not be deployed on chain until some first transaction is sent from the Halliday Smart Account.
    • Thus, before the first transaction is made, there is no contract at the Halliday Smart Account address, even if you call getOrCreateHallidayAAWallet().
    • Upon sending the first transaction, the contract that represents the player's Halliday Smart Account will be deployed to the address returned by getOrCreateHallidayAAWallet().
    • There is no need to send a "special" or "empty" transaction to deploy this account. The account will be automatically deployed upon any first transaction.
    • You can treat an undeployed Halliday account similar to any other address on chain. If you send tokens to the Halliday Smart Account address before it is deployed, you will be able to access them after the account is deployed.

Are our users’ wallets permanently under Halliday’s control? What happens if we one day want to add in more functionality like issuing airdrops for marketing campaigns? Do we need to hold all of our own assets in a Halliday Smart Account as well?

Our accounts are fully non-custodial, meaning your players are the true owners of their assets. Any transactions issued from the Halliday Smart Account will also require the user to sign off. We couldn’t control the wallets if we tried.


Managing Assets in the Halliday Smart Account

How can I see what assets are in my Halliday Smart Account?

You can see all unique assets in your Halliday Smart Account as follows:

// Get NFTs in the Halliday Smart Account
const assets = await hallidayClient.getAssets(yourInGameIdForTheUser);

// Get ERC20 balances and native token balances in the Halliday Smart Account
const balances = await hallidayClient.getBalances(yourInGameIdForTheUser);

How can I transfer assets in and out of my Halliday Smart Account?

To transfer assets into the Halliday Smart Account, you will first need to determine the Smart Account Address with getOrCreateHallidayAAWallet(). Then, you can use Metamask or ethers.js to transfer your tokens into the account so you can use them in the game! For assistance with this process, please contact a Halliday representative at [email protected].

// Retrieve the wallet, and the wallet's account address
const wallet = await hallidayClient.getOrCreateHallidayAAWallet(
  "your_in_game_id_for_user",
  "[email protected]"
);
const hallidayAccountAddress = wallet.account_address

// Send your assets to hallidayAccountAddress!

To transfer NFTs out from the Halliday Smart Account, you can follow the steps below:

  1. Prepare the address of the NFT, the token ID, and the destination external wallet address.
  2. Construct the calldata of the transferFrom call:
const collection_address = "0x..."						// The ERC721 contract address
const external_address = "0x..."							// Your external wallet address
const nft_contract = new ethers.Contract(collection_address, erc721Abi, provider);
const transfer_calldata = nft_contract.interface.encodeFunctionData("transferFrom", [
  from_account_address,												// The Halliday Smart Account Address
  external_address,
  token_id
]);
  1. Call the callContract() function:
// Call the contract, with gas sponsored by the paymaster
const contractCallTxInfo = await hallidayClient.callContract({
  from_in_game_player_id: yourInGameIdForTheUser,
  target_address: collection_address,						// The ERC721 contract address
  value: "0",
  transfer_calldata,
  sponsor_gas: true
})

You can transfer ERC20 tokens and native tokens out of the Halliday Smart Account using the same technique as above, replacing the calldata and value parameters as appropriate.

Can I airdrop tokens into the Halliday Smart Account?

Yes! You can get the Halliday Smart Account address through getOrCreateHallidayAAWallet(), then airdrop tokens to that address.


Halliday AnyChain Onramp

Is the Halliday AnyChain Onramp more expensive than existing Onramps?

No, The Halliday AnyChain Onramp is not more expensive than existing solutions. In addition, our AnyChain Onramp drastically reduces the user-end complexities of moving purchase tokens, moving them across chains, and finally acquiring the desired token, all for the same price as a manual endeavor!


What’s Next