Hello, I’m trying to execute the code bellow:
config = {
net: 'TestNet',
script: Neon.create.script({
scriptHash: 'de1a53be359e8be9f3d11627bcca40548a2d5bc1',
operation: 'registerMailbox',
args: [
Neon.u.reverseHex(Neon.u.str2hexstring(neoWallet.getPublicKey(true))),
Neon.u.reverseHex(Neon.u.str2hexstring('some string'))
]
}),
address: neoWallet.address,
privateKey: neoWallet.privateKey,
gas: 0
};
Neon.doInvoke(config).then(res => {
console.log(res.response);
});
And am getting errors like:
Request header field timeout is not allowed by Access-Control-Allow-Headers in preflight response.
Any idea?
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Cross-Origin Resource Sharing (CORS) - MDN Web Docs
Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that allows a server to indicate any origins (domain, scheme, ...
Read more >Cross-origin resource sharing - Wikipedia
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources on a web page to be requested from another domain outside the...
Read more >What is CORS (cross-origin resource sharing)? - PortSwigger
Cross-origin resource sharing (CORS) is a browser mechanism which enables controlled access to resources located outside of a given domain. It extends and...
Read more >Cross-Origin Resource Sharing (CORS) - web.dev
The browser's same-origin policy blocks reading a resource from a different origin. This mechanism stops a malicious site from reading ...
Read more >CORS Enabled - W3C Wiki
CORS is a specification that enables truly open access across domain boundaries. Why is CORS important? Currently, client-side scripts (e.g., JavaScript) are ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
sorry, there was some issue with publishing. It should be available now.
As for your question, there is no such type as
Address
for contract param. I guess that is where it went wrong. You should be using a bytearray to pass the address in. I would tryNeon.sc.ContractParam.byteArray(neoWallet.address, 'address')
This issue occurs sporadically depending on the endpoint selected by neon-js. I’ve run into this as well. I haven’t dug into it, but I suspect it’s either an issue with specific endpoint versions, or with the server setup around that endpoint.