![]() If you are interested in learning more about solidity interaction with other contracts, check out my post and let me know what you think in the comments. You will learn how to access the kitty data from their smart contract and use it in your own contract. I will use the example of CryptoKitties, a popular game where you can collect and breed digital cats on the blockchain. In this post, I will show you how to interact with external smart contracts in solidity using interfaces, contract addresses and function calls. ![]() But did you know that you can also interact with other smart contracts from your solidity code? This can open up many possibilities for composability, interoperability and innovation in the decentralized space. I'm not sure if my approach to the problem or the containers I'm choosing are causing the steep sorting times.Solidity is a powerful programming language for smart contracts on Ethereum. I will post my two best attempts, initial one with vectors, which I thought I could upgrade by replacing vector with unsorted_map because of the better time complexity when searching, but to my surprise, there was almost no difference between the two containers when I tested it. The problem is that my code is supposed to handle datasets of up to 5 million pairs. I've been able to produce code which doesn't have much problem sorting these datasets up to 50k pairs, where it takes about 4-5 minutes. so the first string would point to zvEcqe,hbFvMF for example and the list goes on. The data I'm handling is made up of pairs of strings like this hbFvMF,PZLmRb, each string is present two times in the dataset, once on position 1 and once on position 2. I'm tackling a exercise which is supposed to exactly benchmark the time complexity of such code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |