Skip to content

Repository files navigation

MMOSH Protocol

Software requirement

  1. ubuntu 22.04 or mac os
  2. Rust stable 1.75 +
  3. Solana 1.18.9
  4. Anchor 0.30.0
  5. nodejs stable 18+

Account Configuration Steps

  1. Open Anchor.toml from root directory
  2. Change wallet path in anchor.toml file

Configure MMOSH token

  1. download MMOSH program from github - https://github.com/mmosh-pit/MMOSH-program
  2. create new token and copy the token address
  3. update the token address in tests/web3Consts.ts
     oposToken: new web3.PublicKey("TOKEN_ADDRESS")

Amman configuration Steps

1 Configure amman as root user

npm install -g @metaplex-foundation/amman
  1. Download metaplex js from github- https://github.com/metaplex-foundation/js
  2. Run following command to run local solana validator along with metaplex contracts
    amman start .ammanrc.js

Test Case Command

  1. Install npm
    npm install 
  2. To run test with deployment
    anchor test --skip-local-validator 
  3. To run test without deployment
    anchor test --skip-local-validator --skip-deploy 

Smart contract functions

NoFunctionDescriptionDocumentation
1init_main_stateCreate new PDA account to manage profile nftlink
2update_main_stateUpdate cost and share of profile PDA accountlink
3update_main_state_ownerTranfser PDA account ownershiplink
4create_collectionCreate new collection for profile and passlink
5mint_gensis_profileCreate new gensis profile nftlink
6mint_profile_by_atCreate new profile nftlink
7update_profileupdate profile nft metadata, name and symbollink
8mint_gensis_passmint gensis pass along with new PDA accountlink
9mint_pass_by_atmint pass nftlink
10mint_guest_passmint new guest pass nftlink
11init_activation_tokenCreate new activation token accountlink
12mint_activation_tokenMint new activation token from profile nftlink
13init_pass_tokenCreate new pass activation token accountlink
14create_pass_tokenMint new pass activation token nftlink
15initialize_sol_storage_v0Create new storage account for bonding curvelink
16create_curve_v0Create new curve accountlink
17initialize_token_bonding_v0Intialize token bonding accountlink
18sell_v1Burn memecoin to get token back from bonding curvelink
19buy_v1Mint memecoin to lock token into bonding curvelink
20init_vaultIntialize new vault accountlink
21stake_vaultstake value into vault accountlink
22unstake_vaultunstake value from vault accountlink

LICENSE

Copyright 2024 mmosh.app

Licensed under the GNU License, Version 3.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.gnu.org/licenses/agpl-3.0.en.html

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages