GithubHelp home page GithubHelp logo

defi-stake-yield-brownie's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

defi-stake-yield-brownie's Issues

notification.transactionName is always undefined in "transactionSucceed" message.

Hello,
I followed the final tutorial on https://www.youtube.com/watch?v=M576WGiDBdQ . The file useStakeTokens.tsx in hooks defines the transactionName 'Approve ERC20 transfer' and 'Stake Tokens' when getting return message, but when I use it in StakeForm.tsx , I always get transactionName only in the transactionStarted message but not in transactionSucceed message, and I don't know how to set the transactionName in the transactionSucceed message. Any ideas on what I have done wrong?

bandicam 2022-12-24 21-03-56-995

bandicam 2022-12-24 21-03-13-366

Updating front-end not working on first run

After cloning this repo and running brownie run scripts/deploy.py, it fails due to the:

Updating front end...
  File "brownie/_cli/run.py", line 50, in main
    return_value, frame = run(
  File "brownie/project/scripts.py", line 103, in run
    return_value = f_locals[method_name](*args, **kwargs)
  File "./scripts/deploy.py", line 95, in main
    deploy_token_farm_and_dapp_token(update_front_end_flag=True)
  File "./scripts/deploy.py", line 39, in deploy_token_farm_and_dapp_token
    update_front_end()
  File "./scripts/deploy.py", line 67, in update_front_end
    copy_files_to_front_end(
  File "./scripts/deploy.py", line 91, in copy_files_to_front_end
    shutil.copyfile(src, dest)
  File "/usr/lib/python3.9/shutil.py", line 265, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: './build/deployments/map.json'
Terminating local RPC client...

By editing /scripts/deploy.py to:

def main():
    deploy_token_farm_and_dapp_token(update_front_end_flag=False)

I can run it, but it is not exporting map.json to that specified './build/deployments/map.json' directory.

Failed to compile ./src/features/Main.tsx

Getting this error after using yarn start:

Failed to compile
./src/features/Main.tsx
Module not found: Can't resolve '../chain-info/map.json' in 'C:\Users\ii\Desktop\defi-stake-yield-brownie-main\front_end\src\features'
This error occurred during the build time and cannot be dismissed.

[FIXED] - Failed to parse source map - @metamask/detect-provider/src/index.ts

Could you please help me with this ? Anyone had the same issue ?

WARNING in ./node_modules/@metamask/detect-provider/dist/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/nandor/Solidity/defi-stake-yield-brownie/front_end/node_modules/@metamask/detect-provider/src/index.ts' file: Error: ENOENT: no such file or directory, open '/home/nandor/Solidity/defi-stake-yield-brownie/front_end/node_modules/@metamask/detect-provider/src/index.ts'
@ ./node_modules/@usedapp/core/dist/esm/src/helpers/injectedProvider.js 2:0-63 4:33-55
@ ./node_modules/@usedapp/core/dist/esm/src/providers/network/injectedNetwork/provider.js 4:0-72 19:4-23
@ ./node_modules/@usedapp/core/dist/esm/src/providers/network/injectedNetwork/index.js 2:0-27 2:0-27
@ ./node_modules/@usedapp/core/dist/esm/src/providers/index.js 6:0-42 6:0-42
@ ./node_modules/@usedapp/core/dist/esm/src/index.js 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526 3:0-526
@ ./src/App.tsx 4:0-54 9:30-42 11:24-37 11:39-54
@ ./src/index.tsx 6:0-24 10:33-36

  • Does not render anything when I run yarn start

Re-Entrancy

Hi, may I know if there a possibility of reentrancy in stakeTokens(uint256 _amount, address token) and unstakeTokens(address token) function as transfer and transferFrom function is called before update of stakingBalance?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.