Skip to content

emarai/book-tracker-contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to Compile

$ yarn build:contract

How to deploy on testnet

$ near dev-deploy

Call Functions

Add book

Book interface

pub struct Book {
    title: String,
    description: String,
    status: Status,
    image: String,
}

Add book call function

add_book '{"book":{"description":"Tutorial for mechanics","image":"https://example.com","title":"Motorcycle Mechanics 101","status":"List"}}'

return book_id

Update book

update_book '{"book_id":"1", "status":"Read"}'

Delete book

delete_book '{"book_id":"1"}'

View methods

Get book

get_book '{"book_id":"1"}'

Get books

Get all books from gnaor.testnet

get_books '{"account_id":"gnaor.testnet", "skip":0, "limit": 10}'

Get all books

get_books '{"skip":0, "limit": 10}'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published