-
Notifications
You must be signed in to change notification settings - Fork 19
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
Contract refactoring, API, README, etc #706
Contract refactoring, API, README, etc #706
Conversation
env!("CARGO_PKG_VERSION").to_string() | ||
} | ||
|
||
pub fn sign_helper(&mut self, request: SignatureRequest) { |
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.
@volovyks should this be marked as [#private]
?
otherwise, people could just call it jumping over sign
(except if there is something about using the DATA_ID_REGISTER
that I am not aware of)
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.
Indeed. Changed. cc @ppca
"{required_deposit}".to_string(), | ||
return Err(MpcContractError::SignError(SignError::InsufficientDeposit( | ||
deposit.as_yoctonear(), | ||
required_deposit, | ||
))); | ||
} |
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.
@volovyks could we return the money if they exceed the payment? This would cost < 3Tgas, but help with the deposit estimate
if required > deposit {
Promise::new(env::predecessor_account_id()).transfer(deposit - required_deposit);
}
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.
Good point, added to our roadmap: #708
@volovyks the current cost is 1 yoctoNEAR when there are less than 4 requests, and then it ramps to Did we intended to use match pending_requests {
0..=CHEAP_REQUESTS => 1,
_ => {
(pending_requests - CHEAP_REQUESTS) as u128
* NearToken::from_millinear(50).as_yoctonear()
}
} |
Co-authored-by: DavidM-D <[email protected]>
Co-authored-by: DavidM-D <[email protected]>
Co-authored-by: DavidM-D <[email protected]>
Co-authored-by: DavidM-D <[email protected]>
Audit is fixed in
We use yocto everywhere. |
Terraform Feature Environment Destroy (dev-706)Terraform Initialization ⚙️
|
I've also tried to narrow down return error types in user-facing functions so they know what they can get exactly.
But to do that we will need to get rid of the MpcContractError enum since it's implementation of
conflicts with newly added impl for SignError, PublicKeyError, etc.
Let me know if you guys think this is an important change, or we can stick to MpcError everyvere.
@ppca based on your branch, since it has a lot of changes