Using policies
Once created, policies will only be used if you explicitly pass the Policy ID when running a transaction. The general rule of thumb is that the policyId
property will be available on every method in our SDK if the method itself triggers an on-chain transaction.
const transaction = await beam.assets.transferAsset("your-sender-id", {
receiverEntityId: "your-receiver-id",
assetAddress: "your-contract-address",
assetId: "73",
// ...
sponsor: false, // 👈 This handles the transaction to be self paid
policyId: "cl..", // 👈 This triggers the custom policy to be used
});
Reporting
If you're interesting in getting insight into how each policy is performing in your game, head over to Reporting