Skip to content

Commit

Permalink
feat: profile button settings- accountSettings, logout (#136)
Browse files Browse the repository at this point in the history
* revamp/ui: dashboard

* style: pretty code

by ci

* added the text No models created yet.

* created notEmpty page

* style: pretty code

by ci

* merged: pull

* added checkbox

* added checkbox

* style: pretty code

by ci

* dashboard ui error fixed

* style: pretty code

by ci

* worked on the profile button and the logout fuction

* style: pretty code

by ci

* added the particle.auth.logout()

* added the particle.auth.logout()

* cherry-pick: HEAD fix/profile/button

Signed-off-by: Nasfame <laciferin@gmail.com>

* style: pretty code

by ci

* doc: minor .env.example

Signed-off-by: Nasfame <laciferin@gmail.com>

* updated the particle.auth

* style: pretty code

by ci

* minor: take of the spaggeti code

Signed-off-by: Nasfame <laciferin@gmail.com>

* style: pretty code

by ci

---------

Signed-off-by: Nasfame <laciferin@gmail.com>
Co-authored-by: Codebox124 <Codebox124@users.noreply.github.com>
Co-authored-by: techyNonso <williamikeji@gmail.com>
Co-authored-by: techyNonso <techyNonso@users.noreply.github.com>
Co-authored-by: Nasfame <Nasfame@users.noreply.github.com>
Co-authored-by: Nasfame <laciferin@gmail.com>
  • Loading branch information
6 people authored Nov 12, 2023
1 parent 34d9147 commit 3ea1955
Show file tree
Hide file tree
Showing 16 changed files with 240 additions and 159 deletions.
2 changes: 0 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ DATABASE_URL=
NEXT_PUBLIC_LH_API=
NEXT_PUBLIC_WEB_TOKEN=


NEXT_PUBLIC_PARTICLE_NETWORK_PROJECT_ID=
NEXT_PUBLIC_PARTICLE_NETWORK_CLIENT_KEY=
NEXT_PUBLIC_PARTICLE_NETWORK_APP_ID=


NEXT_PUBLIC_PAYMENT_CONTRACT_ADDRESS=
NEXT_PUBLIC_WALLET_CONTRACT_ADDRESS=

10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/0-task.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Task
title: "task: "
description: Create a task for the project
title: 'task: '
description: Create a task for the project
labels: ['task']

body:
Expand All @@ -14,14 +14,14 @@ body:
label: Task description
description: A clear and concise description of the task
value: |
- [ ]
- [ ]
validations:
required: true

- type: input
attributes:
attributes:
label: Related Issues
placeholder: |
Relates #21
validations:
required: false
required: false
9 changes: 3 additions & 6 deletions .github/ISSUE_TEMPLATE/10-proposal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ description: Submit a proposal for consideration
title: 'proposal: '
labels: ['proposal']


body:
body:
- type: markdown
attributes:
value: |
Expand Down Expand Up @@ -39,9 +38,7 @@ body:
id: additional-info
attributes:
label: Additional Information
description: Include any additional information or references that support the proposal.
description:
Include any additional information or references that support the proposal.
validations:
required: false



14 changes: 6 additions & 8 deletions .github/ISSUE_TEMPLATE/2-feature-request.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Feature request
description: Suggest an idea for this project
title: 'feature-request:'
labels: ['enhancement','feature-request','feature']
labels: ['enhancement', 'feature-request', 'feature']
assignees: ['Nasfame']

body:
body:
- type: markdown
attributes:
value: |
## Feature Request
Thanks for helping us improve! 🙏 Please follow the sections in the template and provide as much information.
- type: input
attributes:
attributes:
label: Related Issues
placeholder: |
Relates #21
Expand All @@ -39,9 +39,7 @@ body:
id: additional-info
attributes:
label: Additional Information
description: Include any additional information or references that support the proposal.
description:
Include any additional information or references that support the proposal.
validations:
required: false



14 changes: 10 additions & 4 deletions hardhat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@

## Overview

This repository serves as a template for web3 developers to kickstart their decentralized application (Dapp) development using Hardhat. Hardhat is a popular Ethereum development environment that makes it easy to compile, deploy, and test your smart contracts.
This repository serves as a template for web3 developers to kickstart their decentralized
application (Dapp) development using Hardhat. Hardhat is a popular Ethereum development
environment that makes it easy to compile, deploy, and test your smart contracts.

## Features

- **Ready-to-Use**: Clone this repository, and you're ready to start building your Dapp.
- **Smart Contract Development**: Write, compile, and deploy smart contracts effortlessly.
- **Testing**: Includes a testing environment with sample tests to ensure your contracts function as expected.
- **Deployment Scripts**: Simple scripts for deploying your smart contracts to various Ethereum networks.
- **Testing**: Includes a testing environment with sample tests to ensure your contracts
function as expected.
- **Deployment Scripts**: Simple scripts for deploying your smart contracts to various
Ethereum networks.

## Getting Started

Expand All @@ -24,6 +28,8 @@ This repository serves as a template for web3 developers to kickstart their dece
npm run build
npm run test:local:dev
```

## Advanced Setup

1. Install [Release Drafter](https://github.com/apps/release-drafter/installations/select_target)
1. Install
[Release Drafter](https://github.com/apps/release-drafter/installations/select_target)
2 changes: 1 addition & 1 deletion hardhat/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.8"
version: '3.8'
services:
app:
env_file:
Expand Down
30 changes: 15 additions & 15 deletions hardhat/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import { HardhatUserConfig } from 'hardhat/config'
import '@nomicfoundation/hardhat-toolbox'

import dotenv from "dotenv";
import dotenv from 'dotenv'

dotenv.config();
dotenv.config()

const config: HardhatUserConfig = {
defaultNetwork: "local",
defaultNetwork: 'local',
networks: {
// Add your network configurations here
sepolia: {
url: `https://sepolia.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: [process.env.PRIVATE_KEY ?? ""],
accounts: [process.env.PRIVATE_KEY ?? ''],
},
mumbai: {
url: `https://polygon-mumbai.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: [process.env.PRIVATE_KEY ?? ""],
accounts: [process.env.PRIVATE_KEY ?? ''],
},
local: {
url: "http://127.0.0.1:8545",
url: 'http://127.0.0.1:8545',
},
},
solidity: {
version: "0.8.22",
version: '0.8.22',
settings: {
optimizer: {
enabled: true,
Expand All @@ -31,14 +31,14 @@ const config: HardhatUserConfig = {
},
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
sources: './contracts',
tests: './test',
cache: './cache',
artifacts: './artifacts',
},
mocha: {
timeout: 40000,
},
};
}

export default config;
export default config
28 changes: 14 additions & 14 deletions hardhat/scripts/deploy.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import { ethers } from "hardhat";
import { config } from "dotenv";
import { ethers } from 'hardhat'
import { config } from 'dotenv'

async function main() {
const currentTimestampInSeconds = Math.round(Date.now() / 1000);
const unlockTime = currentTimestampInSeconds + 60;
const currentTimestampInSeconds = Math.round(Date.now() / 1000)
const unlockTime = currentTimestampInSeconds + 60

const lockedAmount = ethers.parseEther("0.001");
const lockedAmount = ethers.parseEther('0.001')

const lock = await ethers.deployContract("Lock", [unlockTime], {
const lock = await ethers.deployContract('Lock', [unlockTime], {
value: lockedAmount,
});
})

await lock.waitForDeployment();
await lock.waitForDeployment()

console.log(
`Lock with ${ethers.formatEther(
lockedAmount
)}ETH and unlock timestamp ${unlockTime} deployed to ${lock.target}`
);
lockedAmount,
)}ETH and unlock timestamp ${unlockTime} deployed to ${lock.target}`,
)
}

// We recommend this pattern to be able to use async/await everywhere
// and properly handle errors.
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});
console.error(error)
process.exitCode = 1
})
Loading

0 comments on commit 3ea1955

Please sign in to comment.