how can i implement validateReputationChange you mentioned in video to change how the given reputation calculate? can you give a hint ty
That will be easy, Since the reputation validation is already implemented in the contract. You have to implemented in the client in the voting component. Changing to instead adding or taking out one unit of reputation, use the log2 of the reputation of the voter.
And one in the case the reputation of the voter is lesser or equal than 2.
Thanks, I too have been hanging out elsewhere! Finally digging back into this project with my wingbird @cromewar, will spend some time here supporting and asking questions. Your workshop and boilerplate are awesome, really appreciate your hard work. Happy holidays & new year
I appreciate how clearly you write
Hi! Can you share your progress (maybe a link to your Repo?) and update us on the situation / solution to the questions you asked? Iād love to see how you implemented the comments. Another workshop that explores a similar concept is https://youtu.be/mL20IZpVPuQ?t=208 which I have bolded and linked here.
Iāll be checking this forum these days as I start working again on top of this boilerplate, so would welcome your open source code and help as well (seems like you are Getting Things Done!).
Hi Saxon,
Again sorry for the late reply. To be totally honest with you I have never worked with RTL languages. So unfortunately Iām afraid I wonāt be able to help you there.
Regards
Daniel
You are so kind fifestarr,
I have other tutorials coming soon. So expanding this repo is not very high in the pipeline. But I might drop some pointers here on where the code modifications will go in order to implement comments.
If someone finishes that part feel very welcomed to make a pull request. We will appreciate the collaboration to our public repos.
Regards
Thanks i did comment implementation and very little changes but as i just started React and also Javascript is general just now i didnt do it in an optimized way, however if you have any react solidity experience and would like to work together i would be happy build something togetherā¦ i try to pull request my modification as soon as i figure out how to use github XD
thanks again Daniel, as i understood anyone can use addCategory function to add category right?
if it is then how it can be restricted to contract owner only?
another question i made a donation button on every post then i tried to make a similar function as Votes named Donates but instead of adding +1 to every click adds donate amount to table for every post,i copy pasted vote functionā¦code below doesnt work when i call it and add nothing to donates table i also added listenerā¦ you have any idea on this? it would be great help
event Donated (bytes32 indexed postId, address indexed postOwner, address indexed donator, uint80 postDonations);
struct post {
address postOwner;
bytes32 parentPost;
bytes32 contentId;
int40 votes;
bytes32 categoryId;
uint80 donates;
}
function donate (bytes32 _postId, uint80 _donationAdded) external
{
address _donator = msg.sender;
bytes32 _category = postRegistry[_postId].categoryId;
address _contributor = postRegistry[_postId].postOwner;
require (postRegistry[_postId].postOwner != _donator, "you cannot donate your posts");
postRegistry[_postId].donates += _donationAdded;
emit Donated(_postId, _contributor, _donator, postRegistry[_postId].donates);
}
function getPost(bytes32 _postId) public view returns(address, bytes32, bytes32, int72, bytes32, uint80) {
return (
postRegistry[_postId].postOwner,
postRegistry[_postId].parentPost,
postRegistry[_postId].contentId,
postRegistry[_postId].votes,
postRegistry[_postId].categoryId,
postRegistry[_postId].donates);
}
i did a pull request with comment and donate and image upload implement
Hi Saxon,
Your function currently will only increase the .donates portion of the struct for the value added as donation.
But Iām curious what that donation entails. If you want the donor to actually transfer tokens to the post owner, it will be a bit more complex than the current implementation of the votes function. Also the implementation will vary whether you want the donor to transfer native tokens (i.e. ETH) or an ERC20 token.
Thanks will take a look later on.
Actually i did the donate transfer part with moralis docs the user now can input amount of matic (native token) and send it to postOwner of each post and doesnt bother contract for that but when i click send i want also to call this function and add donates in database thats the part which doesnt work right now
You will have to sync the donated event to the server. It will register on a different table as there is one table per synced event.
i launched Polytter.fun you can comment donate and get reputation also there is a profile and feed for everyone ā¦ i would appreciate you to test it and anyone intrested in developing this project with huge potential is welcomed to participate in it ā¦ also looking for teamā¦ huge thanks to @DanielWeb3 though for his great help
Great job and amazing to here you have your dApp launched. Will definitely take a look.
Hey, as well you can check.
https://docs.moralis.io/moralis-server/web3/web3#events
And research
web3.eth.net.getId():
Moralis.switchNetwork("");
With this you can automate network management. Have fun.
thanks a lot for help i will do changes
Hey guys @Saxon & @DanielWeb3, have you seen this EIP3722 related to social media?
Here is a recent video interview with the proposer: https://www.youtube.com/watch?v=ZokZdg6OriM
Interesting, however, not sure if an EIP level standard is needed for this.
It is quite limited in what you can do. The reddit clone for example could not be supported with this contract model.