Skip to content

ContractParametersContext.ToJson() hasn't checked Script is null or not before Convert.ToBase64String(Script) #3197

@superboyiii

Description

@superboyiii

Describe the bug
Assuming you have a contract, the admin is a 2/3 multisig address. You have 1 of 3 private keys. Some NEP-17 tokens are deposited in that contract but now you guys want to withdraw. You need create tx by RPC invokefunction and add 2 witness scope on that(your address and the contract address). Finally CLI can't get completed signatures and it should print incompleted context and then you can send it to another admin to get another 1/3. But apparently, the contract witness has nothing, the script is null and can't be converted by Convert.ToBase64String(Script)
To Reproduce
Steps to reproduce the behavior:

  1. Deploy a contract, add owner address and verify() method to ensure it could pass checkwitness()
  2. Set a 2/3 multisigaddress as owner and send some NEP-17 tokens into it
  3. Invoke RPC openwallet and then invokefunction to withdraw

Expected behavior
No exception is threw. Should see context ouput to ask for signature.

Screenshots
6604a0d25bcf6943638ad2fb22d2cd3

Platform:
Any

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions