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

Diff for audit #4

Closed
wants to merge 69 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
12b60c0
initial commit
epanchee Sep 7, 2023
1e8be22
use custom test-tube
epanchee Sep 7, 2023
7312a39
disable cw20 on instatiation;
epanchee Sep 7, 2023
c911ec3
use pool id in swap endpoint
epanchee Sep 7, 2023
fc4a6a4
refactoring
epanchee Sep 7, 2023
371bcdf
check pair is bricked if instantiated outside of factory
epanchee Sep 7, 2023
354fd5d
swap: assert provided asset belongs to the pair
epanchee Sep 11, 2023
f59988a
process lp token denom in reply
epanchee Sep 11, 2023
548f508
add tests for factory
epanchee Sep 11, 2023
d23ed5d
set 1000 OSMO as pool creation fee
epanchee Sep 12, 2023
670ee8e
add TODO
epanchee Sep 12, 2023
5cba0a7
increase factory coverage
epanchee Sep 12, 2023
b7f252c
add comment
epanchee Sep 12, 2023
9fe9e37
address Osmosis comments
epanchee Sep 13, 2023
c0ffd26
set response data in SudoMessage::SwapExactAmountIn
epanchee Sep 13, 2023
6ffe1af
reverse swap via DEX finally works!
epanchee Sep 13, 2023
3b5b584
fix osmosis fee in error
epanchee Sep 13, 2023
5289983
integration tests with Stargate messages!
epanchee Sep 14, 2023
a766c53
address clippy issues
epanchee Sep 14, 2023
7f23418
use cw-multi-test from astroport-fi
epanchee Sep 15, 2023
b9488f5
minor Stargate module refactoring
epanchee Sep 15, 2023
f1fbe2a
increase PCL code coverage
epanchee Sep 15, 2023
91fca05
refactoring
epanchee Sep 18, 2023
bef0fa1
test cw20 are not supported
epanchee Sep 18, 2023
77489af
tests refactoring
epanchee Sep 18, 2023
d59b84f
coverage for sudo SwapExactAmountOut
epanchee Sep 18, 2023
5d77770
repair copy pasted tests
epanchee Sep 18, 2023
be4037c
setup GitHub actions
epanchee Sep 18, 2023
6e09771
add Cargo.lock
epanchee Sep 18, 2023
3808a54
fix coverage gh action
epanchee Sep 18, 2023
3f9fdba
add wasm32 target in test flow
epanchee Sep 18, 2023
400676c
add fallback cache key in coverage action
epanchee Sep 18, 2023
094331e
no reason to cache data in coverage action
epanchee Sep 18, 2023
850a1c8
exclude random files in ./target dir from coverage report
epanchee Sep 18, 2023
167b2a3
disable multithreaded testing
epanchee Sep 18, 2023
6f95f01
address clippy issues
epanchee Sep 18, 2023
9d24cc7
attach coverage report in gh action
epanchee Sep 18, 2023
10effde
attach coverage report in gh action
epanchee Sep 18, 2023
ce17326
attach coverage report in gh action
epanchee Sep 18, 2023
3d0eead
build coverage reports in Xml and Html formats
epanchee Sep 18, 2023
06dfa6b
build coverage reports in Xml and Html formats
epanchee Sep 18, 2023
32dddea
resolve one TODO
epanchee Sep 18, 2023
f2e76d8
update astroport deps
epanchee Sep 19, 2023
fd6e169
remove python setup from gh action
epanchee Sep 19, 2023
a95dfe2
fix comment
epanchee Sep 20, 2023
08e84eb
disable cache always()
epanchee Sep 20, 2023
18501a2
gh actions: do not override rustc x86 target
epanchee Sep 20, 2023
d2ee1db
update gh action
epanchee Sep 20, 2023
b7df5a3
use main branch of astroport-core repo
epanchee Sep 26, 2023
e78447c
bump deps
epanchee Oct 31, 2023
058f4e0
remove deprecated calls
epanchee Oct 31, 2023
8c20ef6
dynamic pool creation fee
epanchee Oct 31, 2023
0244be3
resolve TODOs
epanchee Nov 1, 2023
d9b5035
minor optimization
epanchee Nov 1, 2023
5745a9b
export internal functions
epanchee Nov 2, 2023
811cc5f
pin testnet factory address
epanchee Nov 2, 2023
f71f0c2
bump test-tube
epanchee Nov 4, 2023
e0a996f
resolve TODOs; add PCL readme
epanchee Nov 7, 2023
716f921
address clippy issues
epanchee Nov 7, 2023
3694658
revert factory_address
epanchee Nov 7, 2023
fe012b9
e2e helper minor refactoring
epanchee Nov 10, 2023
200e188
adjust oracle query to new observation layout
epanchee Nov 13, 2023
0132415
remove spread assertion in swap_exact_amount_out
epanchee Nov 13, 2023
e990ab1
update cw-multi-test to the latest version to enable stargate
epanchee Dec 1, 2023
6fd7d4b
pull pcl updates from upstream
epanchee Dec 1, 2023
4a66e16
remove coin registry crate; rename PCL contract folder
epanchee Dec 1, 2023
b261f82
move file with factory address
epanchee Dec 1, 2023
fd18ca2
remove unused files after rebasing
epanchee Dec 1, 2023
e4df7ed
Merge branch 'preaudit_code' into diff_for_audit
epanchee Dec 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,564 changes: 1,973 additions & 591 deletions Cargo.lock

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
resolver = "2"
members = [
"contracts/*",
"e2e_tests",
"packages/*"
]

[profile.release]
Expand All @@ -14,4 +16,11 @@ codegen-units = 1
panic = 'abort'
incremental = false
overflow-checks = true
strip = true
strip = true

[workspace.dependencies]
astroport = { git = "https://github.com/astroport-fi/hidden_astroport_core", version = "3.7" }
astroport-pcl-common = { git = "https://github.com/astroport-fi/hidden_astroport_core", version = "1.0.1" }
astroport-circular-buffer = { git = "https://github.com/astroport-fi/hidden_astroport_core", version = "0.1.0" }
astroport-native-coin-registry = "1.0.1"
osmosis-std = "0.20.1"
2 changes: 0 additions & 2 deletions contracts/README.md

This file was deleted.

42 changes: 15 additions & 27 deletions contracts/factory/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,43 +1,31 @@
[package]
name = "astroport-factory"
version = "1.6.0"
name = "astroport-factory-osmosis"
version = "1.0.0"
authors = ["Astroport"]
edition = "2021"
description = "Astroport factory contract - pair contract generator and directory"
description = "Astroport factory contract for Osmosis"
license = "MIT"

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]
# for quicker tests, cargo test --lib
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
library = []

[dependencies]
cosmwasm-std = "1.1"
astroport = { version = "3" }
cosmwasm-std = { version = "1", features = ["cosmwasm_1_1"] }
cosmwasm-schema = "1"
cw-storage-plus = "0.15"
cw2 = "0.15"
osmosis-std = { workspace = true }
cw-utils = "1"
cw2 = "1"
astroport = { workspace = true }
astroport-on-osmosis = { path = "../../packages/astroport_on_osmosis", version = "1" }
thiserror = "1.0"
protobuf = { version = "2", features = ["with-bytes"] }
itertools = "0.10"
cosmwasm-schema = "1.1"
cw-utils = "1.0.1"
itertools = "0.11"

[dev-dependencies]
cw-multi-test = "0.15"
astroport-token = "1.1.1"
astroport-pair = "1.5.0"
cw20 = "0.15"
anyhow = "1.0"
prost = "0.11.5"
astroport-pcl-osmo = { path = "../pair_concentrated" }
cw-multi-test = { git = "https://github.com/CosmWasm/cw-multi-test", rev = "b1ce5acd07226b91c45f27b9bb01e67697cdd20f" }
prost = "0.11"
anyhow = "1"
Loading
Loading