Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completed smart contract section #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kenocathon
Copy link

Finished the homework and uploaded program to the testnet blockchain. Recieved a new tomagatchi as expected.

Copy link
Contributor

@shamilsan shamilsan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make a PR to be merged into your repo (https://github.com/kenocathon/dapps-template-gear-academy/) instead of the template.

Please reread the homework rules: https://academy.gear.rs/getting-started/homework-rules

Note that the target branch for the PR should be master in your repository, not in the template one.

Also, please be sure your CI workflow passes before sending the PR.

Comment on lines +6 to +7


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use cargo fmt before committing.

Suggested change

TmgAction::Age => {
debug!("Tamagotchi: Age Requested");
// Directly reply with the date of birth, as TmgAction::Age does not carry data
msg::reply(TmgEvent::Age(state.date_of_birth), 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Age should depend on the current block timestamp.

#[no_mangle]
extern fn state() {
// TODO: 7️⃣ Return the Tamagotchi state
let tomagotchi = unsafe {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo:

Suggested change
let tomagotchi = unsafe {
let tamagotchi = unsafe {


assert!(!get_name_result.main_failed(), "Name request failed");

let expected_tamagatchi = Log::builder()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

Suggested change
let expected_tamagatchi = Log::builder()
let expected_tamagotchi = Log::builder()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants