Skip to main content
added 11 characters in body
Source Link

I have been working on this dapp lately that allow users to create a product with an expiration date (don't mind the specifics of the app). Once expired, a call to a smart contract should be made (transaction) and the product state should be changed to "expired". The question is - how to manage this task scheduling? I thought about building a mechanism on my own using smart contracts and off-chain services (similar to how Chainlink's model works) but I keep stumbling upon the gas fees require to trigger my contract on expiration. I also tried to figure out Chainlink's Automation but: They don't have mocks to test locally They offer a UI to register the "Upkeep" (their brand for the scheduled job) while I need to do it programmatically.

  1. They don't have mocks to test locally
  2. They offer a UI to register the "Upkeep" (their brand for the scheduled job) while I need to do it programmatically.

Please advice.

P.S: I could do all of this off-chain using microservices and regular databases, but obviously this misses the whole point

I have been working on this dapp lately that allow users to create a product with an expiration date (don't mind the specifics of the app). Once expired, a call to a smart contract should be made (transaction) and the product state should be changed to "expired". The question is - how to manage this task scheduling? I thought about building a mechanism on my own using smart contracts and off-chain services (similar to how Chainlink's model works) but I keep stumbling upon the gas fees require to trigger my contract on expiration. I also tried to figure out Chainlink's Automation but: They don't have mocks to test locally They offer a UI to register the "Upkeep" (their brand for the scheduled job) while I need to do it programmatically.

Please advice

P.S: I could do all of this off-chain using microservices and regular databases, but obviously this misses the whole point

I have been working on this dapp lately that allow users to create a product with an expiration date (don't mind the specifics of the app). Once expired, a call to a smart contract should be made (transaction) and the product state should be changed to "expired". The question is - how to manage this task scheduling? I thought about building a mechanism on my own using smart contracts and off-chain services (similar to how Chainlink's model works) but I keep stumbling upon the gas fees require to trigger my contract on expiration. I also tried to figure out Chainlink's Automation but:

  1. They don't have mocks to test locally
  2. They offer a UI to register the "Upkeep" (their brand for the scheduled job) while I need to do it programmatically.

Please advice.

P.S: I could do all of this off-chain using microservices and regular databases, but obviously this misses the whole point

Source Link

Triggering User Defined Jobs On-Chain

I have been working on this dapp lately that allow users to create a product with an expiration date (don't mind the specifics of the app). Once expired, a call to a smart contract should be made (transaction) and the product state should be changed to "expired". The question is - how to manage this task scheduling? I thought about building a mechanism on my own using smart contracts and off-chain services (similar to how Chainlink's model works) but I keep stumbling upon the gas fees require to trigger my contract on expiration. I also tried to figure out Chainlink's Automation but: They don't have mocks to test locally They offer a UI to register the "Upkeep" (their brand for the scheduled job) while I need to do it programmatically.

Please advice

P.S: I could do all of this off-chain using microservices and regular databases, but obviously this misses the whole point