-
Notifications
You must be signed in to change notification settings - Fork 79
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
Documentation update for 2.x #956
Conversation
There is a Neo.Account.IsStandard syscall, but we didn't have a wrapper for it.
Turns out, they never functioned correctly.
4a58719
to
ba109c4
Compare
Codecov Report
@@ Coverage Diff @@
## master-2.x #956 +/- ##
===========================================
Coverage 68.20% 68.20%
===========================================
Files 144 144
Lines 14186 14186
===========================================
Hits 9675 9675
Misses 4058 4058
Partials 453 453 Continue to review full report at Codecov.
|
// GetVotes returns current votes of the given account represented as a slice of | ||
// public keys. Keys are serialized into byte slices in their compressed form (33 | ||
// bytes long each). This function uses `Neo.Account.GetVotes` syscall | ||
// internally. | ||
func GetVotes(a Account) [][]byte { |
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.
I was thinking about making this interops a method of an Account
struct. Not here, of course.
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.
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.
And not for 2.x also, I think.
pkg/interop/asset/asset.go
Outdated
// Create registers a new asset on the blockchain (similar to old Register | ||
// transaction). `assetType` parameter has the same set of possible values as | ||
// GetAssetType result, `amount` must be multiplied by 10⁸, `precision` limits | ||
// the smallest possible amount of new Asset to 10⁻ⁿ (where n in precision which |
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.
in
-> is
or remove which
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.
ACK
pkg/interop/blockchain/blockchain.go
Outdated
|
||
// GetHeight returns the height of te block recorded in the current execution scope. | ||
// GetHeight returns current block height (index of the last accepted block, | ||
// note that transaction in being run as a part of new block this block is |
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.
There is an unpaired parenthesis and I don't understand what does this mean. Probably being run as a part of new block
is superfluous and this can be split in several sentences, to make it easier to read.
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.
I'll probably rephrase it a little.
docs/rpc.md
Outdated
|
||
Both methods also don't currently support arrays in function parameters. | ||
This server accepts websocket connections on `$BASE_URL/ws` address. You can |
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.
Maybe it worth mentioning URI scheme: ws://$BASE_URL/ws
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.
ACK
* global variables can't be changed in functions (#638) | ||
* it's not possible to rename imported interop packages, they won't work this | ||
way (#397, #913) | ||
|
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.
Are nested selectors going to be supported? From my experience I often want to use them when cycling slice of structures, but can't. If not, then it is worth mention it there.
for i := 0; i < len(arr); i++ {
foo(arr[i].bar)
}
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 file an issue for it (it should be fixed eventually) and I'll add it to this list.
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.
Also don't forget that range loops with value variable are also not supported.
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.
OK, #958.
Both Create and Renew have things returned from them.
GetTransaction never worked with hash, it works with indexes.
It should return keys, attempting to push []*state.Validator to the stack would probably lead to failure.
And sort syscall names as they change the indentation anyway.
It interferes with interop/blockchain and it's not a default directory for chain DBs.
This syscall should only work for contracts created by current transaction and that is what is supposed to be checked here. Do so by looking at the differences between ic.dao and original lower DAO.
Some functions were just not correct in their interfaces.
Previously we could generate dynamic appcall with a kludge of AppCall([]byte{/* 20 zeroes */, realScriptHash, args...) Now there is a separate function for this.
We have a syscall for it, so it should be exposed.
Notify doesn't return anything!
There is no such syscall as Neo.Transaction.GetScript and GetScript should be available for contract's use.
It's useless. Even though there is Neo.Transaction.GetUnspentCoins syscall that can be used, its return type is an interop structure that's not accepted by any other syscall, so you can't really do anything with it. And there is no such interface for the .net Framework.
We have now way better godoc for interop functions, so this document makes little sense and it's not referenced anywhere, so it's safe to drop it.
And add one more reference to it into the main README.
ba109c4
to
ddbc905
Compare
Problem
Stale or completely missing documentation for interops, compiler and RPC.
Solution
Update it a little.
It also fixes some interops, compiler and fixes #914.