Comments (7)
That is not how it is done. There is no way in the VM to know what is hash160
or hash256
CSharp
var address = new UInt160(Convert.FromBase64String(byteStringValue));
from neo.
Hello,
Maybe not the VM, but the node. The types are stored in the contract manifest.
from neo.
That will change the interface and break all current apps using it.
from neo.
Yes, and this is too dangerous to change. The best solution might be to add another RPC endpoint and change the SDKs first.
We can argue that developers should use their own RPC nodes, but most applications use public RPC nodes. Then, it's probably ideal to introduce a new endpoint instead of changing the existing ones.
from neo.
That's to much. When a developer can easily change the base64 to bytes and reverse bytes.
from neo.
This can't be fixed, see neo-project/neo-modules#609 (comment)
from neo.
Why it can't be fixed if it's an RPC endpoint?
The 'GetInvokeResults' method is not part of the VM. It could accept an additional parameter to parse types using the manifest.
If the conversion fails, it's because there is a bug in the smart contract. Most compilers won't allow you to return different types. This can only happen using "incorrect" storage calls.
If the conversion fails, the developer can either fix their contract or omit the "parse types" parameter.
from neo.
Related Issues (20)
- Create a 'getTransactions' RPC endpoint (plugin/extension) HOT 1
- NEO faucet isn't working HOT 6
- stack size can exceed MaxStackSize HOT 3
- a solution should be found for hardfork and upgrading
- ApplicationLogs Plugin: do not replace invalid ApplicationLog's stackitem with `Null` HOT 2
- Local build fails on master branch at 38cc0e9 HOT 2
- Fix `NeoSystem` Dispose HOT 2
- Implement Rollback Mechanism for Neo Node to Sync Plugin Information HOT 13
- Fix coverall problem introduced recently HOT 1
- Error building Neo.CLI HOT 1
- Create Tests with CI / ACTION to ensure local build is working HOT 4
- [V3.7.5 Checklist] This is a checklist for version 3.7.5 hotfix HOT 9
- How to handle [possible] negative VM refcounter HOT 1
- [Neo Core Event] Define Interfaces for Core Event Handlers
- Comments for Tarjan class HOT 2
- Quality of life CLI options --config-file & --ignore-plugin-network HOT 4
- Add Unit Tests for RpcServer Plugin
- dotnet publish doesn't work in plugin's project path HOT 4
- Wrong debug/release path of plugins HOT 3
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 neo.