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

fix: Correct power function logic and module value typo #616

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module metaschool::calculator {
public entry fun power(account: &signer, num1: u64, num2: u64) acquires Calculator {
let calculator = borrow_global_mut<Calculator>(signer::address_of(account));
if (num2 == 0) {
abort error::invalid_argument(0)
calculator.result = 1;
} else {
let i = 1;
calculator.result = num1;
Expand Down Expand Up @@ -133,7 +133,7 @@ git checkout origin/complete_code
You can ignore the warning generated in the terminal. Once done you should be able to find a `.env` file in your `interface` folder and it would look something like this:
```
REACT_APP_MODULE_ADDRESS = "<Enter-your-wallet-address-here>"
REACT_APP_MODULE_NAME= "calculator_l12"
REACT_APP_MODULE_NAME= "calculator"
```
3. Replace your Petra wallet address with `<Enter-your-wallet-address-here>`. And now we are all set, Finally set sail and deploy our react App by running.
```
Expand Down