Some blocks require more complex initialization, and in order not to go through the process of filling in the necessary parameters each time, this process has been allocated to a separate entity - the resource. You can read more about the resource on this page. Here we will give just a couple of examples of when the resources are used.
For example, if a node sends data to a third-party application. Of course, it is possible to add the process of user authorization to the trigger itself, but it is much more convenient if the user is authorized in advance and the block will pass only a reference to the resource containing authorization data.
Another example - a node that works with EVM smart contract events. Before starting such a node it is needed to specify with which smart contract, according to which scheme, and with which specific events it should work. If there is only one such trigger, it is not difficult to specify all these entities. But what if the task is to create a trigger for each event in the smart contract? In this case, it will be correct to describe the parameters of the smart contract - Address and ABI, in the resource, and the node will refer to the created resource.
To add a resource to the project, you need to go to the resources directory, create a resource configuration file there, and describe the resource properties in the file. For example, let's take the simple ERC20 smart contract of the USDT token.
Now we can use this resource to create a new trigger that fires every time an AddedBlackList event occurs on the network. The resource id to be specified in the trigger consists of user_id, project_name and resource_name:
<YOUR-USER-ID>.my-first-project.erc20-usdt
The user id can be found on the web3alert in Settings-Account-User ID.