How do I deploy my Solidity smart contract to this new test blockchain with free tokens?

Поделиться
HTML-код
  • Опубликовано: 11 дек 2024

Комментарии • 22

  • @duerecap
    @duerecap 7 месяцев назад +1

    thank you so much, here you showed us how to deploye on local network, my question is how now can we deploy on main net

    • @daulathussain
      @daulathussain  7 месяцев назад +1

      It’s similar to the mainnet, all you have to do is to connect with the main net and deploy the contract. That’s the only thing you have to do so.
      In this project, we have focus on the Test network because we don’t want to spend real money for deploying the contract.
      But if you want to deploy the same contract to the mainnet, all you have to do is to change the RPC endpoint for the main net, for example, if you want to deploy to ethereum or polygon mainnet, then simply replace with the main net and connect with the network and deploy it exactly the same thing instead of testnet, you have to do on the mainnet

  • @vukkumsp
    @vukkumsp Месяц назад

    Hardhat has another way to deploy the contracts, using ignition modules. Could you explain what is ignition module and how it is different and better than old deploy scripts.

    • @daulathussain
      @daulathussain  Месяц назад

      Ok, u will try to make one video, it’s simple

  • @poonamkhurana4056
    @poonamkhurana4056 7 месяцев назад

    Bro how can i use , add network to decentralized chat application because you showed it on ide remix and hardhat only can you tell me hoew to add it and i am also trying to add webrtc and ipfs so in which file should i adď code or make a new file and where and also how to add it can you help pls

    • @daulathussain
      @daulathussain  7 месяцев назад

      Like there is a lot of changes, you have to make if you want to use the IPFS or as decentralised application, so you can check the nFT marketplace project in that I have built a couple of function that how you can add a file and upload to the IPFT

  • @bashirahmed5159
    @bashirahmed5159 Месяц назад

    I was trying to deploy contract, But it charging me a gas fees 0.044 ETH $140.83, which seems high. why is that so?

  • @muhangielioda
    @muhangielioda 7 месяцев назад +1

    How do we get free usdt tokens..?

    • @daulathussain
      @daulathussain  7 месяцев назад +1

      Are you talking about polygon Amoy network?
      Because you can’t get the real USDT token for Free, you have to purchase that

    • @muhangielioda
      @muhangielioda 7 месяцев назад

      @@daulathussain what if i want to use usdt for mode of payment when i deployed on the polygon like amoy testnet ..! how do i test using usdt this is the contract..!/
      import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
      contract ConsultingContract {
      address public owner;
      uint256 public minuteRate = 1;
      IERC20 public usdtToken;
      event ConsultationBooked(
      address indexed user,
      uint256 duration,
      string email
      );
      event SoftwarePurchased(address indexed user, string email);
      mapping(address => bool) public consultationBookings;
      mapping(address => uint256) public consultaionDuration;
      mapping(address => bool) public softwarePurchased;

      constructor(address _usdtToken) {
      owner = msg.sender;
      usdtToken = IERC20(_usdtToken);
      }
      function bookConsultation(
      uint256 amount,
      uint256 _duration,
      string memory _email
      ) public {
      require(_duration == 30 || _duration == 60, "Invalid duration");
      require(
      (_duration == 30 && amount == 30) ||
      (_duration == 60 && amount == 60),
      "Invalid Property"
      );
      require(
      usdtToken.allowance(msg.sender, address(this)) >
      (_duration * minuteRate) * 10 ** 6,
      "Insufficient Allowance"
      );
      usdtToken.transferFrom(
      msg.sender,
      address(this),
      (_duration * minuteRate) * 10 ** 6
      );
      consultationBookings[msg.sender] = true;
      consultaionDuration[msg.sender] = _duration;
      emit ConsultationBooked(msg.sender, _duration, _email);
      }
      function purchaseSoftware(uint256 amount, string memory _email) public {
      require(
      amount == 99 || amount == 129 || amount == 159,
      "Invalid Amount"
      );
      require(
      usdtToken.allowance(msg.sender, address(this)) >= amount * 10 ** 6,
      "Insufficient Allowance"
      );
      usdtToken.transferFrom(msg.sender, address(this), amount * 10 ** 6);
      softwarePurchased[msg.sender] = true;
      emit SoftwarePurchased(msg.sender, _email);
      }
      function withdrawFunds() public {
      require(msg.sender == owner, "Only the owner can withdraw funds");
      usdtToken.transfer(msg.sender, usdtToken.balanceOf(address(this)));
      }
      function editUsdtToken(address token) public {
      require(msg.sender == owner, "Only the owner can edit usdt token");
      usdtToken = IERC20(token);
      }
      }

    • @muhangielioda
      @muhangielioda 7 месяцев назад

      do i have to write mock contract for usdt and i mint tokens..! if i want some one to pay in usdt and i want to test it

    • @muhangielioda
      @muhangielioda 7 месяцев назад

      @@daulathussaindo i have to write mock contract for usdt and i mint tokens..! if i want some one to pay in usdt and i want to test it

  • @spkumar0507
    @spkumar0507 8 месяцев назад

    hi bro how can contact you, i was trying to reach you via mail

    • @daulathussain
      @daulathussain  8 месяцев назад +1

      Kindly connect Here david@daulathussain.com