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

Ignition #1

Closed
wants to merge 226 commits into from
Closed
Show file tree
Hide file tree
Changes from 177 commits
Commits
Show all changes
226 commits
Select commit Hold shift + click to select a range
0503227
setup workspace
0xOmarA Dec 1, 2023
8297f6c
Add a test workflow
0xOmarA Dec 1, 2023
3b13ee6
Add flashing capabilities for the Dex packages
0xOmarA Dec 1, 2023
35ea66e
Add a rust-toolchain file pinning to stable
0xOmarA Dec 4, 2023
b294fdb
Initial commit of adapters crate
0xOmarA Dec 4, 2023
161ff14
Add description to unit tests crate
0xOmarA Dec 4, 2023
ba12b17
Make adapter stubs SBORable
0xOmarA Dec 4, 2023
105120c
Cleanup adapters and add a pool adapter
0xOmarA Dec 4, 2023
eb6f1ec
Limit adapters to just method calls - they're always stateful.
0xOmarA Dec 4, 2023
c2e5085
Add formatting configuration
0xOmarA Dec 4, 2023
a630251
Initial commit of the olympus protocol
0xOmarA Dec 4, 2023
030284d
Add the ability to withdraw pool units
0xOmarA Dec 5, 2023
c455c12
Add logic for controlling the rewards rates
0xOmarA Dec 5, 2023
a079795
Added an `instantiate` function.
0xOmarA Dec 5, 2023
b330a51
Store USD address in component state
0xOmarA Dec 5, 2023
78bcb83
Add metadata to LP position
0xOmarA Dec 5, 2023
ba4d013
Rename: `rate` => `rewards_rate`
0xOmarA Dec 5, 2023
67b3e07
Add package loader and auth tests
0xOmarA Dec 5, 2023
c0c1f36
Allow too many arguments
0xOmarA Dec 6, 2023
5b53fad
Create wrapped assets in test env
0xOmarA Dec 6, 2023
118f9d0
pre-compile blueprints in Ci tests
0xOmarA Dec 6, 2023
60f4d25
Add protocol tests
0xOmarA Dec 6, 2023
d53886a
Rename "adapters" crate to "adapters-interface"
0xOmarA Dec 6, 2023
ccbf86f
Update state flashing
0xOmarA Dec 7, 2023
f68bf8e
initial ociswap adapter
0xOmarA Dec 8, 2023
8d0d45d
Add .idea to gitignore
0xOmarA Dec 18, 2023
b66966b
Ociswap adapter
0xOmarA Dec 18, 2023
16ce075
Add oracle price staleness as a protocol parameter
0xOmarA Dec 18, 2023
1af2090
Minor rename
0xOmarA Dec 18, 2023
0c196ac
Add a `get_price` method with staleness checks
0xOmarA Dec 18, 2023
f7a2b03
Add a `Percent` type which is a bounded decimal.
0xOmarA Dec 18, 2023
89ebc6c
Add logic for maximum allowed price difference.
0xOmarA Dec 18, 2023
7bf71f6
Move types to a new module
0xOmarA Dec 19, 2023
fad0471
Add flow for opening liquidity positions
0xOmarA Dec 19, 2023
1041cc7
add a WASM target
0xOmarA Jan 1, 2024
df1b958
fix tests
0xOmarA Jan 1, 2024
92a5f95
Update Olympus instantiation flows in tests
0xOmarA Jan 1, 2024
e8ab9fa
Replace scripts with `cargo make`
0xOmarA Jan 1, 2024
8cf6f90
Add a flow for creating a test environment with badges.
0xOmarA Jan 1, 2024
a23f483
Ociswap test bindings
0xOmarA Jan 1, 2024
6b5ba9e
Add a lockup period type.
0xOmarA Jan 1, 2024
5292324
Add a first Ociswap contribution test
0xOmarA Jan 2, 2024
813cf91
Delete diagrams directory
0xOmarA Jan 2, 2024
4b68ed5
Add test bindings generation for adapter interface
0xOmarA Jan 2, 2024
420c99c
Add test bindings generation for adapter interface
0xOmarA Jan 2, 2024
3a1012a
Small reorg
0xOmarA Jan 2, 2024
1480e01
Add a `blueprint_with_traits` macro.
0xOmarA Jan 2, 2024
893aea5
Add a `define_interface` macro for defining traits, scrypto stubs,
0xOmarA Jan 2, 2024
1c9bd86
Add a re-export to scrypto-interface
0xOmarA Jan 2, 2024
8afb5ff
Use `scrypto-interface` in adapters interface
0xOmarA Jan 2, 2024
37a0231
Implement oracle interface through `scrypto-interface`
0xOmarA Jan 2, 2024
9e19e96
Make interface traits `Sized` and make use of the struct name alias
0xOmarA Jan 2, 2024
e0058d6
Use `scrypto-interface` for the Ociswap adapter
0xOmarA Jan 2, 2024
81064ee
Use `scrypto-interface` types in the core Olympus protocol
0xOmarA Jan 2, 2024
261e18a
Add conversions to Scrypto interface
0xOmarA Jan 2, 2024
fe218ab
Minor olympus change
0xOmarA Jan 2, 2024
65c9793
Move all of the blueprints to the new interface system
0xOmarA Jan 2, 2024
40a66e7
re organize blueprints
0xOmarA Jan 2, 2024
8f7b240
Update testing environment
0xOmarA Jan 2, 2024
f759ef7
Reorganize crates
0xOmarA Jan 3, 2024
d5bece9
Expand on ociswap's open position test
0xOmarA Jan 3, 2024
1822931
Add test: can't open a liquidity position when opening is disabled
0xOmarA Jan 3, 2024
1fb6a3f
Add error checking functions to unit tests
0xOmarA Jan 3, 2024
d9acc9a
Additional protocol tests and use of error checking functions.
0xOmarA Jan 3, 2024
61309c8
More tests for protocol logic for opening liquidity positions
0xOmarA Jan 3, 2024
ecbd0b1
Store the pool state after the contribution in the LP NFT
0xOmarA Jan 3, 2024
4b25f00
Minor changes
0xOmarA Jan 3, 2024
61bfafb
Add WASM target in CI
0xOmarA Jan 3, 2024
0cd076d
First implementation of a CaviarSwap adapter
0xOmarA Jan 4, 2024
4142513
New algorithm for selection of bins in CaviarNine
0xOmarA Jan 5, 2024
97bdc2f
Minor syntax change
0xOmarA Jan 5, 2024
e17051a
Minor reorg
0xOmarA Jan 8, 2024
74ac1a4
Make calculation of fees an adapter responsibility.
0xOmarA Jan 8, 2024
3cf0af5
Add a methdo to the pool interface for fetching the price
0xOmarA Jan 8, 2024
6d162e6
Update contribution logic with new price difference math
0xOmarA Jan 9, 2024
a3dace8
Remove the `Percent` type
0xOmarA Jan 9, 2024
a8bfe1e
Add fee estimation logic for ociswap
0xOmarA Jan 9, 2024
929fe93
Rename to ignition
0xOmarA Jan 9, 2024
fcde001
Disallow contributions to pools where XRD is not on one side
0xOmarA Jan 10, 2024
febd024
Add logic for closing LP
0xOmarA Jan 10, 2024
1924ca9
clean slate
0xOmarA Jan 10, 2024
1a0ed57
[Scrypto Interface]: Add types and declarative macros needed.
0xOmarA Jan 10, 2024
204a676
[Scrypto Interface]: Add proc macros and handler signatures
0xOmarA Jan 10, 2024
31abc85
[Scrypto Interface]: Add a `blueprint_with_traits` macro
0xOmarA Jan 10, 2024
68c7636
[Scrypto Interface]: Add a `define_interface` macro
0xOmarA Jan 10, 2024
585c9db
[Scrypto Interface]: Add doc comments to macros
0xOmarA Jan 10, 2024
3825f67
[Scrypto Interface]: Add a README file to `scrypto-interface` crate
0xOmarA Jan 10, 2024
00b6e14
[Scrypto Interface]: Remove notice from the README file
0xOmarA Jan 10, 2024
f38bba2
[Misc]: Add a wrapping width in vscode settings
0xOmarA Jan 10, 2024
7dde2c3
[Scrypto Interface]: Minor corrections to README
0xOmarA Jan 10, 2024
a8b1a18
[Adapter Interface]: Initial commit & `Price` type
0xOmarA Jan 10, 2024
78f6526
[Adapters Interface]: Add the interface of the oracle adapter
0xOmarA Jan 11, 2024
bf33452
[Scrypto Interface]: Do not keep argument attributes in quote
0xOmarA Jan 11, 2024
b20c3fc
[Adapters Interface]: Add a pool interface.
0xOmarA Jan 11, 2024
5f15e83
[Ociswap Adapter V1]: Implement a simple Ociswap adapter
0xOmarA Jan 11, 2024
ac9be21
[Ociswap Adapter V1]: Move interface to new module
0xOmarA Jan 11, 2024
7aace61
[Ociswap Adapter V1]: Return the information of the close LP
0xOmarA Jan 11, 2024
74a1185
[Caviarnine Adapter V1]: Initial implementation of adapter
0xOmarA Jan 11, 2024
0454555
[CaviarNine Adapter V1]: Use constant strings for errors.
0xOmarA Jan 11, 2024
b65ffda
[Ociswap Adapter V1]: Use constant strings for errors.
0xOmarA Jan 11, 2024
ef85e4c
[Ignition]: Initial commit
0xOmarA Jan 11, 2024
b680344
[Ignition]: Update doc comment
0xOmarA Jan 11, 2024
318558c
[Ignition]: Define initial state.
0xOmarA Jan 11, 2024
f2e250c
[Ignition]: Add setters for all of the state
0xOmarA Jan 11, 2024
68e9ec9
[Ignition]: Add an instantiation function.
0xOmarA Jan 11, 2024
b20e191
[Adapter Interface]: Add tests for price exchange calculations.
0xOmarA Jan 11, 2024
d2ca791
[Ignition]: Add flow for opening liquidity positions
0xOmarA Jan 11, 2024
92c7773
[Ignition]: Add the pool's address to the liquidity receipt.
0xOmarA Jan 11, 2024
943d598
[Ignition]: Implement logic for closing liquidity positions.
0xOmarA Jan 12, 2024
67997ba
[Ignition]: Add a package loader
0xOmarA Jan 12, 2024
16ebb88
[Package Loader]: Fix path issue
0xOmarA Jan 12, 2024
1f0036c
[Package Loader]: Do not enable `build-time-blueprints` by default.
0xOmarA Jan 12, 2024
e9d696e
[Package Loader]: Fix the path to use at runtime
0xOmarA Jan 12, 2024
71f1b56
[CI]: Remove old un-needed feature.
0xOmarA Jan 13, 2024
493db56
[Scrypto Interface]: Do not give warnings for too many arguments.
0xOmarA Jan 13, 2024
e564ccc
[Caviarnine Adapter V1]: Support manifest builder stubs.
0xOmarA Jan 13, 2024
f9ad098
[Test Oracle]: Add a package for a simple test oracle.
0xOmarA Jan 13, 2024
bb9e9e4
[Scrypto Interface]: Use struct name as prefix for manifest builder e…
0xOmarA Jan 13, 2024
25076dd
[Caviarnine Adapter V1]: Add an instantiation function.
0xOmarA Jan 13, 2024
26dc863
[Ociswap Adapter V1]: Add an instantiation function.
0xOmarA Jan 13, 2024
78884dc
[Bootstrapper]: Add a bootstrap blueprint and code
0xOmarA Jan 13, 2024
bea1780
[Frontend]: Initial Commit
0xOmarA Jan 13, 2024
bd49aa6
[Bootstrapper] Minor Improvements & Build Script
0xOmarA Jan 13, 2024
1c3df15
[Frontend]: Move to a typescript react template
0xOmarA Jan 13, 2024
c169d3b
[Ignition]: Calculate upfront reward from the amount actually contrib…
0xOmarA Jan 14, 2024
ad1ee9f
[Caviarnine Adapter v1]: Use 50 bins instead of 99.
0xOmarA Jan 14, 2024
f0a9bc9
[Bootstrap]: Create a dApp definition from the bootstrap process.
0xOmarA Jan 14, 2024
fc40104
[Test Oracle]: Allow for batch setting of the prices.
0xOmarA Jan 14, 2024
2159626
[Bootstrap]: Various improvement to the bootstrap process
0xOmarA Jan 15, 2024
0f3ba4d
[Bootstrapper]: Allow outputting of multiple config files.
0xOmarA Jan 15, 2024
2355ac5
[Frontend]: Implement a simple testing frontend.
0xOmarA Jan 15, 2024
ea546e7
[Frontend]: Publish to github pages.
0xOmarA Jan 15, 2024
3ae2e1c
[Frontend]: Fix the network calls
0xOmarA Jan 15, 2024
421ff83
[Frontend]: Update positions when transaction goes through.
0xOmarA Jan 15, 2024
0e400b1
[Simple Oracle]: Rename from `TestOracle` to `SimpleOracle`.
0xOmarA Jan 16, 2024
2fda924
[Testing]: Create the environment to use for tests.
0xOmarA Jan 16, 2024
9d7943d
[Tests]: Additional tests + package-loader build-time logic.
0xOmarA Jan 17, 2024
c979f6e
[Tests]: Small rename
0xOmarA Jan 17, 2024
87ebfdf
[Bootstrapper]: Use package-loader build time blueprints.
0xOmarA Jan 17, 2024
07e808b
[Testing]: Add additional error test cases
0xOmarA Jan 17, 2024
c15c98f
[Misc]: Update the scrypto version used.
0xOmarA Jan 20, 2024
6e501b5
[Ignition]: Split protocol reserves to volatile and non-volatile.
0xOmarA Jan 21, 2024
5b5dd3f
Remove unneeded import
0xOmarA Jan 21, 2024
9339279
[Testing]: Closing of liquidity position
0xOmarA Jan 21, 2024
11040c6
[Testing]: Additional tests for closing liquidity position.
0xOmarA Jan 21, 2024
841c831
[Testing]: Closure of liquidity position
0xOmarA Jan 22, 2024
43f1cfc
[Testing]: Ociswap reported price
0xOmarA Jan 22, 2024
0208795
[Ignition]: Allow dexes to brand their liquidity receipts.
0xOmarA Jan 22, 2024
783b60e
[Testing]: Add some costing tests
0xOmarA Jan 22, 2024
b395376
[Bootstrapping]: Add a cheaper bootstrapping process.
0xOmarA Jan 22, 2024
9e88a73
[Bootstrapping]: Add manifest sbor types for initialization.
0xOmarA Jan 22, 2024
87d9cac
[Misc]: Minor changes.
0xOmarA Jan 23, 2024
5f7edc8
[Testing]: Add tests for order of buckets.
0xOmarA Jan 23, 2024
09843de
[Ignition]: Allow for adapter specific data passed by the adapter whe…
0xOmarA Jan 23, 2024
381d498
[Testing]: Add Ociswap fees and some non-strict tests for fees.
0xOmarA Jan 23, 2024
e6f1cc1
[Caviarnine Adapter V1]: Initial Readme
0xOmarA Jan 24, 2024
a6086f1
[Caviarnine Adapter V1]: Document some cases on price increase
0xOmarA Jan 24, 2024
02dc890
[Caviarnine Adapter V1]: Document some initial thinking on fees.
0xOmarA Jan 25, 2024
6640473
[Caviarnine Adapter V1]: Persist the bins contributed to in the recei…
0xOmarA Jan 25, 2024
1e0c101
[Misc]: Add `.bkp` to gitignore.
0xOmarA Jan 25, 2024
89b00b0
[Gateway Client]: Add a gateway client.
0xOmarA Jan 25, 2024
6b55eeb
[Caviarnine Adapter V1]: Store the reserves and contributions in the …
0xOmarA Jan 25, 2024
1a44405
[Caviarnine Adapter V1]: WIP calculation of fees.
0xOmarA Jan 26, 2024
b569559
[Caviarnine Adapter v1]: Rough fee estimation.
0xOmarA Jan 27, 2024
174ab4f
[Caviarnine Adapter v1]: Small rename
0xOmarA Jan 29, 2024
25b9791
[Gateway Client]: Add some additional types.
0xOmarA Jan 29, 2024
a1e8e24
[Ignition]: Add a manifest SBOR type.
0xOmarA Jan 29, 2024
d10cc99
[Bootstrapping]: Add a new bootstrapping tool.
0xOmarA Jan 30, 2024
016a3f2
[Caviarnine Adapter v1]: Use a 300 bin span.
0xOmarA Jan 30, 2024
a286ba1
[Bootstrap]: Load private key from environment variable.
0xOmarA Jan 30, 2024
11ed7fc
[Bootstrap]: Add bootstrapping for mainnet.
0xOmarA Jan 30, 2024
03d74bb
[Bootstrap]: Improve the bootstrap process.
0xOmarA Jan 30, 2024
cbda55e
Add a minting utility to the UI
0xOmarA Jan 30, 2024
ae73940
[Diagrams]: Update diagrams to use "Tick" instead of "Bin"
0xOmarA Feb 1, 2024
874de55
[Simple Oracle]: Update to use types + registered types.
0xOmarA Feb 1, 2024
d4cd031
[Caviarnine Adapter v1]: Add a better way to estimate fees.
0xOmarA Feb 1, 2024
d4a0a33
[Ignition]: Remove the idea of exchange specific nft data
0xOmarA Feb 1, 2024
02b153b
[Ignition]: Minor changes.
0xOmarA Feb 7, 2024
6a1b488
[Caviarnine Adapter v1]: Optimize fees.
0xOmarA Feb 7, 2024
0b5fa78
[Caviarnine Adapter v1]: Optimize fees.
0xOmarA Feb 8, 2024
9af47ea
[Ignition]: Make the protocol manager updatable by owner.
0xOmarA Feb 8, 2024
7c13c6b
[Ignition]: switch unsafe math from error to warning.
0xOmarA Feb 8, 2024
cf20c39
[Adapters Interface]: Use `ScryptoValue` for the `AnyValue` type.
0xOmarA Feb 8, 2024
79f6d37
[Ignition]: Add a test for reciprocal price.
0xOmarA Feb 8, 2024
b93be6d
[Ignition]: Make the `LockupPeriod` API fallible.
0xOmarA Feb 9, 2024
9cb9e03
[Ignition]: Improve `check_pool_resources`.
0xOmarA Feb 9, 2024
9cdad49
[Ports Interface]: Rename from `adapters-interface`.
0xOmarA Feb 9, 2024
ff1480c
[Ignition]: Use checked math.
0xOmarA Feb 9, 2024
768ecf4
[Misc]: Add version of DEX package to name
0xOmarA Feb 9, 2024
e286052
[Ociswap v2 Adapter v1]: Add an adapter for ociswap v2
0xOmarA Feb 9, 2024
b6d34fe
[Tests]: Publish ociswap v2 and create pools with the test environmen…
0xOmarA Feb 9, 2024
13dbfd5
[Tests]: Add tests for Ociswap v2.
0xOmarA Feb 10, 2024
78591f0
[Ignition]: Add a comment on state explosion.
0xOmarA Feb 14, 2024
8198664
[Ignition]: Add a forced liquidation feature.
0xOmarA Feb 14, 2024
93ce873
[Ociswap v2 Adapter v1]: Calculate the active tick from the price.
0xOmarA Feb 14, 2024
05a1066
[Tests]: Add a test for oracle price cutoffs in closing position.
0xOmarA Feb 14, 2024
92ba312
[Tests]: Additional exchange specific tests.
0xOmarA Feb 14, 2024
9ae68d5
[Caviarnine v1 Adapter v1]: Comments.
0xOmarA Feb 14, 2024
57a6b23
[Ignition]: Add comments
0xOmarA Feb 15, 2024
794a18c
[Adapters]: Switch from using a pool function to a pool macro.
0xOmarA Feb 15, 2024
791dd20
[Caviarnine v1 Adapter v1]: Naming and comments around ticks and bins.
0xOmarA Feb 15, 2024
49c13a2
[Caviarnine v1 Adapter v1]: Some tick and bin renaming.
0xOmarA Feb 15, 2024
891c2f1
[Caviarnine v1 Adapter v1]: Renames
0xOmarA Feb 15, 2024
3738fb2
[Caviarnine v1 Adapter v1]: Rename bin selector to tick selector
0xOmarA Feb 15, 2024
770e0f7
[Caviarnine v1 Adapter v1]: Tick selector todo comment.
0xOmarA Feb 15, 2024
7c93b38
[Caviarnine v1 Adapter v1]: Rename variables with clearer name.
0xOmarA Feb 15, 2024
793d834
[Caviarnine v1 Adapter v1]: Construct an `IndexMap` of buckets later …
0xOmarA Feb 16, 2024
5491ec1
[Caviarnine v1]: Additional stateful tests.
0xOmarA Feb 16, 2024
6569c6e
[Ignition]: Reorganize crates & add method for getting structured liq…
0xOmarA Feb 19, 2024
df0f06b
[Ignition]: Update for latest deployment.
0xOmarA Feb 19, 2024
00a49f8
[Simple Oracle]: Return a `Decimal` instead of `Price`.
0xOmarA Feb 19, 2024
da8fc07
[Caviarnine v1 Adapter v1]: Rename `cache_pool_information` to `prelo…
0xOmarA Feb 19, 2024
c14ea1e
[Ignition]: Add lint for unsafe math usage.
0xOmarA Feb 19, 2024
63b9426
[Tests]: Better fee tests
0xOmarA Feb 20, 2024
838a9f9
[Ignition]: Cache the pool's resource addresses
0xOmarA Feb 20, 2024
89967e7
[Ignition]: Simplify the change logic when opening a liquidity position.
0xOmarA Feb 20, 2024
2e2f167
[Caviarnine v1 Adapter v1]: Calculate the active tick from the price.
0xOmarA Feb 20, 2024
b1aa045
[Ignition]: Use `unwrap_or_else` for address reservations.
0xOmarA Feb 20, 2024
59a7a50
[Caviarnine v1 Adapter v1]: Use a more fee-efficient calculation.
0xOmarA Feb 20, 2024
2d3ddc4
[Ociswap v2 Adapter v1]: Add a comment on the active tick math
0xOmarA Feb 21, 2024
567f1de
[Ignition]: Remove `unwrap_or_default` from price difference math
0xOmarA Feb 21, 2024
b67d86b
[Tests]: Test that positions opened against Ociswap v2 can be closed …
0xOmarA Feb 21, 2024
013f82d
[Caviarnine v1 Adapter v1]: Small comment change
0xOmarA Feb 21, 2024
23ad897
[Caviarnine v1 Adapter v1]: Add a comment on some of the math in
0xOmarA Feb 22, 2024
9766bf3
[Ociswap v2 Adapter v1]: Minor changes.
0xOmarA Feb 22, 2024
cfaa88d
[Caviarnine v1 Adapter v1]: Renames and formatting.
0xOmarA Feb 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
92 changes: 92 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Test
on:
pull_request:
push:
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Add WASM target
run: rustup target add wasm32-unknown-unknown
- name: Install cargo nextest
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-nextest
locked: true
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
0xOmarA marked this conversation as resolved.
Show resolved Hide resolved
- name: Run tests
run: cargo nextest run
env:
# Enable sccache
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt
- name: Add WASM target
run: rustup target add wasm32-unknown-unknown
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Check formatting
run: cargo fmt --check
env:
# Enable sccache
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
cargo-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- name: Add WASM target
run: rustup target add wasm32-unknown-unknown
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Cargo Check
run: cargo check --all
env:
# Enable sccache
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
clippy-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Add WASM target
run: rustup target add wasm32-unknown-unknown
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Clippy Check
run: cargo clippy --all
env:
# Enable sccache
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
target
Cargo.lock
.idea
*.bkp
17 changes: 17 additions & 0 deletions .vscode/rust.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"Scrypto TestEnvironment Test": {
"prefix": ["ig-test"],
"body": [
"#[test]",
"fn ${0:test_name}() -> Result<(), RuntimeError> {",
"\t// Arrange",
"\tlet Environment { environment: ref mut env, protocol, resources, ociswap, caviarnine } = Environment::new()?;",
"\t// Act",
"\t// Assert",
"",
"\tOk(())",
"}"
],
"description": "The boilderplate code of a simple ignition test."
}
}
17 changes: 16 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
{
"editor.rulers": [80]
"editor.rulers": [
80
],
"[markdown]": {
"editor.wordWrap": "bounded",
"editor.wordWrapColumn": 80
},
"cSpell.words": [
"caviarnine",
"coffieicnet",
"humantime",
"ociswap",
"OLYPS",
"ruid",
"uninit"
],
}
46 changes: 46 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[workspace]
resolver = "2"
members = [
# Packages
"packages/ignition",
"packages/simple-oracle",
"packages/ociswap-adapter-v1",
"packages/caviarnine-adapter-v1",
# Libraries
"libraries/package-loader",
"libraries/gateway-client",
"libraries/scrypto-interface",
"libraries/adapters-interface",
# Tools
"tools/bootstrap",
# Tests
"tests"
]

[workspace.package]
version = "0.1.0"
edition = "2021"
description = "The implementation of project Ignition in Scrypto for the Radix Ledger"

[workspace.dependencies]
sbor = { git = "https://github.com/radixdlt/radixdlt-scrypto", rev = "ef169b1e1348b8dbad977ba81d086ee1e80d6ff8" }
scrypto = { git = "https://github.com/radixdlt/radixdlt-scrypto", rev = "ef169b1e1348b8dbad977ba81d086ee1e80d6ff8" }
transaction = { git = "https://github.com/radixdlt/radixdlt-scrypto", rev = "ef169b1e1348b8dbad977ba81d086ee1e80d6ff8" }
radix-engine = { git = "https://github.com/radixdlt/radixdlt-scrypto", rev = "ef169b1e1348b8dbad977ba81d086ee1e80d6ff8" }
radix-engine-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", rev = "ef169b1e1348b8dbad977ba81d086ee1e80d6ff8" }
radix-engine-stores = { git = "https://github.com/radixdlt/radixdlt-scrypto", rev = "ef169b1e1348b8dbad977ba81d086ee1e80d6ff8" }
radix-engine-derive = { git = "https://github.com/radixdlt/radixdlt-scrypto", rev = "ef169b1e1348b8dbad977ba81d086ee1e80d6ff8" }
radix-engine-queries = { git = "https://github.com/radixdlt/radixdlt-scrypto", rev = "ef169b1e1348b8dbad977ba81d086ee1e80d6ff8" }
radix-engine-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", rev = "ef169b1e1348b8dbad977ba81d086ee1e80d6ff8" }
radix-engine-store-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", rev = "ef169b1e1348b8dbad977ba81d086ee1e80d6ff8" }

scrypto-unit = { git = "https://github.com/radixdlt/radixdlt-scrypto", rev = "ef169b1e1348b8dbad977ba81d086ee1e80d6ff8" }
scrypto-test = { git = "https://github.com/radixdlt/radixdlt-scrypto", rev = "ef169b1e1348b8dbad977ba81d086ee1e80d6ff8" }

[profile.release]
opt-level = 'z'
lto = true
codegen-units = 1
panic = 'abort'
strip = true
overflow-checks = true
41 changes: 41 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[config]
default_to_workspace = false

[tasks.test]
command = "cargo"
args = [
"nextest",
"run",
"--features",
"package-loader/build-time-blueprints",
"--no-fail-fast",
]

[tasks.check]
install_crate = "clippy"
command = "cargo"
args = ["clippy", "--all"]

[tasks.format]
install_crate = "rustfmt"
command = "cargo"
args = ["fmt"]

[tasks.fmt]
alias = "format"

[tasks.publish-stokenet]
command = "cargo"
args = [
"run",
"--package",
"bootstrapper",
"--",
"publish-test-to-stokenet",
"./frontend/public/config.json",
"./frontend/src/config.json",
]

[tasks.frontend-start]
command = "npm"
args = ["start", "--prefix", "./frontend"]
Empty file removed blueprints/.keep
Empty file.
Empty file removed diagrams/.keep
Empty file.
Binary file added diagrams/caviarnine-basic.png
0xOmarA marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added diagrams/caviarnine-price-increase.png
0xOmarA marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading