Skip to content

d-Bharti001/shared-wallet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shared Wallet

A smart contract deployed on Goerli Test Network


Contract details

Wallet illustration

  • The Owner can:

    • deposit money into the wallet
    • withdraw any amount of money from the wallet
    • send money to any account on the network from the wallet, including self
    • set allowances for the other users of the wallet
  • A user can:

    • withdraw money from the wallet, which is limited by the allowance set for that user by the owner of the wallet
    • send money to any account on the network from the wallet, including self

Web Interface details

Requirements

  1. Metamask extension for the web browser
  2. An account on Goerli Test Network
  3. For users only - some allowance provided by the owner of the wallet to withdraw money from the wallet

Users' page

https://d-bharti001.github.io/shared-wallet/index.html

  • This page is intended to be used by any user of the wallet.

Withdraw Money

  • This section is for withdrawing money from the wallet and sending it to any account on the network, including yourself.
  • If you're not a user of the wallet, then your allowance will be 0. So any transaction related to withdrawal will fail.
  • If you want to use the wallet, some allowance is needed to be set which can only be done by the owner of the wallet.
  • If you try to withdraw more than your allowance, that transaction will fail.
  • If you try to withdraw more than the wallet balance, that transaction will fail.

Owner's page

https://d-bharti001.github.io/shared-wallet/owner.html

  • This page is intended only for the owner of the wallet.
  • If the selected account (on Metamask) is not the account of the owner, then transactions will fail.

Update allowance for a new/existing user

  • This section is for updating the allowance for any new or existing user, and for checking the current allowance left for a user.

Deposit Money

  • This section is for depositing money into the wallet.

Withdraw Money

  • This section is for withdrawing money from the wallet and sending it to any account on the network, including the owner themselves.
  • Any user can also use this section, but the rules will be applied as per the allowance set for that user by the owner.
  • The maximum amount that the owner can withdraw is only limited by the balance of the wallet.