Skip to content

berzanorg/aptos-social-network-contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aptos-social-network-contract

Move module for Aptos Social Network dApp.

The dApp is live at berzanxyz.github.io.

An interface for Aptos Social Network resides in aptos-social-network-interface.

Events and tests are not implemented as this project is very basic.

Getting Ready

  • Clone the repo with git clone https://github.com/berzanxyz/aptos-social-network-contract.git
  • You can use Dev Containers for getting the development environment ready.

Developing

Compile:

aptos move compile

Publish:

aptos move publish

Interacting With The Contract

Initialize the social network:

aptos move run --function-id <MODULE-ADDRESS>::social_network::init

Create a user profile:

aptos move run --function-id <MODULE-ADDRESS>::social_network::create_user_profile --args 'string:<NAME>' 'string:<BIO>' 'string:<PFP-URL>'

Update a user profile:

aptos move run --function-id <MODULE-ADDRESS>::social_network::update_user_profile --args 'string:<NAME>' 'string:<BIO>' 'string:<PFP-URL>'

Make a post:

aptos move run --function-id <MODULE-ADDRESS>::social_network::make_post --args 'string:<CONTENT>' 'string:<IMAGE-URL or none>'

Make a comment:

aptos move run --function-id <MODULE-ADDRESS>::social_network::make_comment --args 'address:<POST-OWNER-ADDRESS>' 'u64:<POST-INDEX>' 'string:<COMMENT-CONTENT>'

Like a post:

aptos move run --function-id <MODULE-ADDRESS>::social_network::like_post --args 'address:<POST-OWNER-ADDRESS>' 'u64:<POST-INDEX>'

Like a comment:

aptos move run --function-id <MODULE-ADDRESS>::social_network::like_comment --args 'address:<POST-OWNER-ADDRESS>' 'u64:<POST-INDEX>' 'u64:<COMMENT-INDEX>'