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
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.
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
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
@@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;
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
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
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.
Ok, u will try to make one video, it’s simple
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
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
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?
How you are deploying the contract
How do we get free usdt tokens..?
Are you talking about polygon Amoy network?
Because you can’t get the real USDT token for Free, you have to purchase that
@@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);
}
}
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
@@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
hi bro how can contact you, i was trying to reach you via mail
Kindly connect Here david@daulathussain.com