Git Product home page Git Product logo

solidity-patterns's People

Contributors

0x3bfc avatar aldnav avatar bossm0n5t3r avatar colddevil avatar dawsbot avatar fravoll avatar gruz0 avatar meow-jsx avatar nilock avatar olich97 avatar timhaines avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

solidity-patterns's Issues

Add mention to PREVRANDAO as a possible source of randomness

Since the merge, the Ethereum network has replaced block difficulty with the random number that determined which validator gets to validate a block.

It's used by OpenSea's SeaDrop when trying to shift all token IDs by some random number to ensure a fairer distribution:

https://github.com/ProjectOpenSea/seadrop/blob/main/src/extensions/ERC721PartnerSeaDropRandomOffset.sol#L68

More about it here: https://soliditydeveloper.com/prevrandao

Xrp

Fine,..$999.() of coin)* :in; wallets .,

Add security warnings

This is a great resource. ๐Ÿ‘

One thing I'd suggest is a brief warning somewhere attached to each pattern to indicate that the code hasn't been audited, and you're making no promises about correctness or safety (unless you have/are). This would be similar to the safe/unsafe patters in our best practices

It's really important in our space to build a culture of security, and this is a small example of how that manifests.

Is the sealedSeed in Randomness contract secure?

Hey, one concern I had about the contract sample in your article is the state variable bytes32 sealedSeed; is stored in the first slot of the contract storage. Isn't this easily accessed by web3.eth.getStorageAt(contractAddr, 0) function? A malicious attacker can read the seed and make a sure bet.

GitHub Pages broken links

Well, maybe it's not that essential, but last 5 links in your documentation (site version) leads to Not found (but works fine if manually change to html version and without dot, in the beginning, you know). Everything else is great, by the way.

Colony reference -> 404

"Another example is the EtherRouter contract of Colony" in upgrade ร—ร— .md has a broken link in it.

Oraclize version and exchange API endpoint require updating

Within solidity-patterns/Oracle/oracle.sol:

The oraclize import should be changed to "github.com/oraclize/ethereum-api/oraclizeAPI_0.4.sol" to maintain compatibility (the other option being updating the compiler version to 0.5.0).

Also, the api.fixer.io endpoint is now deprecated, and the new endpoint requires an API key to use. To fix this, the "https://api.exchangeratesapi.io/latest?symbols=USD" endpoint can be used as a drop-in replacement to the fixer endpoint.

Thanks!

requires updating?

Not sure if there is error, or just change in compiler, but in your code you've got strings, a b compared with return keccak256(a)==keccak256(b) which doesn't compile, needs `keccak256(bytes(a))==keccak256(bytes(b));

Add License for both documentations and source codes.

It would be helpful if there's explicit license name on each objects in this repository.
(e.g, MIT, GPLv3, etc)

We are planning to make Smart Contract Design Pattern repository with code executable environment, and wondering if we could include your patterns or not.

Security Scan of your project

We have scanned your project on https://scanmycode.io for Web2 & Web 3 and Infractructure Cloudnative issues. Including: PHP, Java, Scala, Python, Ruby, Javascript, Typescript, GO, Solidity, DeFi Security, Infrastructure as a Code Best Practice and Security (Docker, Kubernetes (k8s), Terraform AWS, GCP, Azure), Secret Scanning, Dependency Confusion, Trojan Source, Open Source and Proprietary Checks. Feel free to go to https://www.scanmycode.io/defiscan/fravoll/solidity-patterns/ to check your report. If you have any questions or need support on the report please contact us directly. Thank you!

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.