diff --git a/.github/workflows/check_artifacts.yml b/.github/workflows/check_artifacts.yml index 9b90e55b8..c518fe5ec 100644 --- a/.github/workflows/check_artifacts.yml +++ b/.github/workflows/check_artifacts.yml @@ -8,59 +8,17 @@ on: env: CARGO_TERM_COLOR: always - CARGO_NET_GIT_FETCH_WITH_CLI: true jobs: - fetch_deps: - name: Fetch cargo dependencies + check-artifacts-size: runs-on: ubuntu-latest - + name: Check Artifacts Size steps: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.11.0 with: access_token: ${{ github.token }} - - uses: actions/checkout@v3 - - uses: webfactory/ssh-agent@v0.7.0 - with: - ssh-private-key: | - ${{ secrets.GOV_PRIVATE_KEY }} - - - uses: actions/cache@v3 - if: always() - with: - path: | - ~/.cargo/bin - ~/.cargo/git/checkouts - ~/.cargo/git/db - ~/.cargo/registry/cache - ~/.cargo/registry/index - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo- - - - run: | - git config url."ssh://git@github.com/astroport-fi/hidden_astroport_governance.git".insteadOf "https://github.com/astroport-fi/hidden_astroport_governance" - - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.68.0 - override: true - - - name: Fetch cargo deps - uses: actions-rs/cargo@v1 - with: - command: fetch - args: --locked - - check-artifacts-size: - runs-on: ubuntu-latest - name: Check Artifacts Size - needs: fetch_deps - steps: - name: Checkout sources uses: actions/checkout@v3 @@ -73,8 +31,6 @@ jobs: ~/.cargo/registry/cache ~/.cargo/registry/index key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - # docker can't pull private sources, so we fail if cache is missing - fail-on-cache-miss: true - name: Build Artifacts run: | diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index e8fb78350..17eb756ce 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -23,11 +23,6 @@ jobs: with: access_token: ${{ github.token }} - - uses: webfactory/ssh-agent@v0.7.0 - with: - ssh-private-key: | - ${{ secrets.GOV_PRIVATE_KEY }} - - name: Checkout repository uses: actions/checkout@v2 - uses: actions/cache@v3 @@ -40,8 +35,6 @@ jobs: ~/.cargo/registry/index target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - run: | - git config url."ssh://git@github.com/astroport-fi/hidden_astroport_governance.git".insteadOf "https://github.com/astroport-fi/hidden_astroport_governance" - name: Install stable toolchain uses: actions-rs/toolchain@v1 diff --git a/.github/workflows/tests_and_checks.yml b/.github/workflows/tests_and_checks.yml index cc98f768f..f78825369 100644 --- a/.github/workflows/tests_and_checks.yml +++ b/.github/workflows/tests_and_checks.yml @@ -8,7 +8,6 @@ on: env: CARGO_TERM_COLOR: always - CARGO_NET_GIT_FETCH_WITH_CLI: true jobs: test_and_check: @@ -21,12 +20,8 @@ jobs: with: access_token: ${{ github.token }} - - uses: actions/checkout@v3 - - uses: webfactory/ssh-agent@v0.7.0 - with: - ssh-private-key: | - ${{ secrets.GOV_PRIVATE_KEY }} - + - name: Checkout sources + uses: actions/checkout@v3 - uses: actions/cache@v3 if: always() with: @@ -41,9 +36,6 @@ jobs: restore-keys: | ${{ runner.os }}-cargo- - - run: | - git config url."ssh://git@github.com/astroport-fi/hidden_astroport_governance.git".insteadOf "https://github.com/astroport-fi/hidden_astroport_governance" - - name: Install stable toolchain uses: actions-rs/toolchain@v1 with: diff --git a/Cargo.toml b/Cargo.toml index 6b908a24a..fffd676a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,9 +29,6 @@ incremental = false overflow-checks = true strip = true -[patch.'https://github.com/astroport-fi/hidden_astroport_core'] -astroport = { path = "packages/astroport" } - [patch.'https://github.com/astroport-fi/astroport-core'] astroport = { path = "packages/astroport" } diff --git a/README.md b/README.md index 00d83f2ed..b14c31bb8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Astroport Core -[![codecov](https://codecov.io/gh/astroport-fi/hidden_astroport_core/branch/main/graph/badge.svg?token=D8539UWBST)](https://codecov.io/gh/astroport-fi/hidden_astroport_core) +[![codecov](https://codecov.io/gh/astroport-fi/astroport-core/branch/main/graph/badge.svg?token=ROOLZTGZMM)](https://codecov.io/gh/astroport-fi/astroport-core) Multi pool type automated market-maker (AMM) protocol powered by smart contracts on the [Terra](https://terra.money) blockchain. diff --git a/contracts/cw20_ics20/src/ibc.rs b/contracts/cw20_ics20/src/ibc.rs index ab0e52510..0ae785f06 100644 --- a/contracts/cw20_ics20/src/ibc.rs +++ b/contracts/cw20_ics20/src/ibc.rs @@ -1,7 +1,3 @@ -use astroport::outpost_handler::Cw20HookMsg; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; - use cosmwasm_schema::cw_serde; use cosmwasm_std::{ attr, entry_point, from_binary, to_binary, BankMsg, Binary, CosmosMsg, Deps, DepsMut, Env, @@ -9,6 +5,11 @@ use cosmwasm_std::{ IbcEndpoint, IbcOrder, IbcPacket, IbcPacketAckMsg, IbcPacketReceiveMsg, IbcPacketTimeoutMsg, IbcReceiveResponse, Reply, Response, SubMsg, SubMsgResult, Uint128, WasmMsg, }; +use cw20::Cw20ExecuteMsg; +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; + +use astroport::outpost_handler::Cw20HookMsg; use crate::amount::Amount; use crate::error::{ContractError, Never}; @@ -16,7 +17,6 @@ use crate::state::{ reduce_channel_balance, undo_reduce_channel_balance, ChannelInfo, ReplyArgs, ALLOW_LIST, CHANNEL_INFO, CONFIG, REPLY_ARGS, }; -use cw20::Cw20ExecuteMsg; pub const ICS20_VERSION: &str = "ics20-1"; pub const ICS20_ORDERING: IbcOrder = IbcOrder::Unordered; @@ -488,15 +488,17 @@ fn send_amount(amount: Amount, recipient: String) -> CosmosMsg { #[cfg(test)] mod test { - use super::*; - use crate::test_helpers::*; + use cosmwasm_std::testing::{mock_env, mock_info}; + use cosmwasm_std::{coins, to_vec, IbcEndpoint, IbcMsg, IbcTimeout, Timestamp}; + use cw20::Cw20ReceiveMsg; + + use astroport::cw20_ics20::TransferMsg; use crate::contract::{execute, migrate, query_channel}; use crate::msg::{ExecuteMsg, MigrateMsg}; - use astroport::cw20_ics20::TransferMsg; - use cosmwasm_std::testing::{mock_env, mock_info}; - use cosmwasm_std::{coins, to_vec, Addr, IbcEndpoint, IbcMsg, IbcTimeout, Timestamp}; - use cw20::Cw20ReceiveMsg; + use crate::test_helpers::*; + + use super::*; #[test] fn check_ack_json() { @@ -586,10 +588,6 @@ mod test { ) } - fn mock_relayer_addr() -> Addr { - Addr::unchecked("relayer") - } - #[test] fn send_receive_cw20() { let send_channel = "channel-9"; @@ -608,7 +606,7 @@ mod test { mock_receive_packet(send_channel, 1876543210, cw20_denom, "local-rcpt", None); // cannot receive this denom yet - let msg = IbcPacketReceiveMsg::new(recv_packet.clone(), mock_relayer_addr()); + let msg = IbcPacketReceiveMsg::new(recv_packet.clone()); let res = ibc_packet_receive(deps.as_mut(), mock_env(), msg).unwrap(); assert!(res.messages.is_empty()); let ack: Ics20Ack = from_binary(&res.acknowledgement).unwrap(); @@ -653,14 +651,14 @@ mod test { assert_eq!(state.total_sent, vec![Amount::cw20(987654321, cw20_addr)]); // cannot receive more than we sent - let msg = IbcPacketReceiveMsg::new(recv_high_packet, mock_relayer_addr()); + let msg = IbcPacketReceiveMsg::new(recv_high_packet); let res = ibc_packet_receive(deps.as_mut(), mock_env(), msg).unwrap(); assert!(res.messages.is_empty()); let ack: Ics20Ack = from_binary(&res.acknowledgement).unwrap(); assert_eq!(ack, no_funds); // we can receive less than we sent - let msg = IbcPacketReceiveMsg::new(recv_packet, mock_relayer_addr()); + let msg = IbcPacketReceiveMsg::new(recv_packet); let res = ibc_packet_receive(deps.as_mut(), mock_env(), msg).unwrap(); assert_eq!(1, res.messages.len()); assert_eq!( @@ -703,7 +701,7 @@ mod test { mock_receive_packet(send_channel, 1876543210, cw20_denom, "local-rcpt", None); // cannot receive this denom yet - let msg = IbcPacketReceiveMsg::new(recv_packet, mock_relayer_addr()); + let msg = IbcPacketReceiveMsg::new(recv_packet); let res = ibc_packet_receive(deps.as_mut(), mock_env(), msg).unwrap(); assert!(res.messages.is_empty()); let ack: Ics20Ack = from_binary(&res.acknowledgement).unwrap(); @@ -748,14 +746,14 @@ mod test { assert_eq!(state.total_sent, vec![Amount::cw20(987654321, cw20_addr)]); // cannot receive more than we sent - let msg = IbcPacketReceiveMsg::new(recv_high_packet, mock_relayer_addr()); + let msg = IbcPacketReceiveMsg::new(recv_high_packet); let res = ibc_packet_receive(deps.as_mut(), mock_env(), msg).unwrap(); assert!(res.messages.is_empty()); let ack: Ics20Ack = from_binary(&res.acknowledgement).unwrap(); assert_eq!(ack, no_funds); // We can receive less than we sent, but if a memo is set without a handler, we fail - let msg = IbcPacketReceiveMsg::new(recv_packet_with_memo, mock_relayer_addr()); + let msg = IbcPacketReceiveMsg::new(recv_packet_with_memo); let res = ibc_packet_receive(deps.as_mut(), mock_env(), msg).unwrap(); // No messages should be sent @@ -784,7 +782,7 @@ mod test { mock_receive_packet(send_channel, 1876543210, denom, "local-rcpt", None); // cannot receive this denom yet - let msg = IbcPacketReceiveMsg::new(recv_packet.clone(), mock_relayer_addr()); + let msg = IbcPacketReceiveMsg::new(recv_packet.clone()); let res = ibc_packet_receive(deps.as_mut(), mock_env(), msg).unwrap(); assert!(res.messages.is_empty()); let ack: Ics20Ack = from_binary(&res.acknowledgement).unwrap(); @@ -807,14 +805,14 @@ mod test { assert_eq!(state.total_sent, vec![Amount::native(987654321, denom)]); // cannot receive more than we sent - let msg = IbcPacketReceiveMsg::new(recv_high_packet, mock_relayer_addr()); + let msg = IbcPacketReceiveMsg::new(recv_high_packet); let res = ibc_packet_receive(deps.as_mut(), mock_env(), msg).unwrap(); assert!(res.messages.is_empty()); let ack: Ics20Ack = from_binary(&res.acknowledgement).unwrap(); assert_eq!(ack, no_funds); // we can receive less than we sent - let msg = IbcPacketReceiveMsg::new(recv_packet, mock_relayer_addr()); + let msg = IbcPacketReceiveMsg::new(recv_packet); let res = ibc_packet_receive(deps.as_mut(), mock_env(), msg).unwrap(); assert_eq!(1, res.messages.len()); assert_eq!( diff --git a/contracts/pair_concentrated_inj/Cargo.toml b/contracts/pair_concentrated_inj/Cargo.toml index a41fed0b8..2832fa854 100644 --- a/contracts/pair_concentrated_inj/Cargo.toml +++ b/contracts/pair_concentrated_inj/Cargo.toml @@ -50,4 +50,4 @@ anyhow = "1.0" derivative = "2.2" astroport-native-coin-registry = { path = "../periphery/native_coin_registry" } injective-math = "0.1" -injective-testing = "0.1" \ No newline at end of file +injective-testing = "0.1.1" diff --git a/contracts/tokenomics/generator/Cargo.toml b/contracts/tokenomics/generator/Cargo.toml index 0abfb4057..adef6cbbc 100644 --- a/contracts/tokenomics/generator/Cargo.toml +++ b/contracts/tokenomics/generator/Cargo.toml @@ -23,7 +23,7 @@ backtraces = ["cosmwasm-std/backtraces"] cw-storage-plus = "0.15" cw1-whitelist = { version = "0.15", features = ["library"] } thiserror = { version = "1.0" } -astroport-governance = { git = "https://github.com/astroport-fi/hidden_astroport_governance", version = "1" } +astroport-governance = { git = "https://github.com/astroport-fi/astroport-governance", version = "1" } protobuf = { version = "2", features = ["with-bytes"] } cosmwasm-std = "1.1" cw2 = "0.15" @@ -33,7 +33,7 @@ cosmwasm-schema = "1.1" cw-utils = "1.0.1" [dev-dependencies] -generator-controller = { git = "https://github.com/astroport-fi/hidden_astroport_governance", branch = "main" } +generator-controller = { git = "https://github.com/astroport-fi/astroport-governance" } astroport-mocks = { path = "../../../packages/astroport_mocks" } astroport-token = { path = "../../token" } astroport-vesting = { path = "../vesting" } @@ -43,9 +43,9 @@ astroport-pair = { path = "../../pair" } astroport-pair-stable = { path = "../../pair_stable" } astroport-whitelist = { path = "../../whitelist" } anyhow = "1" -voting-escrow = { git = "https://github.com/astroport-fi/hidden_astroport_governance", branch = "main" } -voting-escrow-delegation = { git = "https://github.com/astroport-fi/hidden_astroport_governance", branch = "main" } -astroport-nft = { git = "https://github.com/astroport-fi/hidden_astroport_governance", branch = "main" } +voting-escrow = { git = "https://github.com/astroport-fi/astroport-governance" } +voting-escrow-delegation = { git = "https://github.com/astroport-fi/astroport-governance" } +astroport-nft = { git = "https://github.com/astroport-fi/astroport-governance" } cw721-base = { version = "0.15", features = ["library"] } generator-proxy-to-vkr = { git = "https://github.com/astroport-fi/astro-generator-proxy-contracts", branch = "main" } valkyrie = { git = "https://github.com/astroport-fi/valkyrieprotocol", rev = "b5fcb666f17d7e291f40365756e50fc0d7b9bf54" } diff --git a/contracts/tokenomics/maker/Cargo.toml b/contracts/tokenomics/maker/Cargo.toml index bd23ad53e..90f8ed854 100644 --- a/contracts/tokenomics/maker/Cargo.toml +++ b/contracts/tokenomics/maker/Cargo.toml @@ -36,6 +36,6 @@ astroport-factory = { path = "../../factory" } astroport-pair = { path = "../../pair" } cw-multi-test = "0.15" astroport-pair-stable = { path = "../../pair_stable" } -astroport-governance = { git = "https://github.com/astroport-fi/hidden_astroport_governance", branch = "main" } -astroport-escrow-fee-distributor = { git = "https://github.com/astroport-fi/hidden_astroport_governance", branch = "main" } +astroport-governance = { git = "https://github.com/astroport-fi/astroport-governance" } +astroport-escrow-fee-distributor = { git = "https://github.com/astroport-fi/astroport-governance" } astroport-native-coin-registry = { path = "../../periphery/native_coin_registry" }