Quantcast
Channel: Active questions tagged rustc - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 37

Solana Program 1 time initialization Issue

$
0
0

I want to add a check that once a function is called it should never be called again. I want initialization to be one-time only. Is this a good approach if I take a bool value and set it to false after initialization and check if it's false then don't run the function? Or is there a standard or better way?

P.S = In short I want a smart contract once initialized should never be able to initialize again.


Viewing all articles
Browse latest Browse all 37

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>