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: added mpc getter and updated near-plugins #183

Merged
merged 15 commits into from
Jan 13, 2025
Merged

Conversation

frolvanya
Copy link
Contributor

No description provided.

@frolvanya frolvanya requested a review from karim-en January 12, 2025 02:39
rustc 1.79.0 is not supported by the alloy crates
@frolvanya frolvanya marked this pull request as ready for review January 12, 2025 02:51
@@ -394,6 +394,9 @@ impl Contract {
fee: &Option<Fee>,
) -> Promise {
let transfer_message = self.get_transfer_message(transfer_id);

require!(transfer_message.amount.0 > 0, "Invalid amount");
Copy link
Collaborator

Choose a reason for hiding this comment

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

This check should be done for the normalised amount

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 704963c

rustc 1.79.0 is not supported by the alloy crates
@frolvanya frolvanya requested a review from karim-en January 12, 2025 02:58
@karim-en karim-en requested review from olga24912 and kiseln January 12, 2025 15:36
@kiseln
Copy link
Contributor

kiseln commented Jan 12, 2025

What's the motivation for MPC getter?

@frolvanya
Copy link
Contributor Author

What's the motivation for MPC getter?

To get required deposit for sign method from sdk
Near-One/bridge-sdk-rs#66

@frolvanya
Copy link
Contributor Author

frolvanya commented Jan 12, 2025

Also, one more thing to add, as you can see there's an issue with rustc version + lib versioning + wasm, since you need to optimize wasm after rustc v1.82.0 and we can't just use 1.81.0 or 1.79.0 since we upgraded near-plugins. I was able to compile wasm with 1.84.0 or run tests. During compilation I used cargo-near, so I want to rewrite our tests to use cargo-near instead and completely remove build.sh, because:

  1. It'll get messier once we'll try to fix wasm with wasm-opt manually
  2. Why reinvent the wheel?
  3. It's a bad practice to store wasm files in a repo (especially if they're just used to check if build is the same)

Pros of cargo-near:

Cons:

  • For now I don't see any. Let me know if you have something against it

@karim-en karim-en merged commit ce54d2f into main Jan 13, 2025
5 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants