Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
471990f7
Unverified
Commit
471990f7
authored
Dec 04, 2016
by
VoR0220
Committed by
Péter Szilágyi
Dec 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounts/abi: prepare ABI to handle fixed point types
Signed-off-by:
VoR0220
<
rj@erisindustries.com
>
parent
2dcf75a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
type.go
accounts/abi/type.go
+6
-5
No files found.
accounts/abi/type.go
View file @
471990f7
...
...
@@ -33,7 +33,7 @@ const (
FixedBytesTy
BytesTy
HashTy
Real
Ty
FixedPoint
Ty
)
// Type is the reflection of the supported argument type
...
...
@@ -46,6 +46,7 @@ type Type struct {
Kind
reflect
.
Kind
Type
reflect
.
Type
Size
int
DecimalSize
int
// Determines the length of the binary coded decimal in fixed point types.
T
byte
// Our own type checking
stringKind
string
// holds the unparsed string for deriving signatures
...
...
@@ -57,16 +58,16 @@ var (
// Types can be in the format of:
//
// Input = Type [ "[" [ Number ] "]" ] Name .
// Type = [ "u" ] "int" [ Number ] .
// Type = [ "u" ] "int" [ Number ]
[ x ] [ Number ]
.
//
// Examples:
//
// string int uint
real
// string int uint
fixed
// string32 int8 uint8 uint[]
// address int256 uint256
real
[2]
// address int256 uint256
fixed128x128
[2]
fullTypeRegex
=
regexp
.
MustCompile
(
"([a-zA-Z0-9]+)(
\\
[([0-9]*)?
\\
])?"
)
// typeRegex parses the abi sub types
typeRegex
=
regexp
.
MustCompile
(
"([a-zA-Z]+)([0-9]*)?"
)
typeRegex
=
regexp
.
MustCompile
(
"([a-zA-Z]+)([0-9]*)?
x?([0-9]*)?
"
)
)
// NewType creates a new reflection type of abi type given in t.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment