-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Marketing contract #1280
base: main
Are you sure you want to change the base?
Feat: Marketing contract #1280
Conversation
✅ Deploy Preview for teritori-dapp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for testitori ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
3e66b54
to
0b654a8
Compare
@@ -0,0 +1,4 @@ | |||
{ | |||
"admin_adrr": "tori1yzjgaql23yxlwxxvmszssg23w3f8k6k2q75jss" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
admin_addr could be better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value or the key ?
self.news.save(ctx.deps.storage, index as u64, &news_item)?; | ||
} | ||
|
||
Ok(Response::new().add_attributes(attributes)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we attributes is not use in earlier code then you can write it here to make the code more readable, we dont have to traceback to see the value of attributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I see
self.live_collections.save(ctx.deps.storage, index as u64, &live_collection)?; | ||
} | ||
|
||
Ok(Response::new().add_attributes(attributes)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok(Response::default()
.add_attribute("action", "update_live_collections")
)
make the code more readable. and seems that Response::default() add some needed default value to response also
} | ||
|
||
#[msg(query)] | ||
pub fn get_live_collections(&self, ctx: QueryCtx) -> StdResult<Vec<MarketingCollectionPreview>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we merge 3 queries: live, highlighted, upcoming => 1 query function and use a switch case to return the according data ? we can prevent the repeated code => maintain easier, contract size smaller, easy to add more query with the same kind of data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reflexion, handling "Which collections are shown in the Launchpad" doesn't make sense.
The collections shown are handled by the Marketplace, automatically, no need to choose.
I'll remove the collections stuff from the marketing contract
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's very nice that you are working!
6b6aa44
to
00c98fc
Compare
This contract allows to
It concerns these elements on the front
On the homepage https://app.teritori.com/
On the Launchpad https://app.teritori.com/launchpad
Misc
All the Update
#[msg(exec)]
can only be executed by the admin (Compares thesender
address and theadmin_addr
)Succesfully instantiated on teritori-testnet.
The starting config is set with the wallet used to instantiate, see https://github.com/TERITORI/teritori-dapp/pull/1280/files#diff-2159b5311d04a13bc07f3f5fabc962a474f43619cbf420476e9f78d235bc526eR7
Hm.. But the goal is to set a DAO as admin