The Book Review Application allows users to browse and review books, manage their account details, and perform transactions related to book purchases and reviews.
Verifies whether a Principal has an account. Used for conditional rendering and input validation.
Fetches the account data of the caller.
Fetches all requests of the caller.
Fetches the ID of the backend/bank canister.
Allows the caller to create an account if none exists.
Allows the caller to create a transfer request to another user.
Allows the receiver to handle a transfer request (approve/reject).
Allows the caller to transfer tokens to a Principal.
Fetches the current fee of the ledger canister.
Fetches the current allowance of the backend/bank canister.
Carries out the transferFrom
operation used for handling transfers.
To deploy the Book Review Application canisters, follow these steps:
-
Start DFX Environment: dfx start --background --clean
-
Deploy Ledger Canister: ./deploy-local-ledger.sh
-
Deploy Internet Identity: dfx deploy internet_identity
-
Generate Types Declarations: dfx generate icp_booking_review_backend
-
Deploy Backend Canister: dfx deploy icp_booking_review_backend
-
Deploy Frontend Canister: dfx deploy icp_booking_review_frontend
-
Transfer Tokens to Principal: dfx identity use default dfx ledger transfer
--memo 0 --icp 100
Replace <ADDRESS>
with the address of the recipient. Use getAddressFromPrincipal(principal: Principal)
function to obtain the address.
- Adjust paths and environment variables (
BACKEND_CANISTER_ID
, etc.) in your application as per your setup. - Ensure all dependencies and configurations are correctly set up before deployment.
- For more detailed documentation, refer to individual function implementations and canister descriptions.