Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

WIP: Bonding Curve Contract #216

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

michaeljklein
Copy link
Contributor

@michaeljklein michaeljklein commented Dec 12, 2022

…dable instance for TokenMetadata, Eq and Show for AdminStorage, add lorentz bindings for bonding curve, add example storage generators for bonding curve, emulate piecewise polynomial in haskell, add lorentz bindings to debug bonding curve, add lorentz bindings for fa2_multi_nft_asset, add example storage for fa2_multi_nft_asset, add npm test command to test bonding curve, add JS bondings for bonding curve, add tests for fa2_multi_nft_asset: simple admin, mint, update_metadata, burn (including operator checks), test bonding curve origination and storage in JS, test bonding curve in haskell: simple admin, extensive tests for piecewise polynomial price, add bonding curve implementation in ligo: implement polynomial, implement piecewise polynomial, implemented storage, implemented entrypoint type, implemented buy_offchain_no_admin and sell_offchain_no_admin, used _no_admin functions to implement on/off-chain buy/sell entrypoints, implemented withdraw entrypoint, added debug version of bonding curve to test piecewise polynomials, designed lifecycle and buy/sell tests, added docs for bonding-curve
…ings to '_' entrypoints, haskell entrypoint tests for bonding curve, token_index = 0 tests, debugging piecewise polynomial debug tests, organize tests, update js test storage
… to burn entrypoint to ensure owner, ensure sent address is owner and sender is miner for burn entrypoint in nft contract, ensure token_id is properly set in metadata of mint entrypoint of nft contract, add expected basis point fee and addition calculations for testing, add linear piecewise polynomial function, add address to burn entrypoint for haskell bindings, test selling token_id=0 (and offchain), test buying with non-zero auction_price and storage assertions, test buying multiple tokens offchain with storage assertions, test selling tokens with storage assertions and checks for balance changes, test selling offchain with storage and balance assertions, test buying and selling multiple tokens including basis_points/auction_price storage and balance assertions, test multiple buys/sells offchain as with onchain, ensure valid test data for bonding curve formula tests, test constant polynomial formula, test linear polynomial formula, get property tests of bonding curve formula working, add formula unit tests from debugging property tests, test batch buy/sell with storage and balance assertions property-style, test nft transfer, test nft update metadata with storage assertions, test nft operators with storage assertions, test nft minting with storage assertions, test multiple nft minters able to mint without allowing anyone to mint, test nft minting and burning in batch with storage checks, test nft minting and burning with updating metadata, add js functions for displaying piecewise polynomials, remove untested/broken no-admin and multi admin ligo modules, nft marketplace and bonding curve tests passing
…nt, minter requirements, and requirements for being a minter of the NFT marketplace contract, remove unused admin check comment from NFT marketplace
…act call values to buy_sell_test_data.txt, make js tests faster, add 4th test address, get js sandbox test working up to first buy, (haskell wrong price broken by verbose failwith)
…ynomial, add ifdef-style option for piecewise polynomial and debug version, add example constant lambda and WIP piecewise polynomial runner lambda (failing parse), add new storage for lambda bonding curve, add testing and origination functions for new bonding curve, fixed failing verbose wrong_tez_price errors (haskell tests passing)
…s for nat_pow in haskell, unit test nat_pow in haskell, property test nat_pow in haskell, add example formula in ligo, add haskell bindings for example formula, unit test example formula in haskell, property test example formula in haskell, add converter from value to lambda, explicitly test example formula with inputs >= 30,000 in property test
… (unused), reduce polynomial coefficient size for faster testing (too-large outputs are dropped until one small enough to fit in the tez type is found)
…test lambda, migrated all haskell integration tests besides buySellOffchainTest (buy sell test failing with unexpected price, likely an issue with the test lambda)
… of added to buy price (defaulting to whole sell price if it's too large, instead of locking the contract by putting too large of a value into 'unclaimed'), untested
…med amount, WIP converting tests to remove basis point fee from sale price instead of adding to buy price, debugging failing buySellTest (only on lambda version of contract)
…f the integration tests in haskell to the lambda version, baking rewards integration test in haskell w/ storage checks, linted some long haskell types
…bonding curve to skip symbol check, update haskell bindings to fa2_multi_nft_asset, update haskell tests for fa2_multi_nft_asset to not send symbol when calling burn entrypoint (haskell tests passing)
…. any user can call it), update haskell tests for buy_offchain and test that buy and buy_offchain behave the same (passing), update docstrings r.e. no admin check, update bonding curve readme
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant