-
Notifications
You must be signed in to change notification settings - Fork 24
Lp shade swap #213
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
Merged
Merged
Lp shade swap #213
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
c16913c
merged
DrPresident e909d53
rough LP token contract, needs integration with shadeswap
DrPresident 58777fc
mostly there, needs actual shadeswap integration
DrPresident 720c013
beginning treasury ensemble
DrPresident d35e1f7
Merge remote-tracking branch 'origin/dev' into lp-shade-swap
DrPresident 04db970
integration env setup, need to execute a few more things
DrPresident 7490ce3
added dao harnesses
DrPresident 639d5b0
Update dao.drawio
DrPresident cb436c9
Update dao.drawio
DrPresident 49f5218
Update dao.drawio
DrPresident 12020ea
Update dao.drawio
DrPresident cac9b8b
added reserves to adapter
DrPresident 1ab6e39
some updates to things
DrPresident 5326e0c
added make <package>
DrPresident 58fd2cb
contract harness now working
DrPresident 8a7ed96
Update dao.drawio
DrPresident f5ed77c
Merge remote-tracking branch 'origin/dev' into lp-shade-swap
DrPresident 5a7bd3d
refactored for changes
DrPresident e594b5f
updated treasury rebalance and started move of treasury.accounts to t…
DrPresident 3b36aeb
all builds are release
DrPresident 26ef261
harness issue seems to be fixed
DrPresident 8073307
updated integration tests
DrPresident 8d60d44
ws removal
DrPresident be195bc
todo: factor in holders to unbond/claim/recv
DrPresident 242aa49
governance update
DrPresident 61f557b
governance test update
DrPresident dd0dfe8
moved accounts in treasury to treasury manager holders
DrPresident bb959e3
treasury/manager/scrtstaking building with refactor
DrPresident 74aea3e
updated treasury integration for changes
DrPresident 96d2973
small change
DrPresident e614567
basic manager test, needs some query work on manager
DrPresident 019a3f5
Merge branch 'dev' into lp-shade-swap
DrPresident 1ef5374
added commented 2nd test
DrPresident f7a333d
added mock sienna harness
DrPresident cb5e192
updated sky
DrPresident f664689
some adjustments to get sky building
DrPresident 6305648
removed dead tests
DrPresident a69fc34
fadroma adjustment
DrPresident c382539
some conflicts resolved
DrPresident ff2e88f
Merge remote-tracking branch 'origin/dev' into lp-shade-swap
DrPresident 6cf777a
fixes
DrPresident 5b9ee1b
added package building
DrPresident de42269
network_integration fixes
DrPresident e50ea06
fixde snip20 harness
DrPresident ab57374
Merge branch 'dev' into lp-shade-swap
DrPresident cd969ca
reverted to snip20-reference-impl
DrPresident e8eb394
fixes
DrPresident 0f7ef7a
Merge branch 'dev' into lp-shade-swap
DrPresident 4fba727
harness adjustment
DrPresident 1d3eaec
updated import
DrPresident ca559b1
reverted harness
DrPresident f485013
again some more reverts and fixes
DrPresident a6c9815
govt fix
DrPresident 0e205b7
revert
DrPresident fcd56d3
checkout snip20
DrPresident 88e70c4
tests rework for breaking changes
DrPresident 331b308
test update
DrPresident File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[alias] | ||
wasm = "build --release --target wasm32-unknown-unknown" | ||
unit-test = "test --lib --features backtraces" | ||
integration-test = "test --test integration" | ||
schema = "run --example schema" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
version: 2.1 | ||
|
||
jobs: | ||
build: | ||
docker: | ||
- image: rust:1.43.1 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Version information | ||
command: rustc --version; cargo --version; rustup --version | ||
- restore_cache: | ||
keys: | ||
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }} | ||
- run: | ||
name: Add wasm32 target | ||
command: rustup target add wasm32-unknown-unknown | ||
- run: | ||
name: Build | ||
command: cargo wasm --locked | ||
- run: | ||
name: Unit tests | ||
env: RUST_BACKTRACE=1 | ||
command: cargo unit-test --locked | ||
- run: | ||
name: Integration tests | ||
command: cargo integration-test --locked | ||
- run: | ||
name: Format source code | ||
command: cargo fmt | ||
- run: | ||
name: Build and run schema generator | ||
command: cargo schema --locked | ||
- run: | ||
name: Ensure checked-in source code and schemas are up-to-date | ||
command: | | ||
CHANGES_IN_REPO=$(git status --porcelain) | ||
if [[ -n "$CHANGES_IN_REPO" ]]; then | ||
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:" | ||
git status && git --no-pager diff | ||
exit 1 | ||
fi | ||
- save_cache: | ||
paths: | ||
- /usr/local/cargo/registry | ||
- target/debug/.fingerprint | ||
- target/debug/build | ||
- target/debug/deps | ||
- target/wasm32-unknown-unknown/release/.fingerprint | ||
- target/wasm32-unknown-unknown/release/build | ||
- target/wasm32-unknown-unknown/release/deps | ||
key: v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[package] | ||
name = "lp_shade_swap" | ||
version = "0.1.0" | ||
authors = ["Jack Swenson <jacksonswenson22@gmail.com>"] | ||
edition = "2018" | ||
|
||
exclude = [ | ||
# Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. | ||
"contract.wasm", | ||
"hash.txt", | ||
] | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[lib] | ||
crate-type = ["cdylib", "rlib"] | ||
|
||
[features] | ||
default = [] | ||
# for quicker tests, cargo test --lib | ||
# for more explicit tests, cargo test --features=backtraces | ||
backtraces = ["cosmwasm-std/backtraces"] | ||
debug-print = ["cosmwasm-std/debug-print"] | ||
|
||
[dependencies] | ||
cosmwasm-std = { version = "0.10", package = "secret-cosmwasm-std", features = [ | ||
"staking", | ||
] } | ||
cosmwasm-storage = { version = "0.10", package = "secret-cosmwasm-storage" } | ||
cosmwasm-schema = "0.10.1" | ||
secret-toolkit = { version = "0.2" } | ||
cosmwasm-math-compat = { path = "../../packages/cosmwasm_math_compat" } | ||
shade-protocol = { version = "0.1.0", path = "../../packages/shade_protocol", features = [ | ||
"lp_shade_swap", | ||
"treasury", | ||
"math", | ||
"dex", | ||
] } | ||
schemars = "0.7" | ||
serde = { version = "1.0.103", default-features = false, features = ["derive"] } | ||
snafu = { version = "0.6.3" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
.PHONY: check | ||
check: | ||
cargo check | ||
|
||
.PHONY: clippy | ||
clippy: | ||
cargo clippy | ||
|
||
PHONY: test | ||
test: unit-test | ||
|
||
.PHONY: unit-test | ||
unit-test: | ||
cargo test | ||
|
||
# This is a local build with debug-prints activated. Debug prints only show up | ||
# in the local development chain (see the `start-server` command below) | ||
# and mainnet won't accept contracts built with the feature enabled. | ||
.PHONY: build _build | ||
build: _build compress-wasm | ||
_build: | ||
RUSTFLAGS='-C link-arg=-s' cargo build --release --target wasm32-unknown-unknown --features="debug-print" | ||
|
||
# This is a build suitable for uploading to mainnet. | ||
# Calls to `debug_print` get removed by the compiler. | ||
.PHONY: build-mainnet _build-mainnet | ||
build-mainnet: _build-mainnet compress-wasm | ||
_build-mainnet: | ||
RUSTFLAGS='-C link-arg=-s' cargo build --release --target wasm32-unknown-unknown | ||
|
||
# like build-mainnet, but slower and more deterministic | ||
.PHONY: build-mainnet-reproducible | ||
build-mainnet-reproducible: | ||
docker run --rm -v "$$(pwd)":/contract \ | ||
--mount type=volume,source="$$(basename "$$(pwd)")_cache",target=/contract/target \ | ||
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ | ||
enigmampc/secret-contract-optimizer:1.0.3 | ||
|
||
.PHONY: compress-wasm | ||
compress-wasm: | ||
cp ./target/wasm32-unknown-unknown/release/*.wasm ./contract.wasm | ||
@## The following line is not necessary, may work only on linux (extra size optimization) | ||
@# wasm-opt -Os ./contract.wasm -o ./contract.wasm | ||
cat ./contract.wasm | gzip -9 > ./contract.wasm.gz | ||
|
||
.PHONY: schema | ||
schema: | ||
cargo run --example schema | ||
|
||
# Run local development chain with four funded accounts (named a, b, c, and d) | ||
.PHONY: start-server | ||
start-server: # CTRL+C to stop | ||
docker run -it --rm \ | ||
-p 26657:26657 -p 26656:26656 -p 1317:1317 \ | ||
-v $$(pwd):/root/code \ | ||
--name secretdev enigmampc/secret-network-sw-dev:v1.0.4-3 | ||
|
||
# This relies on running `start-server` in another console | ||
# You can run other commands on the secretcli inside the dev image | ||
# by using `docker exec secretdev secretcli`. | ||
.PHONY: store-contract-local | ||
store-contract-local: | ||
docker exec secretdev secretcli tx compute store -y --from a --gas 1000000 /root/code/contract.wasm.gz | ||
|
||
.PHONY: clean | ||
clean: | ||
cargo clean | ||
-rm -f ./contract.wasm ./contract.wasm.gz |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.