Comments (6)
@robmoorman have you tried without the 0x
in front of the scriptHash?
from api-functions.
He @jeroenptrs doesn't work either, with, without, or any combination with the hashes mentioned up here.
I'll try to add some more dummy prove smart contract operations to check if it's something with the address string in particular.
from api-functions.
Ok it's now the address, as the following operation also won't be invoked:
def Main(operation, args):
if operation == 'GetName':
return NAME
from api-functions.
Ok one step further, it seems that the following Promise causes the error:
export default function makeTestInvokeActions(sessionId, requestId) {
const id = generateDAppActionId(sessionId, `${ID}-${requestId}`);
return createActions(id, ({ net, scriptHash, operation, args }) => () => {
return testInvoke({ net, scriptHash, operation, args });
});
}
When I mock this with the code below it works:
export default function makeTestInvokeActions(sessionId, requestId) {
const id = generateDAppActionId(sessionId, `${ID}-${requestId}`);
return createActions(id, ({ net, scriptHash, operation, args }) => () => {
return new Promise((resolve, reject) => {
resolve(['Some output'])
})
});
}
T.b.c.
from api-functions.
Ok, issue with not throwing the right error message (will make a PR on the client for this).
First of all the script hash, as you said, must not include the 0x
, so e973b31b5d8cf928916f2a30a4611b2bed31af7e
in this case.
Than after a breakdown, it errors on:
const { result } = await rpc.Query.invokeScript(script).execute(endpoint);
Error:
xhr.js:178 OPTIONS http://neo-nodes:30335/ net::ERR_NAME_NOT_RESOLVED
from api-functions.
Added 127.0.0.1 neo-nodes
to my host files and testInvoke
works!
from api-functions.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api-functions.