Skip to content

Commit

Permalink
Global rename
Browse files Browse the repository at this point in the history
  • Loading branch information
tasiov committed Mar 23, 2023
1 parent 6525657 commit 51f5de8
Show file tree
Hide file tree
Showing 71 changed files with 543 additions and 543 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ workflows:
version: 2
test:
jobs:
- contract_infinity_pool
- contract_infinity_swap
- lint
- wasm-build
deploy:
Expand All @@ -16,10 +16,10 @@ workflows:
ignore: /.*/

jobs:
contract_infinity_pool:
contract_infinity_swap:
docker:
- image: rust:1.66.1
working_directory: ~/project/contracts/infinity-pool
working_directory: ~/project/contracts/infinity-swap
steps:
- checkout:
path: ~/project
Expand All @@ -28,7 +28,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-infinity-pool-rust:1.66.1-{{ checksum "~/project/Cargo.lock" }}
- cargocache-infinity-swap-rust:1.66.1-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -50,7 +50,7 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-infinity-pool-rust:1.66.1-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-infinity-swap-rust:1.66.1-{{ checksum "~/project/Cargo.lock" }}

lint:
docker:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/upload-artifact@v3
with:
name: infinity-pool-gas-report-${{ env.GIT_BRANCH }}
name: infinity-swap-gas-report-${{ env.GIT_BRANCH }}
path: test/e2e/gas_report.json
retention-days: 90

Expand All @@ -88,7 +88,7 @@ jobs:
with:
branch: main
workflow: e2e.yml
name: infinity-pool-gas-report-refs-heads-main
name: infinity-swap-gas-report-refs-heads-main

- name: Post gas diff to PR
if: ${{ github.ref != 'refs/heads/main' && steps.download_gas.outputs.found_artifact == 'true' }}
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["contracts/*", "test/*"]
[workspace.package]
version = "0.1.0"
edition = "2021"
repository = "https://github.com/tasiov/infinity-pool"
repository = "https://github.com/tasiov/infinity-swap"
description = "An NFT AMM protocol written for CosmWasm"
license = "BUSL-1.1"

Expand All @@ -26,7 +26,7 @@ sg-marketplace = { git = "https://github.com/public-awesome/marketplace", featur
thiserror = { version = "1.0.31" }
anyhow = "1.0.51"

[profile.release.package.infinity-pool]
[profile.release.package.infinity-swap]
codegen-units = 1
incremental = false

Expand Down
18 changes: 9 additions & 9 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ Business Source License 1.1
License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
"Business Source License" is a trademark of MariaDB Corporation Ab.

-----------------------------------------------------------------------------
---

Parameters

Licensor: Public Awesome
Licensor: Public Awesome

Licensed Work: Infinity Pool V1
Licensed Work: Infinity Swap V1

Additional Use Grant: Any uses listed and defined at
https://github.com/tasiov/infinity-pool/README.md
https://github.com/tasiov/infinity-swap/README.md

Change Date: 2026-01-01
Change Date: 2026-01-01

Change License: GNU General Public License v2.0 or later
Change License: GNU General Public License v2.0 or later

-----------------------------------------------------------------------------
---

Terms

Expand Down Expand Up @@ -66,7 +66,7 @@ MariaDB hereby grants you permission to use this License’s text to license
your works, and to refer to it using the trademark "Business Source License",
as long as you comply with the Covenants of Licensor below.

-----------------------------------------------------------------------------
---

Covenants of Licensor

Expand All @@ -89,7 +89,7 @@ other recipients of the licensed work to be provided by Licensor:

4. Not to modify this License in any other way.

-----------------------------------------------------------------------------
---

Notice

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<img width="896" alt="Screenshot 2023-01-31 at 10 48 07 AM" src="https://user-images.githubusercontent.com/6496257/215808478-7e9ef4f4-edaf-47d6-afc4-baadda383e59.png">

# Infinity Pool - NFT AMM
# Infinity Swap

[![CircleCI](https://circleci.com/gh/tasiov/infinity-pool/tree/main.svg?style=svg)](https://circleci.com/gh/tasiov/infinity-pool/tree/main)
[![CircleCI](https://circleci.com/gh/tasiov/infinity-swap/tree/main.svg?style=svg)](https://circleci.com/gh/tasiov/infinity-swap/tree/main)

## WARNING: NOT FOR COMMERCIAL USE

This repo is under a business source license simliar to Uniswap V3. This means it is **not available** under an open source license for a period of time. Please see [LICENSE](LICENSE) for full details.

## DISCLAIMER

INFINITY POOL IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. No developer or entity involved in creating or instantiating Infinity Pool smart contracts will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of Infinity Pool, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.
INFINITY SWAP IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. No developer or entity involved in creating or instantiating Infinity Swap smart contracts will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of Infinity Swap, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.

---

## Overview

Infinity Pool is an automated market maker (AMM) protocol that allows for the buying and selling of NFT assets with a specified fungible token. The buy and sell price of the NFT assets are determined by the parameters of the pool, the bonding curve, and the assets custodied by the pool.
Infinity Swap is an automated market maker (AMM) protocol that allows for the buying and selling of NFT assets with a specified fungible token. The buy and sell price of the NFT assets are determined by the parameters of the pool, the bonding curve, and the assets custodied by the pool.

Infinity Pool makes use of an NFT AMM design, but is written for [CosmWasm](https://github.com/CosmWasm/cosmwasm) so that it may be used on Cosmos SDK based chains.
Infinity Swap makes use of an NFT AMM design, but is written for [CosmWasm](https://github.com/CosmWasm/cosmwasm) so that it may be used on Cosmos SDK based chains.

## Features

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "infinity-pool"
name = "infinity-swap"
version = { workspace = true }
edition = { workspace = true }
repository = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use cosmwasm_schema::{export_schema, remove_schemas, schema_for};
use cosmwasm_std::Uint128;
use infinity_pool::msg::{
use infinity_swap::msg::{
ConfigResponse, ExecuteMsg, InstantiateMsg, NftSwap, PoolNftSwap, PoolQuoteResponse,
PoolsByIdResponse, PoolsResponse, QueryMsg, QueryOptions, SwapParams, SwapResponse,
};
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use cw2::set_contract_version;
use cw_utils::maybe_addr;
use sg_std::Response;

pub const CONTRACT_NAME: &str = "crates.io:infinity-pool";
pub const CONTRACT_NAME: &str = "crates.io:infinity-swap";
pub const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");

#[cfg_attr(not(feature = "library"), entry_point)]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository = { workspace = true }
license = { workspace = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
infinity-pool = { path = "../../contracts/infinity-pool" }
infinity-swap = { path = "../../contracts/infinity-swap" }
sg-marketplace = { git = "https://github.com/public-awesome/marketplace", features = ["library"] }
cosmwasm-std = { workspace = true }
cw-utils = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/src/helpers/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::time::Duration;
use test_context::TestContext;

use super::instantiate::{
instantiate_base_factory, instantiate_infinity_pools, instantiate_marketplace,
instantiate_base_factory, instantiate_infinity_swap, instantiate_marketplace,
};

static CONFIG: OnceCell<Cfg> = OnceCell::new();
Expand Down Expand Up @@ -135,5 +135,5 @@ fn save_gas_report(orc: &CosmOrc<CosmosgRPC>, gas_report_dir: &str) {
fn prep_base_contracts(orc: &mut CosmOrc<CosmosgRPC>, creator: &SigningAccount, denom: &str) {
instantiate_base_factory(orc, creator, denom).unwrap();
instantiate_marketplace(orc, creator).unwrap();
instantiate_infinity_pools(orc, denom, creator).unwrap();
instantiate_infinity_swap(orc, denom, creator).unwrap();
}
2 changes: 1 addition & 1 deletion test/e2e/src/helpers/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pub const BASE_FACTORY_NAME: &str = "base_factory";
pub const VENDING_MINTER_NAME: &str = "vending_minter";
pub const VENDING_FACTORY_NAME: &str = "vending_factory";
pub const MARKETPLACE_NAME: &str = "sg_marketplace";
pub const INFINITY_POOL_NAME: &str = "infinity_pool";
pub const INFINITY_SWAP_NAME: &str = "infinity_swap";

pub const MAX_TOKENS: u32 = 10_000;
pub const CREATION_FEE: u128 = 1_200_000;
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/src/helpers/fixtures.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use cosmwasm_std::Uint128;
use infinity_pool::msg::ExecuteMsg;
use infinity_pool::state::BondingCurve;
use infinity_swap::msg::ExecuteMsg;
use infinity_swap::state::BondingCurve;

pub fn get_pool_fixtures(
collection: &str,
Expand Down
10 changes: 5 additions & 5 deletions test/e2e/src/helpers/instantiate.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::chain::SigningAccount;
use super::constants::{
BASE_FACTORY_NAME, BASE_MINTER_NAME, CREATION_FEE, INFINITY_POOL_NAME, LISTING_FEE,
BASE_FACTORY_NAME, BASE_MINTER_NAME, CREATION_FEE, INFINITY_SWAP_NAME, LISTING_FEE,
MARKETPLACE_NAME, MINT_PRICE, SG721_NAME,
};
use base_factory::msg::ExecuteMsg as BaseFactoryExecuteMsg;
Expand All @@ -13,7 +13,7 @@ use cosm_orc::orchestrator::{
};
use cosmwasm_std::{Coin, Empty, Uint128};
use cw_utils::Duration;
use infinity_pool::msg::InstantiateMsg as PoolInstantiateMsg;
use infinity_swap::msg::InstantiateMsg as PoolInstantiateMsg;
use sg2::msg::{CollectionParams, CreateMinterMsg};
use sg721::CollectionInfo;
use sg_marketplace::msg::InstantiateMsg as MarketplaceInstantiateMsg;
Expand Down Expand Up @@ -143,14 +143,14 @@ pub fn instantiate_marketplace(
)
}

pub fn instantiate_infinity_pools(
pub fn instantiate_infinity_swap(
orc: &mut CosmOrc<CosmosgRPC>,
denom: &str,
user: &SigningAccount,
) -> Result<InstantiateResponse, ProcessError> {
orc.instantiate(
INFINITY_POOL_NAME,
&format!("{}_inst", INFINITY_POOL_NAME),
INFINITY_SWAP_NAME,
&format!("{}_inst", INFINITY_SWAP_NAME),
&PoolInstantiateMsg {
denom: denom.to_string(),
marketplace_addr: orc.contract_map.address(MARKETPLACE_NAME)?,
Expand Down
20 changes: 10 additions & 10 deletions test/e2e/src/helpers/pool.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
use super::chain::Chain;
use super::constants::{INFINITY_POOL_NAME, LISTING_FEE, SG721_NAME};
use super::constants::{INFINITY_SWAP_NAME, LISTING_FEE, SG721_NAME};
use super::fixtures::get_pool_fixtures;
use crate::helpers::nft::{approve_all_nfts, mint_nfts};
use cosm_orc::orchestrator::Coin as OrcCoin;
use cosm_orc::orchestrator::ExecResponse;
use cosm_orc::orchestrator::{ExecReq, SigningKey};
use infinity_pool::msg::{
use infinity_swap::msg::{
ExecuteMsg as InfinityPoolExecuteMsg, PoolsByIdResponse, QueryMsg as InfinityPoolQueryMsg,
};
use infinity_pool::state::Pool;
use infinity_swap::state::Pool;
use serde::Deserialize;

pub fn pool_execute_message(
Expand All @@ -19,7 +19,7 @@ pub fn pool_execute_message(
user: &SigningKey,
) -> ExecResponse {
let reqs = vec![ExecReq {
contract_name: INFINITY_POOL_NAME.to_string(),
contract_name: INFINITY_SWAP_NAME.to_string(),
msg: Box::new(execute_msg),
funds,
}];
Expand All @@ -33,7 +33,7 @@ pub fn pool_query_message<T: for<'a> Deserialize<'a>>(
) -> T {
chain
.orc
.query(INFINITY_POOL_NAME, &query_msg)
.query(INFINITY_SWAP_NAME, &query_msg)
.unwrap()
.data()
.unwrap()
Expand All @@ -53,14 +53,14 @@ pub fn create_active_pool(

approve_all_nfts(
chain,
chain.orc.contract_map.address(INFINITY_POOL_NAME).unwrap(),
chain.orc.contract_map.address(INFINITY_SWAP_NAME).unwrap(),
user,
);

let resp = pool_execute_message(
chain,
create_pool_msg,
"infinity-pool-create-pool",
"infinity-swap-create-pool",
vec![OrcCoin {
amount: LISTING_FEE,
denom: denom.parse().unwrap(),
Expand Down Expand Up @@ -88,7 +88,7 @@ pub fn create_active_pool(
collection,
nft_token_ids: token_ids,
},
"infinity-pool-deposit-nfts",
"infinity-swap-deposit-nfts",
vec![],
user,
);
Expand All @@ -98,7 +98,7 @@ pub fn create_active_pool(
pool_execute_message(
chain,
InfinityPoolExecuteMsg::DepositTokens { pool_id },
"infinity-pool-deposit-tokens",
"infinity-swap-deposit-tokens",
vec![OrcCoin {
amount: pool_deposit_amount,
denom: denom.parse().unwrap(),
Expand All @@ -113,7 +113,7 @@ pub fn create_active_pool(
is_active: true,
pool_id,
},
"infinity-pool-activate",
"infinity-swap-activate",
vec![],
user,
);
Expand Down
Loading

0 comments on commit 51f5de8

Please sign in to comment.