- This wallet contract can store funds and let users withdraw again.
- One can also give "allowance" to other, specific user-addresses.
- We can also restrict the functions to specific user roles.
https://ethereum-blockchain-developer.com/040-shared-wallet-project/00-overview/
- Remix IDE for Smart contract development: https://remix.ethereum.org/
- Metamask browser extension for using Injected Web3 environment: https://metamask.io/
- Ganache By truffle for using Web3 Provider extension: https://www.trufflesuite.com/ganache
Go to the Remix IDE and create a new file with <Any_Name>. IDE automatically adds .sol extension to the file.
After successful compilation of the smart contract, head over to deploy and run transaction. There we see different environment options. We can deploy the smart contracts using 3 environments:
- Injected web3 : It is provided by metamask or similar provider. This environment is little slow, becuase the transactions are mined every time we deploy or interact with contract.
- Javascript VM : It is a simulated blockchain environment, that only exists in your browser. It is fast and easy to deploy.
- Web3 provider : It establises connection to a software outside of the browser. We can connect to the local blockchain, uisng this environment.
- To use this, we need to install Metamask browser extension
- Buy some Ethers from any test networks like Goerli, Rinkeby using Faucet
- Once remix connects to the Metamask, we will see the account address of test network that we connected to, in the deploy and run transaction page of Remix.
- Deploy the contract by making transaction through metamask.
- go to the remix IDE
- go to "Deployed Contracts"
- select the contract and interact with it using the buttons
- select the "contract" in the contract tab
- just "Deploy" the contract
- go to "Deployed Contracts" section
- select the contract and interact with it using the buttons
- To use this, we need to install ganache truffle (It is a personal blockchain for rapid ethereum and corda distributed application development).
- when we select web3provider environment option in Remix IDE, it will ask for "Web3 Provider Endpoint". Copy the RPC adress (http://127.0.0.1:7545) from the ganache and supply it here.
- when we click on okay, we can see all the available accounts of local ganache blockchain in Remix IDE.
- Deploy the smart contract and interact with it either from Remix IDE or from truffle suite. All the transactions will be logged in the Ganache.