PreExec tx return gasUsed and process slice parameters when invoke evm contract #66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
xuper/xuperclient.go: add field GasUsed when return the Transaction so that users can know how many gas they cost while pre-execute or post a transaction to the chain.
xuper/request.go: process slice parameters(they can be string slice, float64 slice or empty slice) when invoke evm contract.
Type of change
Brief of your solution
Return gasUsed when post tx.
Process slice parameters when invoke evm contract.
How Has This Been Tested?
There is a evm function declare like this:
The previous code will parse request parameter users
"[\"2462380BA1B39BB42AD9AECCAC7E91CB9D40AC27\",\"1A9BDAB96390EF0E4820519A95FCB96856202BB0\"]"
and ids"[\"1\",\"2\"]"
to string not the slice then lead to failure, the latest code will parse it correctly.