format project
|
|
@ -1,17 +1,16 @@
|
|||
# Wave Portal
|
||||
|
||||
This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, a sample script that deploys that contract, and an example of a task implementation, which simply lists the available accounts.
|
||||
This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, a sample
|
||||
script that deploys that contract, and an example of a task implementation, which simply lists the available accounts.
|
||||
|
||||
## Screenshots
|
||||
|
||||
[Frontend available](https://waveportal-starter-project.rjnemo.repl.co)
|
||||
|
||||
[](https://waveportal-starter-project.rjnemo.repl.co)
|
||||
|
||||
|
||||
[](https://opensea.io/assets/matic/0x3cd266509d127d0eac42f4474f57d0526804b44e/16450)
|
||||
|
||||
|
||||
|
||||
Try running some of the following tasks:
|
||||
|
||||
```shell
|
||||
|
|
|
|||
|
|
@ -42,8 +42,9 @@ contract WavePortal {
|
|||
console.log("%s won!", msg.sender);
|
||||
uint256 prizeAmount = 0.001 ether;
|
||||
require(prizeAmount <= address(this).balance);
|
||||
(bool success, ) = (msg.sender).call{value: prizeAmount}("");
|
||||
require(success, "Failed to withdraw from the contract"); // mark the transaction as an error if it failed
|
||||
(bool success,) = (msg.sender).call{value : prizeAmount}("");
|
||||
// mark the transaction as an error if it failed
|
||||
require(success, "Failed to withdraw from the contract");
|
||||
}
|
||||
|
||||
emit NewWave(msg.sender, block.timestamp, _message);
|
||||
|
|
|
|||
BIN
docs/Screenshot 2022-04-03 at 16.45.14.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
docs/Screenshot 2022-04-03 at 16.50.45.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
docs/Screenshot 2022-04-03 at 16.58.44.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
docs/Screenshot 2022-04-04 at 05.16.37.png
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
docs/Screenshot 2022-04-04 at 07.20.07.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
docs/Screenshot 2022-04-04 at 12.23.38.png
Normal file
|
After Width: | Height: | Size: 127 KiB |
BIN
docs/Screenshot 2022-04-07 at 06.41.28.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
docs/Screenshot 2022-04-07 at 06.59.43.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
|
|
@ -16,12 +16,12 @@ module.exports = {
|
|||
solidity: "0.8.4",
|
||||
networks: {
|
||||
rinkeby: {
|
||||
url: STAGING_ALCHEMY_URL,
|
||||
accounts: [PRIVATE_KEY],
|
||||
url: process.env.STAGING_ALCHEMY_URL,
|
||||
accounts: [process.env.PRIVATE_KEY],
|
||||
},
|
||||
mainnet: {
|
||||
url: PROD_ALCHEMY_URL,
|
||||
accounts: [PRIVATE_KEY],
|
||||
url: process.env.PROD_ALCHEMY_URL,
|
||||
accounts: [process.env.PRIVATE_KEY],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const main = async () => {
|
|||
console.log(`Account balance: ${accountBalance.toString()}`);
|
||||
|
||||
const Token = await hre.ethers.getContractFactory("WavePortal");
|
||||
const portal = await Token.deploy({ value: hre.ethers.utils.parseEther("0.01") });
|
||||
const portal = await Token.deploy({value: hre.ethers.utils.parseEther("0.01")});
|
||||
await portal.deployed();
|
||||
console.log("WavePortal address: ", portal.address);
|
||||
};
|
||||
|
|
|
|||