-
Notifications
You must be signed in to change notification settings - Fork 100
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
Error on invokescript
with a contract deployment script
#458
Comments
The same here,@csmuller. It is good that you reported. Let's keep this in mind because this is important for us to test the current master. |
Hi, I reproduced your case, but I can get the expected result. Here is my use case: {
"jsonrpc": "2.0",
"method": "invokescript",
"params": ["DQgBeyJuYW1lIjoiIiwiZ3JvdXBzIjpbXSwic3VwcG9ydGVkc3RhbmRhcmRzIjpbXSwiYWJpIjp7Im1ldGhvZHMiOlt7Im5hbWUiOiJfZGVwbG95IiwicGFyYW1ldGVycyI6W3sibmFtZSI6InVwZGF0ZSIsInR5cGUiOiJCb29sZWFuIn1dLCJvZmZzZXQiOjAsInJldHVybnR5cGUiOiJWb2lkIiwic2FmZSI6ZmFsc2V9XSwiZXZlbnRzIjpbXX0sInBlcm1pc3Npb25zIjpbeyJjb250cmFjdCI6IioiLCJtZXRob2RzIjoiKiJ9XSwidHJ1c3RzIjpbXSwiZXh0cmEiOm51bGx9DFJORUYzbmVvbgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzLjAuMC4wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFcAAUBQhEnJEsAfDAZkZXBsb3kMFEUOzD/1NEmzTBDSZRJ5Prv9IeS+QWJ9W1I=",
[
{
"account": "NaqFR6Qv3VM3XWLLqbuK6PwRi9uYGGDk1e",
"scopes": "CalledByEntry",
"allowedcontracts":[],
"allowedgroups":[]
}
]],
"id": 1
} Also, I think we'd better show the message of base exception for better understanding, like #463 |
I get another deployment script from neo-cli. My invokescript call JSON is below. I assume you used the dummy contract from above. {
"jsonrpc": "2.0",
"id": 1,
"method": "invokescript",
"params": [ "DQgBeyJuYW1lIjoiIiwiZ3JvdXBzIjpbXSwic3VwcG9ydGVkc3RhbmRhcmRzIjpbXSwiYWJpIjp7Im1ldGhvZHMiOlt7Im5hbWUiOiJfZGVwbG95IiwicGFyYW1ldGVycyI6W3sibmFtZSI6InVwZGF0ZSIsInR5cGUiOiJCb29sZWFuIn1dLCJvZmZzZXQiOjAsInJldHVybnR5cGUiOiJWb2lkIiwic2FmZSI6ZmFsc2V9XSwiZXZlbnRzIjpbXX0sInBlcm1pc3Npb25zIjpbeyJjb250cmFjdCI6IioiLCJtZXRob2RzIjoiKiJ9XSwidHJ1c3RzIjpbXSwiZXh0cmEiOm51bGx9DE1ORUYzbmVvbgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzLjAuMC4wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARXAAFAn7e0hxLADAZkZXBsb3kMFKvW6K2fQQlBN2WRzd+a1oINt5fNQWJ9W1I=",
[
{
"account": "NZNos2WqTbu5oCgyfss9kUJgBXJqhuYAaj",
"scopes": "CalledByEntry",
"allowedcontracts":[],
"allowedgroups":[]
}
]
]
} When i do the call with your JSON I get the exception:
Yes, definitely 👍 |
Works fine in mine.
State: HALT |
I think it could be related to |
Ok, then i'll assume that it is fixed on master and will work with the next release. |
Describe the bug
When calling
invokescript
with a script that deploys a new contract, I get the errorException has been thrown by the target of an invocation.
. When sending the script viasendrawtransaction
, the deployment is successful.This issue only arises when i use a
_deploy
method in the contract.To Reproduce
_deploy()
method. E.g.:Build the deployment script. (Or deploy it with neo-cli and get the deployment script with getrawtransaction.)
Call
invokescript
with the deployment script as an argument (and a signer).Expected behavior
Success response with the correct GAS amount consumed by the deployment.
Platform:
The text was updated successfully, but these errors were encountered: