NFT/Token Gating is a feature of access control, just like access lists. It is a way of restricting access to those who have certain NFTs or tokens. For example, you can:
The feature works by defining what are called “gates”. You can have multiple gates based on different contract addresses. Inside of a gate you can add multiple criteria which all needs to be fulfilled for gate to be applied. Remember that between different gates we are adding an OR
statement. That allows you to create a complex logic based on AND
and OR
gates, as you’ll see in the example section on this page!
Visit the Access Control tab of the Dynamic dashboard.
jwt
token.Ethereum
, Polygon
, Optimism
, Arbitrum
. If you need another, let us know!Block site for users without specific amount of tokens.
Gate setup:
Add scope for users jwt
when having specific NFT
Gate setup:
admin
scopeadmin
scope added to the jwt
To simplify working with scopes, we created a custom hook named useDynamicScopes
. It allows checking for users scopes and checking if one or many of them are in users jwt
token. Check the docs here.
NFT/Token Gating is a feature of access control, just like access lists. It is a way of restricting access to those who have certain NFTs or tokens. For example, you can:
The feature works by defining what are called “gates”. You can have multiple gates based on different contract addresses. Inside of a gate you can add multiple criteria which all needs to be fulfilled for gate to be applied. Remember that between different gates we are adding an OR
statement. That allows you to create a complex logic based on AND
and OR
gates, as you’ll see in the example section on this page!
Visit the Access Control tab of the Dynamic dashboard.
jwt
token.Ethereum
, Polygon
, Optimism
, Arbitrum
. If you need another, let us know!Block site for users without specific amount of tokens.
Gate setup:
Add scope for users jwt
when having specific NFT
Gate setup:
admin
scopeadmin
scope added to the jwt
To simplify working with scopes, we created a custom hook named useDynamicScopes
. It allows checking for users scopes and checking if one or many of them are in users jwt
token. Check the docs here.