Giter VIP home page Giter VIP logo

decentralized-nft-platform's Introduction

Decentralized-NFT-platform

Cloning a repository


  1. On GitHub.com, navigate to the main page of the repository.
  • Above the list of files, click Code. "Code" button

  • Copy the URL for the repository.

  1. To clone the repository using HTTPS, under "HTTPS", click .

    * To clone the repository using an SSH key, including a certificate issued by your organization's SSH certificate authority, click SSH, then click .

  • To clone a repository using GitHub CLI, click GitHub CLI, then click .
  • The clipboard icon for copying the URL to clone a repository with GitHub CLI
  1. Open Terminal.
  • Change the current working directory to the location where you want the cloned directory.

  • Type git clone, and then paste the URL you copied earlier.

or run this command

$ git clone https://github.com/AnandK-2024/Decentralized-NFT-platform.git

MyNft file deployed on Goerli testnet

0x472B86a2BfFF217CA7Ffb3a4E1A1d2016997ddBC

NftMarket place contract deployed at Goerli testnet

0xB61DdB21A75a47Cb3da0AF2f19e2e476F22B18ac

go and intrect with smart contract.

Visualize genral bytecode deconstruction(zoom out)

Bytescode analysis

decentralized-nft-platform's People

Contributors

anandk-2024 avatar shaheenrehman avatar raiyanmook27 avatar

Stargazers

Alireza (0xAlireza) avatar  avatar

Watchers

 avatar  avatar

decentralized-nft-platform's Issues

Lock pragmas to specific compiler version

Contracts should be deployed with the same compiler version and flags that they have been tested the most with. Locking the pragma helps ensure that contracts do not accidentally get deployed using, for example, the latest compiler which may have higher risks of undiscovered bugs. Contracts may also be deployed by others and the pragma indicates the compiler version intended by the original authors.

for more info reach out this below---
Lock pragmas to specific compiler version

validDestination address

Consider preventing the transfer of tokens to the same address of the smart contract.

validating that the "to" address is neither 0x0 nor the smart contract's own address:

modifier validDestination( address to ) {
    require(to != address(0x0));
    require(to != address(this) );
    _;
}

The modifier should then be applied to the "transfer" and "transferFrom" methods:

overflow without uint256(-1) calls

If it can’t overflow without uint256(-1) calls, you don’t need to check for overflow

Save gas and avoid safemath with unchecked {} , this one is Solidity only but I wanted to include it, I was tired of seeing counters using Safemath, it is cost-prohibitive enough to call a contract billions of times to prevent an attack.

for more info reach out.

Adding pause functionality to secure Solidity smart contracts

Adding pause functionality to secure Solidity smart contracts

Pause capability is one way to protect functions that will be available to all users (e.g., public or external functions). A pause modifier or condition can temporarily remove a function’s ability to work, without impacting other contract functions and without opting to destroy the entire contract and start from scratch.

for adding a pausable function in smart contract use openzapplien, read carefully

for more information read this article

Making Solidity Values Constant Where Possible

Constant variables are replaced at compile time by their values, while immutable variables are replaced at deployment time. Either way, we avoid the annoying fees required with doing an SLOAD operation.
They are replaced with literals at compile time and will prevent you from having to a read a value from memory or storage. For writing Yul - replace all known values and constant values with literals to save gas and comment what they are.

for more info reach out
more info

Don’t initialize Zero Values in loop

When writing a for loop instead of writing uint256 index = 0; instead write uint256 index; as being a uin256 it will be 0 by default so you can save some gas by avoiding initialization.

for more info reach out

Upgradable Smart contract

Smart contracts in Ethereum are immutable by default. Once you create them there is no way to alter them, effectively acting as an unbreakable contract among participants.

However, for some scenarios, it is desirable to be able to modify them. Think of a traditional contract between two parties: if they both agreed to change it, they would be able to do so. On Ethereum, they may desire to alter a smart contract to fix a bug they found (which might even lead to a hacker stealing their funds!), to add additional features, or simply to change the rules enforced by it.

Here’s what you’d need to do to fix a bug in a contract you cannot upgrade:

  1. Deploy a new version of the contract
  2. Manually migrate all state from the old one contract to the new one (which can be very expensive in terms of gas fees!)
  3. Update all contracts that interacted with the old contract to use the address of the new one
  4. Reach out to all your users and convince them to start using the new deployment (and handle both contracts being used simultaneously, as users are slow to migrate)

To avoid going through this mess, we have built contract upgrades directly into our plugins. This allows us to change the contract code, while preserving the state, balance, and address.


for more information about upgradable smart contract reach out this

openzeppelin-contracts-upgradeable

Save Gas on Contract Deployments

Save Gas on Contract Deployments using Minimal Proxies


Minimal proxies are used to deploy low-gas-cost versions of a contract that otherwise would need to be deployed entirely, many times. So pretty much... clones! The flow is like this:

  1. Create a base implementation contract that contains all your desired logic and functions
  2. Instead of having to re-deploy the entire contract every time, an end-user can deploy a "clone" version of it that is much cheaper in gas

for more information about how to use minimal proxies

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.