Skip to content
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: cosmwasm contracts #10

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

feat: cosmwasm contracts #10

wants to merge 9 commits into from

Conversation

ibrizsabin
Copy link
Collaborator

Description:

Commit Message

type: commit message

see the guidelines for commit messages.

Changelog Entry

version: <log entry>

Checklist:

  • I have performed a self-review of my own code
  • I have documented my code in accordance with the documentation guidelines
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have run the unit tests
  • I only have one commit (if not, squash them into one commit).
  • I have a descriptive commit message that adheres to the commit message guidelines

Please review the CONTRIBUTING.md file for detailed contributing guidelines.

}

pub fn is_native(&self, deps: Deps, denom: &String) -> bool {
if let Ok(addr) = deps.api.addr_validate(denom) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens in case of invalid token address? Also the func param name denom seems misleading.

self.nid.load(storage)
}

pub fn get_protocol_fee(&self, storage: &dyn Storage) -> StdResult<u8> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

u8 will only allow for [0,255] out of 10,000 scale. Is this an issue?

msg: ExecuteMsg,
) -> Result<Response, ContractError> {
let call_service = CwIntentV1Service::default();
match msg {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we missing CancelMsg?

solver_address: order.creator.clone(),
};
let msg = OrderMsg {
msg_type: ORDER_CANCEL,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the message type should ORDER_FILL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants