Skip to content

Commit

Permalink
fix Posts
Browse files Browse the repository at this point in the history
  • Loading branch information
MixailE committed Jun 8, 2023
1 parent df5ea5f commit 3ea433a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
11 changes: 10 additions & 1 deletion contracts/superclasses/Posts.sol
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,12 @@ contract Posts is KetlGuarded {
function addPost(
address sender,
PostRequest memory postRequest
) external onlyKetlTokenOwners(sender) onlyAllowedFeedId(postRequest.feedId) {
)
external
onlyAllowedCaller
onlyKetlTokenOwners(sender)
onlyAllowedFeedId(postRequest.feedId)
{
uint feedId = postRequest.feedId;
// Get current post id
uint currentPostId = lastPostIds[feedId].current();
Expand Down Expand Up @@ -165,6 +170,7 @@ contract Posts is KetlGuarded {
bool pin
)
public
onlyAllowedCaller
onlyAllowedFeedId(feedId)
onlyKetlTokenOwners(sender)
onlyElevatedPriveleges(feedId, sender)
Expand Down Expand Up @@ -226,6 +232,7 @@ contract Posts is KetlGuarded {
CommentRequest memory commentRequest
)
external
onlyAllowedCaller
onlyKetlTokenOwners(sender)
onlyAllowedFeedId(commentRequest.feedId)
{
Expand Down Expand Up @@ -312,6 +319,7 @@ contract Posts is KetlGuarded {
)
external
payable
onlyAllowedCaller
onlyKetlTokenOwners(sender)
onlyAllowedFeedId(reactionRequest.feedId)
{
Expand Down Expand Up @@ -379,6 +387,7 @@ contract Posts is KetlGuarded {
RemoveReactionRequest memory reactionRequest
)
public
onlyAllowedCaller
onlyKetlTokenOwners(sender)
onlyAllowedFeedId(reactionRequest.feedId)
{
Expand Down
7 changes: 6 additions & 1 deletion scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ async function main() {
contractName: 'Feeds',
chainName,
})
if (shouldAddBasicFeeds) await addBasicFeeds(feedsContract.address, deployer)

const obssConstructorArguments = [
forwarder,
Expand All @@ -76,6 +75,12 @@ async function main() {
})
if (shouldAddObssToPaymasterTargets)
await addContractToPaymaster(obss.address, deployer)

if (shouldAddBasicFeeds) await addBasicFeeds(feedsContract.address, deployer)

await karmaContract.setAllowedCaller(obss.address)
await profilesContract.setAllowedCaller(obss.address)
await feedsContract.setAllowedCaller(obss.address)
}

main().catch((error) => {
Expand Down

0 comments on commit 3ea433a

Please sign in to comment.