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

Update mock signer #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikedotexe
Copy link
Contributor

@mikedotexe mikedotexe commented Jun 20, 2024

Similar to #18, this is another community pull request. The mock signer has been out of date and this pull request modifies a few things to return a result identical to what we can expect from the contract currently deployed to v5.multichain-mpc-dev.testnet.

You may modify and run this command to see the result:

near call v5.multichain-mpc-dev.testnet sign '{"request":{"payload":[6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6],"path":"f/o/o","key_version":0}}' --accountId mike.testnet --gas 300000000000000 --depositYocto 1

and you will see this result:

{
  big_r: {
    affine_point: '03281F016985A6E06BEAE5AC01D7B927EB7EF1FFBE2BCDBF2A1E37BEAF571E37A8'
  },
  s: {
    scalar: '49F06C0CF14005A15E8B65AFFFCFA0A77C9A205BDF1C135426D35A8F69F12C61'
  },
  recovery_id: 1
}

This pull request quickly catches up the sign method with the latest breaking changes to the arguments, and the breaking changes involved in the structure of the response. See this screenshot comparing the two:

Screenshot 2024-06-19 at 5 02 56 PM

On the left window, you see the mock contract from this pull request built (not optimized) and deployed to mock-mpc.mike.testnet, which folks are free to use instead of deploying their own, obviously.

At the time of this writing, it feels rather important for developers to have an alternate contract since the v2 contract (v2.multichain-mpc.testnet) hasn't been updated to allow for the 1 yoctoNEAR requirement. So the contract at that address is unfortunately, not "forward-compatible" because it will throw an error when a builder attempts to develop a proper workflow in line with security concerns.

Screenshot 2024-06-19 at 5 15 58 PM

Recommendation to include a brief page in docs about how a builder can use a mock contract.

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.

1 participant