Hi, would you be able to help with getting DAO running on a custom domain? I tried this, did not work
<MoralisProvider appId="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" serverUrl="ENTERED URL HERE">
Hi, would you be able to help with getting DAO running on a custom domain? I tried this, did not work
<MoralisProvider appId="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" serverUrl="ENTERED URL HERE">
It doesn’t work that way. The serverUrl and appId should be the one from moralis. To configure it to run on custom domain should be done where the project is hosted
I am attempting to do it through netlify now, is that one way to go about it?
Custom domain isn’t supported by moralis yet. If your project is running on moralis ( deployed using the deploy command ), you can do redirect rather
Just to make sure i understand correctly i would first enter moralis-admin-cli deploy
enter something else instead of the following?
Api key
Secret key
and then what do i enter?
If you wan’t to deploy to moralis, you use that command, if netlify, you can follow their process
Hoping someone may be able to help with this. The createProposal function in this project was coded a bit differently than i would have coded it. The issue is I am not sure if the way i have coded it is correct. Can anyone tell me if they see anything incorrect about the way i have coded this?
This is the way Jay coded it in the video (instructor)…
function createProposal(string memory _description, address[] memory _canVote) public {
require(checkProposalEligibility(msg.sender), "Only NFT holders can put forth Proposals");
proposal storage newProposal = Proposals[nextProposal];
newProposal.id = nextProposal;
newProposal.exists = true;
newProposal.description = _description;
newProposal.deadline = block.number + 100;
newProposal.canVote = _canVote;
newProposal.maxVotes = _canVote.length;
nextProposal++;
}
This is the way I coded it. Anyone see anything wrong with doing it this way? …
The one thing i was not sure how to fill was the voteStatus property. Anyone know what that would be?
function createProposal(string memory _description, address[] memory _canVote) public {
require(checkProposalEligibility(msg.sender), "Only NFT holders can put forth Proposals");
uint256 id = nextProposal;
Proposals[id] = proposal ({
exists: true,
description: _description,
deadline: block.number + 100,
votesUp: 0,
votesDown: 0,
canVote: _canVote,
maxVotes: _canVote.length,
voteStatus: ?
countConducted: false,
passed: false
});
nextProposal++;
}
Hello there team I deployed the dao contract through remix and have also transfered the nft on open sea to different account the problem is that i cant create a proposal
I passed the correct arguments the a description and an array of addresses but the executions gets reverted
Is your wallet that’s making this proposal transaction on the right chain? It may be an issue with your contract, you can look at the final project repo to compare your code.
I am working on adding useMoralis in the DAO-start @1:10 in the video when I run the app, it didn’t get a proposal from the moralis database. I am able to add new proposals, vote, and run the vote count via polygonscan. Also, able to create Sync with the smart contract, the 3 tables pull the data from the chain. I am wondering where is the Web3 connector setting or config so that the app can connect to the moralis server.
Do you have proposals in your Moralis database? The app connection to your Moralis server is done in MoralisProvider - this is where you set your serverUrl and appId.
I have the proposals, vote count, and proposal counts in the database. let me try. Thank you so much!
It’s work now. Thank you for your help!
could someone explain me what does the 3. line in constractor do and what address?
constructor(){
owner = msg.sender;
nextProposal = 1;
daoContract = IdaoContract(0x2953399124F0cBB46d2CbACD8A89cF0599974963);
validTokens = [34885103611559094078416375598166902696017567311370712658413208238551126245396];
}
I just did not understood, I watched it few times more and now I do understand
constructor(){
owner = msg.sender;
nextProposal = 1;
daoContract = IdaoContract(0x2953399124F0cBB46d2CbACD8A89cF0599974963);
validTokens = [34885103611559094078416375598166902696017567311370712658413208238551126245396];
}
we put just one token ID for validTokens, What If I would like to enable holders of 9999 unique NFTs to vote in my DAO?
How to do so?
You would add the tokenIds to that validTokens array.
validTokens = [1, 2];
in my deployDAO.js file I have 4 more variables and a console.log:
const currentTimestampInSeconds = Math.round(Date.now() / 1000);
const ONE_YEAR_IN_SECS = 365 * 24 * 60 * 60;
const unlockTime = currentTimestampInSeconds + ONE_YEAR_IN_SECS;
const lockedAmount = hre.ethers.utils.parseEther("1");
console.log(
...
code as is in video:
const Dao = await hre.ethers.getContractFactory("Dao");
const dao = await Lock.deploy();
await dao.deployed();
...
`Lock with 1 ETH and unlock timestamp ${unlockTime} deployed to ${lock.address}`
);
should I delete it or leave it as it is?