Hi friends, how i can load another contract from contrract address via my contract? For example i have my token, and master contract, and its need to upgrade master contract, without deploying new token contract. Please Help ME!!!!)
Sep 9, 2020, 5:35 AM
Literally the first hit. You're welcome:
https://lmgtfy.com/?q=Importing+other+contracts+into+one+another+Solidity
https://lmgtfy.com/?q=Importing+other+contracts+into+one+another+Solidity
I guess the proper way would be to have the jobs to be async and wait for the tx to complete
Sep 9, 2020, 5:33 PM
this isnt scalable
lets say you are playing slither.io
at any given point in time ten to twenty people's games are ending
so you'd need at least double that in UTXO's to handle that load
Sep 9, 2020, 5:35 PM
hm, maybe I can't follow you, bc I don't know the logic of you game
Sep 9, 2020, 5:35 PM
Its more about handling multiple transactions at once than the actual game
the game is just a use case
Sep 9, 2020, 5:36 PM
okay, but in the end you are not handling the transactions. You fire them and listen to the event of success/fail, isn't it?
Sep 9, 2020, 5:37 PM
I've kind of given up on that
Sep 9, 2020, 5:37 PM
can't see the problem for 10 users to fire txs at the same time
Sep 9, 2020, 5:37 PM
just send the transaction and check the blockchain for a confirmation
Sep 9, 2020, 5:38 PM
yep. And how could that be not handled for many users?^
Sep 9, 2020, 5:38 PM
it's fine as long as you have a utxo, but if you have to send two transactions out simultaneously and there is only one utxo, you have to wait for it to be mined
Sep 9, 2020, 5:39 PM
two users can never have one UTXO
Sep 9, 2020, 5:39 PM
right now the strategy I am coming up with is, queuing system with redis, jobs get queued only when utxos are not available
Sep 9, 2020, 5:39 PM
or am I not gettingit ? 😃
Sep 9, 2020, 5:39 PM
so it's an array
do you know how many elements the array will contain?
Sep 9, 2020, 5:58 PM
No, debe ser infinito
Sep 9, 2020, 5:59 PM
well in the ethereum world, for loops without bounds cost a lot
usually the design of thesecontracts is to ship functinos like that off to the dapp
Sep 9, 2020, 6:00 PM
I am currently working with TRON.
Sep 9, 2020, 6:00 PM
I understand that, but the same principle applies
for example, you can scan for transactions to your contract, and then you have a list of addresses that have interacted with it
then you can return a poll with information for
Sep 9, 2020, 6:02 PM
I added the variable that stores "now" to the function that reads the contract data, such as: Total Invested and Total in referrals. but even so when I pass the corresponding parameter it does not I read it from the website
Sep 9, 2020, 6:05 PM
thats all the time i have for tonight, im fried, bedtime. Good luck
Sep 9, 2020, 6:07 PM
So, what can I use some code from the web to read the date of the last withdrawal from the Active Wallet that is interacting on the web?
Sep 9, 2020, 6:07 PM
I'd suggest passing some code samples
https://github.com/TRON-US/tronweb
Sep 9, 2020, 6:09 PM
Ok friend, I really appreciate your time. I will try again some ideas and share with you. Thank you so much 🙏🙏🙏
Sep 9, 2020, 6:09 PM
https://medium.com/@ybigus/creating-dapp-for-tron-platform-6b77f989c93d
Sep 9, 2020, 6:12 PM