Skip to content

Ping contract implementation with no wallet feature

Notifications You must be signed in to change notification settings

Vara-Lab/Ping-No-Wallet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ping contract with no wallet functionality

To compile the contract yo need to execute the following command:

cargo build --release

Architecture

A contract consists of two directories:

  • App: Where lives all business logic.
  • Wasm: Where the contract is built and the IDL is generated

Walletless feature

This contract contains the signless and walletless feature, it uses the service "KeyringService" from the keyring-service repository

Service

  • KeyringService:

    This service contains all the methods to handle the walletless and signless features, and gives you the queries to obtain the keyring accounts and the addresses of these keyring accounts.

    This service comes from the KeyringService repository, to use it, you just have to put it as another service in the program (This contract already implement it):

    // code ...
    
    #[derive(Default)]
    pub struct Porgram;
    
    #[program]
    impl Program {
        #[route("KeyringService")]
        pub fn keyring_svc(&self) -> KeyringService {
            KeyringService::new()
        }
    
        // code ...
    }

About

Ping contract implementation with no wallet feature

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages