Skip to content
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

feat: price-oracle pallet #112

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
32ab7c9
pallet_price_oracle initial commit
Roznovjak Jul 15, 2021
98cd5ba
price-oracle initial implementation
Roznovjak Jul 22, 2021
7125c2c
price-oracle initial implementation
Roznovjak Jul 22, 2021
0c3d9c5
clippy and formatting
Roznovjak Jul 22, 2021
37ecf49
various adjustments
Roznovjak Aug 2, 2021
ca4cc34
Merge branch 'master' into feat/price_oracle
Roznovjak Aug 2, 2021
8bb43c1
ignore zero prices and move impl types to own file
Roznovjak Aug 4, 2021
13d64b3
Merge branch 'master' into feat/price_oracle
Roznovjak Aug 4, 2021
a5ca64e
remove unused config params
Roznovjak Aug 4, 2021
a7f09fe
Merge branch 'master' into feat/price_oracle
Roznovjak Aug 5, 2021
c7af9ce
initial price-oracle benchmarking
Roznovjak Aug 6, 2021
e9d4c62
update price-oracle benchmarking
Roznovjak Aug 8, 2021
e83579e
add new benchmarks and parameterize weight calculation of on_initialize
Roznovjak Aug 9, 2021
42f43e4
don't decrease the price over time and add new test and benchmark
Roznovjak Aug 11, 2021
1ef6039
comment errors, rename PriceEntry field names and perform checked div…
Roznovjak Aug 11, 2021
9d6f15f
rework benchmarking
Roznovjak Aug 13, 2021
a2da074
rework pricebuffer and average_price calculation
Roznovjak Aug 15, 2021
65f6311
Merge branch 'master' into feat/price_oracle
Roznovjak Aug 15, 2021
fdbad06
add comments
Roznovjak Aug 16, 2021
14e6f31
add num_of_assets storage
Roznovjak Aug 16, 2021
a38d737
remove useless if statement
Roznovjak Aug 18, 2021
6487d35
remove not necessary benchmarks
Roznovjak Aug 18, 2021
7ca20ef
add PoolRegistered event
Roznovjak Aug 19, 2021
5344652
fix event handling in tests
Roznovjak Aug 19, 2021
8de92c6
various improvements
Roznovjak Aug 20, 2021
c79c088
move price computation from on_initialize to on_finalize
Roznovjak Aug 24, 2021
d3d760b
change storage hasher
Roznovjak Aug 24, 2021
99cb4f8
update benchmark weights
Roznovjak Aug 25, 2021
105512e
Merge branch 'master' into feat/price_oracle
Roznovjak Aug 27, 2021
03d8f40
Merge branch 'master' into feat/price_oracle
Roznovjak Aug 31, 2021
b98cc86
add mising config param to mock
Roznovjak Aug 31, 2021
78080c8
Merge branch 'master' into feat/price_oracle
Roznovjak Sep 1, 2021
0cdf2e6
Merge branch 'master' into feat/price_oracle
Roznovjak Oct 12, 2021
7e5493e
merge master branch
Roznovjak Oct 12, 2021
12605ba
satisfy clippy
Roznovjak Oct 12, 2021
17f54ed
small improvements
Roznovjak Oct 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions pallets/price-oracle/Cargo.toml
@@ -0,0 +1,54 @@
[package]
authors = ['GalacticCouncil']
description = 'Price Oracle Pallet'
edition = '2018'
homepage = 'https://github.com/galacticcouncil/basilisk-node'
license = 'Apache 2.0'
name = 'pallet-price-oracle'
repository = 'https://github.com/galacticcouncil/basilisk-node'
version = '1.0.0'

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']

[build-dependencies]
substrate-wasm-builder = {package = 'substrate-wasm-builder', version = '3.0.0'}

# alias "parity-scale-code" to "codec"
[dependencies.codec]
default-features = false
features = ['derive']
package = 'parity-scale-codec'
version = '2.0.0'

[dependencies]
#primitive-types = {default-features = false, version = '0.8.0'}
serde = {features = ['derive'], optional = true, version = '1.0.101'}

# Local dependencies
primitives = {path = '../../primitives', default-features = false}

# Substrate dependencies
#frame-benchmarking = {default-features = false, optional = true, version = '3.0.0'}
frame-support = {default-features = false, version = '3.0.0'}
frame-system = {default-features = false, version = '3.0.0'}
#frame-system-benchmarking = {default-features = false, optional = true, version = '3.0.0'}
sp-core = {default-features = false, version = '3.0.0'}
sp-runtime = {default-features = false, version = '3.0.0'}
sp-std = {default-features = false, version = '3.0.0'}

[dev-dependencies]
sp-io = {default-features = false, version = '3.0.0'}

[features]
default = ['std']
std = [
'serde',
'codec/std',
'frame-support/std',
'frame-system/std',
'sp-runtime/std',
'sp-core/std',
'sp-std/std',
# 'primitives/std',
]