import { claimTo } from "thirdweb/extensions/erc1155";
import { TransactionButton } from "thirdweb/react";
const wallet = inAppWallet({
executionMode: {
mode: "EIP7702",
sponsorGas: true,
},
});
function App() {
return (
<>
<ConnectButton
client={client}
wallet={[wallet]}
connectButton={{
label: "Login to mint!",
}}
/>
{/* since sponsorGas is true, transactions will be sponsored */}
<TransactionButton
transaction={() =>
claimTo({
contract,
to: "0x123...",
tokenId: 0n,
quantity: 1n,
})
}
>
Mint
</TransactionButton>
</>
);
}