Sponsor transactions
One of the biggest UX enhancements unlocked by smart accounts is the ability for app developers to sponsor their users' transactions. If your ecosystem has a gas policy enabled, you can start sponsorship your user's transactions by using the policy in your dashboard.
Use a policy when injecting your provider
Sponsor all transactions that will be made with the injected provider.
app.tsx
import { sdk } from './sdk'
 
function App() {
  useEffect(() => {
    sdk.getEthereumProvider({policy: 'pol_...'});
  }, []);
  return (
    <div/>
  )
}Updating the policy
Updating your policy is useful if you change chain and need to specify a different policy ID.
app.tsx
import { sdk } from './sdk'
 
function App() {
  useEffect(() => {
    sdk.setPolicy({policy: 'pol_...'});
  }, []);
  return (
    <div/>
  )
}You can also configure your own app level policy. Check the details in the dashboard section.
- 
Using an external paymaster setup. 
- 
Learn how to use erc20 tokens to pay for gas fees.