Giter Site home page Giter Site logo

generative's Issues

最低限のボット対策

masatakaさんの指摘の拝借ですが
ミント系は下記入れたほうが良いと思います。

require(tx.origin == msg.sender,"コントラクトからはダメ");

tx.originは必ずトランザクション発行者(EOA)のアドレスになるため、
コントラクトからmint()をループで回す等を弾けると認識しています。

参照のみの変数について

mintForTreasuryAddressは参照しかしないならconstantもしくはimmutableにしたほうがガス代の節約になります

AccessControlの採用推奨

masatakaさんの指摘の拝借ですが
AccessControl入れておくと後から管理者を追加出来るので、中長期的に見た時に運用が楽になると思います。

オーナーミント無料のrequire()

自分ならオーナーミント無料は念のため「owner() != _msgSender() && admin != _msgSender()」のelseにrequire(msg.value == 0)入れると思います

ストレージへの書き込みについて

コンストラクタとmintPNouns()のfor処理の「nextTokenId++」はストレージ書き込みで重いため、forの回数分加算したほうがガス代が安く済みます。(nextTokenId += _mintAmount)

withdrawの仕様について

mintPNouns()で「送金されたETHは、即トレジャリーウォレットへ送金」の仕様が出来ていないと思います。

送金関数について

withdraw()はEOAへの送金だけが目的ならtransfer()を使ったほうが安全だと思います。

ERC721のガス代について

複数枚ミントする設計でERC721だとユーザーとコンストラクタでのガス代も結構かかると思いますが、
ERC721AかERC721PsiかERC721AntiScamにERC721P2Pの実装を移植するのはどうでしょうか?
大きめの変更も必要だと思うので、ここは他エンジニアの意見も聞きたいです。

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.