不论在哪条链上,使用 Chainlink VRF,要支付的费用都是三部分组成的:
fulfillRandomness
,这个回调函数会对返回的随机数进行操作。所以使用的费用就是 premium fee + (callback gas + verification gas)* gas price。其中 gas price 可以在写用户合约的时候选择,就是gas lane。也可以在上述文档中找到,不同的链所对应的不同的 gas lane。
刚看的文档, 简单来说是调用合约的gas费, 和需要支付LINK代币的订阅费用, 不知道理解的对不对
--- 文档原文
Subscription billing
For Chainlink VRF v2 to fulfill your requests, you must maintain a sufficient amount of LINK in your subscription balance. Gas cost calculation includes the following variables:
Gas price: The current gas price, which fluctuates depending on network conditions.
Callback gas: The amount of gas used for the callback request that returns your requested random values.
Verification gas: The amount of gas used to verify randomness on-chain.