#infinite loop on smart contract
1 messages · Page 1 of 1 (latest)
There is a limit to how much CPU a contract can use, and it has to start and finish execution with a ledger
Also: it couldn't report to a webserver as smartcontracts can't access the internet
You can have the webserver run a loop that checks the things you want every x time.
That could involve calling a smart contract, but may not be the best way.
It might make more sense to have it check conditions, then call a contracts when the conditions are right
well, i wanted to use smart contract to remove the need of an webserver
i can do with normal api what i need
this require a vps/ pc server
i was thinking i can deploy a smart contrac that remove the need of a webserver
smart contracts (or blockchain in general) are not a replacement for the web servers.
the storage and compute is much, much more expensive on chain compared to e.g. AWS and this is intententional
i dont trust webservers for storing wallet secret keys and so.
My actual codes and scripts are made in python, which work perfect.. i just need to store them on some webserver to run 24/24
But i have many many money in that codes, are secret keys and so
i dont know what way to chose
to be clear, smart contracts shouldn't store the secret keys either - all the data on blockchain is public. what I'm trying to point at is that you need to design your apps in web3-compatible fashion. smart contracts can do mutating operation, then indexers can be used to read only operations. for your secret key management you should be using some wallet software/hardware