Coder Social home page Coder Social logo

modernexodus / solidity-data-structures-and-utils Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 6 KB

A collection of useful data structures and utilities I am putting together as part of other ongoing solidity projects.

Solidity 32.95% JavaScript 67.05%
ethereum ethereum-blockchain solidity solidity-contracts truffle data-structures heap minheap maxheap quickselect

solidity-data-structures-and-utils's Introduction

solidity-data-structures-and-utils

A collection of useful data structures and other utils I've built while building different projects on the Ethereum blockchain.

Coming Soon

  • Completion of other common heap functions (heapify, extract, etc)
  • Median Heap (great solution for the moving median problem)
  • QuickSelect implementation (with Lomuto partitions)
  • Gas cost analysis
  • Node package available via npm

Contributions

All feedback and pull requests are welcome! If you see a way to optimize, please raise a PR! I will be happy to review and discuss any changes with you! I am adding items to this repo as I build them for other projects, so I am not focusing primarily on this and would greatly appreciate any help.

Project Structure

This project was created using Truffle CLI. Useful Commands:

  • truffle develop (spin up your own development blockchain)
  • truffle compile (compile all contracts)
  • truffle migrate (migrate all compiled contracts to development blockchain)
  • truffle test (run all unit tests)

Disclaimer

I do not guarantee these are completely optimized. Use of these implementations may or may not result in optimal gas costs for transactions. By the very nature of the current version of the Ethereum blockchain, operations with large amounts of data tend to be expensive. In the near future, I will be publishing some analysis of gas usage as well as making some optimizations.

License

Every thing I publish to this repository is available under the MIT license.

solidity-data-structures-and-utils's People

Contributors

modernexodus avatar

Watchers

 avatar

Forkers

vitaly-z

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.