-
Notifications
You must be signed in to change notification settings - Fork 102
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
ReadOnly methods #93
ReadOnly methods #93
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please let's merge #94 first... too complicated to review now.
I'll have to reproduce your commits one by one... the conflicting file is exactly the most complicated one........ another excellent reason for doing 94 before, it would be impossible to review. |
Can you merge @shargon? It's about 5 blocks of code... for me I'm blind, have to understand everything step by step to fix this... perhaps you can do it quicker, as you precisely know the changes. |
@igormcoelho is done |
Can you give an example of the output json from the changes? |
This is the final format (was adjusted considering that neo have the good one) {
"hash": "0x77811b3127dea2df1a18230f91396fbcf8c648f4",
"methods": [
{
"name": "readOnlyTrue",
"parameters": [],
"returnType": "Void"
},
{
"name": "readOnlyFalse1",
"parameters": [],
"returnType": "Void"
},
{
"name": "readOnlyFalse2",
"parameters": [],
"returnType": "Void"
}
],
"readOnlyMethods": [
"readOnlyTrue"
],
"entryPoint": {
"name": "Main",
"parameters": [
{
"name": "method",
"type": "String"
},
{
"name": "args",
"type": "Array"
}
],
"returnType": "Void"
},
"events": [
{
"name": "transfer",
"parameters": [
{
"name": "arg1",
"type": "ByteArray"
},
{
"name": "arg2",
"type": "ByteArray"
},
{
"name": "arg3",
"type": "Integer"
}
]
}
]
} for the code: public class Contract_Abi : SmartContract.Framework.SmartContract
{
[DisplayName("transfer")]
public static event Action<byte[], byte[], BigInteger> Transferred;
public static void Main(string method, object[] args) { }
[ReadOnly(true)]
public static void readOnlyTrue() { }
[ReadOnly(false)]
public static void readOnlyFalse1() { }
public static void readOnlyFalse2() { }
} Note that |
I think we don't have |
These changes are precisely for this neo-project/neo#927 |
Maybe we can output in this format: {
"methods": [
{
"name": "readOnlyTrue",
"parameters": [],
"returnType": "Void",
"readonly": true,
}
]
} Or just not modify the ABI, we keep |
I prefer to modify the abi, is more readable, i like your way. |
Okay. Let's amend the NEP-3 specification first. |
Fully agree on |
@igormcoelho could amend the NEP-3? and as you said, yes, must be in camel case |
Changes made, requires updating the NEP-3 and NEO manifest before merging |
Required for neo-project/neo#1052
Fix some issues:
entrypoint
toentryPoint
(from string to method)functions
tomethods
returntype
toreturnType