Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
tinman
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
tinman
Commits
11f72bc0
Unverified
Commit
11f72bc0
authored
6 years ago
by
Anthony Martin
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #157 from steemit/156-initial-price-feed
added price feeds to durables #156
parents
8910592a
777ca12f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
durables.conf.example
+129
-0
129 additions, 0 deletions
durables.conf.example
tinman/durables.py
+11
-0
11 additions, 0 deletions
tinman/durables.py
with
140 additions
and
0 deletions
durables.conf.example
+
129
−
0
View file @
11f72bc0
...
...
@@ -105,5 +105,134 @@
"vesting": {"amount": "250000000", "precision": 3, "nai": "@@000000021"},
"creator": "initminer"
}
],
"feeds": [
{
"publisher": "init-0",
"exchange_rate": {
"base": {"amount": "153", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "187", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-1",
"exchange_rate": {
"base": {"amount": "133", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "197", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-2",
"exchange_rate": {
"base": {"amount": "1481", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "500", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-3",
"exchange_rate": {
"base": {"amount": "681", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "1000", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-4",
"exchange_rate": {
"base": {"amount": "153", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "187", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-5",
"exchange_rate": {
"base": {"amount": "155", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "176", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-6",
"exchange_rate": {
"base": {"amount": "154", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "180", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-7",
"exchange_rate": {
"base": {"amount": "151", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "167", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-8",
"exchange_rate": {
"base": {"amount": "155", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "189", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-9",
"exchange_rate": {
"base": {"amount": "151", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "187", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-10",
"exchange_rate": {
"base": {"amount": "153", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "187", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-11",
"exchange_rate": {
"base": {"amount": "153", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "187", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-12",
"exchange_rate": {
"base": {"amount": "153", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "187", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-13",
"exchange_rate": {
"base": {"amount": "153", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "187", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-14",
"exchange_rate": {
"base": {"amount": "153", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "187", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-15",
"exchange_rate": {
"base": {"amount": "153", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "187", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-16",
"exchange_rate": {
"base": {"amount": "153", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "187", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-17",
"exchange_rate": {
"base": {"amount": "153", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "187", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-18",
"exchange_rate": {
"base": {"amount": "153", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "187", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-19",
"exchange_rate": {
"base": {"amount": "153", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "187", "precision": 3, "nai": "@@000000021"}
}
}, {
"publisher": "init-20",
"exchange_rate": {
"base": {"amount": "153", "precision": 3, "nai": "@@000000013"},
"quote": {"amount": "187", "precision": 3, "nai": "@@000000021"}
}
}
]
}
This diff is collapsed.
Click to expand it.
tinman/durables.py
+
11
−
0
View file @
11f72bc0
...
...
@@ -22,13 +22,24 @@ def build_account_tx(account, keydb, silent=True):
}}],
"
wif_sigs
"
:
[
keydb
.
get_privkey
(
account
[
"
creator
"
])]}
def
build_feed_tx
(
feed
,
keydb
,
silent
=
True
):
return
{
"
operations
"
:
[{
"
type
"
:
"
feed_publish_operation
"
,
"
value
"
:
{
"
publisher
"
:
feed
[
"
publisher
"
],
"
exchange_rate
"
:
feed
[
"
exchange_rate
"
]
}}],
"
wif_sigs
"
:
[
keydb
.
get_privkey
(
feed
[
"
publisher
"
])]}
def
build_actions
(
conf
,
silent
=
True
):
keydb
=
prockey
.
ProceduralKeyDatabase
()
accounts
=
conf
[
"
accounts
"
]
feeds
=
conf
[
"
feeds
"
]
for
account
in
accounts
:
yield
[
"
submit_transaction
"
,
{
"
tx
"
:
build_account_tx
(
account
,
keydb
,
silent
)}]
for
feed
in
feeds
:
yield
[
"
submit_transaction
"
,
{
"
tx
"
:
build_feed_tx
(
feed
,
keydb
,
silent
)}]
return
def
main
(
argv
):
...
...
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