Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
beem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
beem
Commits
f8f33b34
Commit
f8f33b34
authored
7 years ago
by
Holger Nahrstaedt
Browse files
Options
Downloads
Patches
Plain Diff
Removed not used classes from bitshares
parent
160bb6f9
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
beembase/objects.py
+1
-54
1 addition, 54 deletions
beembase/objects.py
beembase/operations.py
+1
-3
1 addition, 3 deletions
beembase/operations.py
beemgraphenebase/objects.py
+1
-2
1 addition, 2 deletions
beemgraphenebase/objects.py
with
3 additions
and
59 deletions
beembase/objects.py
+
1
−
54
View file @
f8f33b34
...
@@ -13,8 +13,7 @@ from beemgraphenebase.types import (
...
@@ -13,8 +13,7 @@ from beemgraphenebase.types import (
Varint32
,
Int64
,
String
,
Bytes
,
Void
,
Varint32
,
Int64
,
String
,
Bytes
,
Void
,
Array
,
PointInTime
,
Signature
,
Bool
,
Array
,
PointInTime
,
Signature
,
Bool
,
Set
,
Fixed_array
,
Optional
,
Static_variant
,
Set
,
Fixed_array
,
Optional
,
Static_variant
,
Map
,
Id
,
VoteId
,
Map
,
Id
ObjectId
as
GPHObjectId
)
)
from
beemgraphenebase.objects
import
GrapheneObject
,
isArgsThisClass
from
beemgraphenebase.objects
import
GrapheneObject
,
isArgsThisClass
from
.objecttypes
import
object_type
from
.objecttypes
import
object_type
...
@@ -33,32 +32,6 @@ asset_precision = {
...
@@ -33,32 +32,6 @@ asset_precision = {
}
}
def
AssetId
(
asset
):
return
ObjectId
(
asset
,
"
asset
"
)
def
AccountId
(
asset
):
return
ObjectId
(
asset
,
"
account
"
)
class
ObjectId
(
GPHObjectId
):
"""
Encodes object/protocol ids
"""
def
__init__
(
self
,
object_str
,
type_verify
=
None
):
if
len
(
object_str
.
split
(
"
.
"
))
==
3
:
space
,
type
,
id
=
object_str
.
split
(
"
.
"
)
self
.
space
=
int
(
space
)
self
.
type
=
int
(
type
)
self
.
instance
=
Id
(
int
(
id
))
self
.
Id
=
object_str
if
type_verify
:
if
not
object_type
[
type_verify
]
==
int
(
type
):
raise
AssertionError
(
"
Object id does not match object type!
"
"
Excpected %d, got %d
"
%
(
object_type
[
type_verify
],
int
(
type
)))
else
:
raise
Exception
(
"
Object id is invalid
"
)
@python_2_unicode_compatible
@python_2_unicode_compatible
class
Amount
(
object
):
class
Amount
(
object
):
def
__init__
(
self
,
d
):
def
__init__
(
self
,
d
):
...
@@ -203,32 +176,6 @@ class Permission(GrapheneObject):
...
@@ -203,32 +176,6 @@ class Permission(GrapheneObject):
]))
]))
class
AccountOptions
(
GrapheneObject
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
# Allow for overwrite of prefix
prefix
=
kwargs
.
pop
(
"
prefix
"
,
default_prefix
)
if
isArgsThisClass
(
self
,
args
):
self
.
data
=
args
[
0
].
data
else
:
if
len
(
args
)
==
1
and
len
(
kwargs
)
==
0
:
kwargs
=
args
[
0
]
# remove dublicates
kwargs
[
"
votes
"
]
=
list
(
set
(
kwargs
[
"
votes
"
]))
# Sort votes
kwargs
[
"
votes
"
]
=
sorted
(
kwargs
[
"
votes
"
],
key
=
lambda
x
:
float
(
x
.
split
(
"
:
"
)[
1
]),
)
super
(
AccountOptions
,
self
).
__init__
(
OrderedDict
([
(
'
memo_key
'
,
PublicKey
(
kwargs
[
"
memo_key
"
],
prefix
=
prefix
)),
(
'
voting_account
'
,
ObjectId
(
kwargs
[
"
voting_account
"
],
"
account
"
)),
(
'
num_witness
'
,
Uint16
(
kwargs
[
"
num_witness
"
])),
(
'
num_committee
'
,
Uint16
(
kwargs
[
"
num_committee
"
])),
(
'
votes
'
,
Array
([
VoteId
(
o
)
for
o
in
kwargs
[
"
votes
"
]])),
]))
@python_2_unicode_compatible
@python_2_unicode_compatible
class
Extension
(
Array
):
class
Extension
(
Array
):
def
__str__
(
self
):
def
__str__
(
self
):
...
...
This diff is collapsed.
Click to expand it.
beembase/operations.py
+
1
−
3
View file @
f8f33b34
...
@@ -11,7 +11,7 @@ from beemgraphenebase.types import (
...
@@ -11,7 +11,7 @@ from beemgraphenebase.types import (
Varint32
,
Int64
,
String
,
Bytes
,
Void
,
Varint32
,
Int64
,
String
,
Bytes
,
Void
,
Array
,
PointInTime
,
Signature
,
Bool
,
Array
,
PointInTime
,
Signature
,
Bool
,
Set
,
Fixed_array
,
Optional
,
Static_variant
,
Set
,
Fixed_array
,
Optional
,
Static_variant
,
Map
,
Id
,
VoteId
Map
,
Id
)
)
from
.objects
import
GrapheneObject
,
isArgsThisClass
from
.objects
import
GrapheneObject
,
isArgsThisClass
from
beemgraphenebase.account
import
PublicKey
from
beemgraphenebase.account
import
PublicKey
...
@@ -24,8 +24,6 @@ from .objects import (
...
@@ -24,8 +24,6 @@ from .objects import (
Price
,
Price
,
WitnessProps
,
WitnessProps
,
Permission
,
Permission
,
AccountOptions
,
ObjectId
,
ExchangeRate
,
ExchangeRate
,
Beneficiaries
,
Beneficiaries
,
Beneficiary
,
Beneficiary
,
...
...
This diff is collapsed.
Click to expand it.
beemgraphenebase/objects.py
+
1
−
2
View file @
f8f33b34
...
@@ -12,8 +12,7 @@ from beemgraphenebase.types import (
...
@@ -12,8 +12,7 @@ from beemgraphenebase.types import (
Varint32
,
Int64
,
String
,
Bytes
,
Void
,
Varint32
,
Int64
,
String
,
Bytes
,
Void
,
Array
,
PointInTime
,
Signature
,
Bool
,
Array
,
PointInTime
,
Signature
,
Bool
,
Set
,
Fixed_array
,
Optional
,
Static_variant
,
Set
,
Fixed_array
,
Optional
,
Static_variant
,
Map
,
Id
,
VoteId
,
ObjectId
,
Map
,
Id
,
JsonObj
JsonObj
)
)
from
.py23
import
py23_bytes
,
bytes_types
,
integer_types
,
string_types
from
.py23
import
py23_bytes
,
bytes_types
,
integer_types
,
string_types
from
.chains
import
known_chains
from
.chains
import
known_chains
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment