Create a react app that can interact with the smart contract described below:
- It should allow users to connect their near testnet wallet with app.
- Once connected, it should allow users to send messages to smart contract, and attach near tokens(attaching near tokens is optional - dependent on user)
- It should show latest 10 messages sent to smart contract and least 10 messages sent by signed in user.
- Web App Design is up to developer. App should implement responsive design.
App to leave feedback while leaving hotel. Can attach near tokens to messages as well. This Guest book smart contract lives in NEAR blockchain(TESTNET for now). Clone and test with testnet accounts or just have fun with deployed link.
Contract address: guest-book2.niskarsh31.testnet
Explore it here: https://testnet.nearblocks.io/address/guest-book2.niskarsh31.testnet
Allows user to add new message. Can attach additional near tokens as donation as well.
Gets messages based on offset and limit.
Offset: 0 , Limit: 10 => Gives last 10 messages
Offset: 1 , Limit: 10 => Gives 2nd set of 10 messages from the end.
Although values are integer, contract expects them as String. Offest: 0, and limit: 10 will be the only case needed for this assignment.
Gets premium messages based on offset and limit.
Premium messages are messages which have near tokens attached to them.
Offset: 0 , Limit: 10 => Gives last 10 messages
Offset: 1 , Limit: 10 => Gives 2nd set of 10 messages from the end.
Although values are integer, contract expects them as String. Offest: 0, and limit: 10 will be the only case needed for this assignment.
Gives highest donation provided.
Gives all messages from signed in user(User whose wallet to connected to app at the time of call).