Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
eefe140
#44 integrating changes from #42
ShravanSunder Dec 30, 2021
e3983e0
gitignore for *.secret files
ShravanSunder Dec 30, 2021
47b46e8
have surge grab from the dist dir
Dec 30, 2021
db74761
fix: Set z-index on Account component so it's on top of other content…
grothem Jan 6, 2022
465b66d
Feature/#29 eth-hooks v4 changes (#32)
ShravanSunder Jan 6, 2022
c9f0cd3
Merge branch 'main' into develop
ShravanSunder Jan 6, 2022
5e2f289
changes for scaffold-eth/eth-hooks#120 useBalance
ShravanSunder Jan 7, 2022
5bc4297
bug fix
ShravanSunder Jan 11, 2022
29a4ce9
Features/#47 (#49)
ShravanSunder Jan 12, 2022
9f9756f
Merge branch 'main' into develop
ShravanSunder Jan 12, 2022
e16e279
fix
ShravanSunder Jan 12, 2022
f2a8b93
updating branches
ShravanSunder Jan 12, 2022
fa91df9
updating actions
ShravanSunder Jan 12, 2022
26a8ed6
update packages
ShravanSunder Jan 16, 2022
e571cba
Updated comments to match file and script names (#51)
grothem Jan 16, 2022
48075a1
Features/eth hooks#125 (#53)
ShravanSunder Jan 16, 2022
78e1376
update README.md
ShravanSunder Jan 17, 2022
cb220c7
update README.md
ShravanSunder Jan 17, 2022
aa7c08a
minor changes to faucet and comments and readme
ShravanSunder Jan 17, 2022
0c48180
updated comments
ShravanSunder Jan 17, 2022
a7d2035
updated comments, minor bug fixes
ShravanSunder Jan 17, 2022
0bbf7a4
updated comments
ShravanSunder Jan 17, 2022
bbe75b9
#56 simplified config. Added better comments fixed bug with multiple…
ShravanSunder Jan 17, 2022
8e79062
#56 comments
ShravanSunder Jan 17, 2022
f00ef2a
updated packages
ShravanSunder Jan 17, 2022
c6dab1d
update packages
ShravanSunder Jan 19, 2022
f96b841
change ~~ to relative path in order for eth-sdk to work when running …
dvinubius Jan 19, 2022
0796314
Remove localhost calls in non-localhost deployments (#59)
dvinubius Jan 20, 2022
609ea44
updated codeql target
ShravanSunder Jan 20, 2022
ac034a4
update action
ShravanSunder Jan 20, 2022
226c564
update action
ShravanSunder Jan 20, 2022
6f35f54
Catch module import errors in web3ModalConfig (#61)
dvinubius Jan 23, 2022
ba3c72c
Bugs/#55 surge (#62)
ShravanSunder Jan 25, 2022
26f5928
Merge branch 'release' of https://github.com/scaffold-eth/scaffold-et…
grothem Feb 1, 2022
d8ac184
Regenerate yarn.lock
grothem Feb 1, 2022
3f0098b
Cleaning up errors after upgrade
grothem Feb 1, 2022
f8308bf
Upgrading
grothem Feb 3, 2022
97e493a
Stubbing out methods to fix errors
grothem Feb 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
name: "CodeQL"

on:
workflow_dispatch:
push:
branches: [ main ]
branches: [ next, release ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [ next, release ]
schedule:
- cron: '33 9 * * 3'
- cron: '0 4 */7 * *'

jobs:
analyze:
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Pull Request CI
on:
workflow_dispatch:
push:
branches: [master, develop, main]
branches: [release, next]
pull_request:
types: [opened, reopened, ready_for_review, synchronize]

Expand Down Expand Up @@ -41,10 +41,14 @@ jobs:
- name: 'hardhat compile'
run: |
yarn compile --force


- name: 'build contracts'
run: |
yarn shx cp ./packages/vite-app-ts/scripts/hardhat_contracts.json.bak ./packages/vite-app-ts/src/generated/hardhat_contracts.json
yarn contracts:build

- name: 'build production'
run: |
yarn shx cp ./packages/vite-app-ts/src/generated/contracts/hardhat_contracts.json.bak ./packages/vite-app-ts/src/generated/contracts/hardhat_contracts.json
yarn run start optimize --force
yarn run build
# - run: yarn hardhat:test
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Mark stale issues and pull requests

on:
schedule:
- cron: '34 7 * * *'
- cron: '6 6 * */1 *'

jobs:
stale:
Expand All @@ -23,5 +23,20 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
stale-issue-label: '🙊 stale'
stale-pr-label: '🙊 stale'
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 20
# Issues with these labels will never be considered stale
exemptLabels: 🗺 epic
# Label to use when marking an issue as stale
staleLabel: 👎🏽 wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
38 changes: 14 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,38 @@ packages/hardhat/*.txt
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
**/node_modules

packages/hardhat/artifacts*
packages/hardhat/deployments
packages/react-app/src/contracts/*
!packages/react-app/src/contracts/external_contracts.js
packages/hardhat/cache*
packages/**/data
!packages/react-app/src/contracts/contracts.js
packages/subgraph/config/config.json
tenderly.yaml

#build
*.tsbuildinfo
*.stackdump
.yalc
yalc.lock
packages/vite-app-ts/dist
packages/hardhat-ts/mnemonic.secret

# ts
packages/hardhat-ts/cache
# secrets
.secret

packages/subgraph/config/config.json
tenderly.yaml

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
coverage

# production
build
# yarn / eslint
.yarn/cache
.yarn/install-state.gz
.yarn/build-state.yml
.eslintcache

# testing
coverage

# production
build
dist

#Hardhat files
cache
Expand All @@ -52,18 +47,13 @@ artifacts
# misc
.DS_Store
.env*
.netlify

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.idea

# Local Netlify folder
.netlify
*.tsbuildinfo
*.stackdump
.yalc
yalc.lock
packages/vite-app-ts/dist


9 changes: 2 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,9 @@
"**/build/**/*": true,
"**/debug/": true,
"**/dist/": true,
"**/node_modules/": true,
"**/obj": true,
"node_modules": true,
"node_modules/*/**": true,
"**/node_modules": true,
"yarn-error.log": true,
"**/yarn-error.log": true,
"packages\\eth-hooks/lib": true,
"**/.yalc": true
},
"search.exclude": {
Expand All @@ -42,14 +37,14 @@
"**/build/**/*": true,
"**/debug/": true,
"**/dist/": true,
"**/node_modules/": true,
"**/obj": true,
"node_modules": true,
"node_modules/*/**": true,
"**/node_modules": true,
"yarn-error.log": true,
"**/yarn-error.log": true,
"**/.yalc": true
"**/.yalc": true,
"**/.yarn": true
},
"explorerExclude.backup": null,
"eslint.workingDirectories": [
Expand Down
134 changes: 66 additions & 68 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,68 @@
{
"name": "@scaffold-eth/typescript",
"version": "0.2.0",
"keywords": [
"ethereum",
"react",
"uniswap",
"workspaces",
"yarn"
],
"private": true,
"scripts": {
"build": "yarn workspace @scaffold-eth/vite-app build",
"serve": "yarn workspace @scaffold-eth/vite-app serve",
"chain": "yarn workspace @scaffold-eth/hardhat chain",
"fork": "yarn workspace @scaffold-eth/hardhat fork",
"node": "yarn workspace @scaffold-eth/hardhat chain",
"test": "yarn workspace @scaffold-eth/hardhat test",
"start": "yarn workspace @scaffold-eth/vite-app start",
"compile": "yarn workspace @scaffold-eth/hardhat compile",
"export": "yarn workspace @scaffold-eth/hardhat export",
"deploy": "yarn workspace @scaffold-eth/hardhat deploy",
"watch": "yarn workspace @scaffold-eth/hardhat watch",
"accounts": "yarn workspace @scaffold-eth/hardhat accounts",
"balance": "yarn workspace @scaffold-eth/hardhat balance",
"verify": "yarn workspace @scaffold-eth/hardhat verify",
"send": "yarn workspace @scaffold-eth/hardhat send",
"ipfs": "yarn workspace @scaffold-eth/vite-app ipfs",
"surge": "yarn workspace @scaffold-eth/vite-app surge",
"s3": "yarn workspace @scaffold-eth/vite-app s3",
"ship": "yarn workspace @scaffold-eth/vite-app ship",
"generate": "yarn workspace @scaffold-eth/hardhat generate",
"account": "yarn workspace @scaffold-eth/hardhat account",
"mine": "cd packages/hardhat-ts && npx hardhat mine",
"wallet": "cd packages/hardhat-ts && npx hardhat wallet",
"fundedwallet": "cd packages/hardhat-ts && npx hardhat fundedwallet",
"flatten": "cd packages/hardhat-ts && npx hardhat flatten",
"clean": "cd packages/hardhat-ts && npx hardhat clean",
"run-graph-node": "yarn workspace @scaffold-eth/services run-graph-node",
"remove-graph-node": "yarn workspace @scaffold-eth/services remove-graph-node",
"clean-graph-node": "yarn workspace @scaffold-eth/services clean-graph-node",
"graph-prepare": "mustache packages/subgraph/config/config.json packages/subgraph/src/subgraph.template.yaml > packages/subgraph/subgraph.yaml",
"graph-codegen": "yarn workspace @scaffold-eth/subgraph graph codegen",
"graph-build": "yarn workspace @scaffold-eth/subgraph graph build",
"graph-create-local": "yarn workspace @scaffold-eth/subgraph graph create --node http://localhost:8020/ scaffold-eth/your-contract",
"graph-remove-local": "yarn workspace @scaffold-eth/subgraph graph remove --node http://localhost:8020/ scaffold-eth/your-contract",
"graph-deploy-local": "yarn workspace @scaffold-eth/subgraph graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 scaffold-eth/your-contract",
"graph-ship-local": "yarn graph-prepare && yarn graph-codegen && yarn graph-deploy-local",
"deploy-and-graph": "yarn deploy && yarn graph-ship-local",
"theme": "yarn workspace @scaffold-eth/react-app theme",
"watch-theme": "yarn workspace @scaffold-eth/react-app watch"
},
"workspaces": {
"packages": [
"packages/hardhat-ts",
"packages/vite-app-ts",
"packages/services/*",
"packages/subgraph"
]
},
"packageManager": "yarn@3.1.0",
"devDependencies": {
"eslint": "^7.32.0",
"prettier": "^2.4.1",
"shx": "^0.3.3"
},
"dependencies": {
"react": "^17.0.2"
}
"name": "@scaffold-eth/typescript",
"version": "0.2.0",
"keywords": [
"ethereum",
"react",
"uniswap",
"workspaces",
"yarn"
],
"private": true,
"scripts": {
"build": "yarn workspace @scaffold-eth/vite-app build",
"serve": "yarn workspace @scaffold-eth/vite-app serve",
"chain": "yarn workspace @scaffold-eth/hardhat chain",
"fork": "yarn workspace @scaffold-eth/hardhat fork",
"node": "yarn workspace @scaffold-eth/hardhat chain",
"test": "yarn workspace @scaffold-eth/hardhat test",
"start": "yarn workspace @scaffold-eth/vite-app start",
"compile": "yarn workspace @scaffold-eth/hardhat compile",
"contracts:build": "yarn workspace @scaffold-eth/hardhat hardhat compile && yarn workspace @scaffold-eth/vite-app contracts:external",
"contracts:rebuild": "yarn workspace @scaffold-eth/hardhat hardhat clean && yarn contracts:build",
"export": "yarn workspace @scaffold-eth/hardhat export",
"deploy": "yarn workspace @scaffold-eth/hardhat deploy",
"watch": "yarn workspace @scaffold-eth/hardhat watch",
"accounts": "yarn workspace @scaffold-eth/hardhat accounts",
"balance": "yarn workspace @scaffold-eth/hardhat balance",
"send": "yarn workspace @scaffold-eth/hardhat send",
"ipfs": "yarn workspace @scaffold-eth/vite-app ipfs",
"surge": "yarn workspace @scaffold-eth/vite-app surge",
"s3": "yarn workspace @scaffold-eth/vite-app s3",
"ship": "yarn workspace @scaffold-eth/vite-app ship",
"generate": "yarn workspace @scaffold-eth/hardhat generate",
"account": "yarn workspace @scaffold-eth/hardhat account",
"mine": "cd packages/hardhat-ts && npx hardhat mine",
"wallet": "cd packages/hardhat-ts && npx hardhat wallet",
"fundedwallet": "cd packages/hardhat-ts && npx hardhat fundedwallet",
"flatten": "cd packages/hardhat-ts && npx hardhat flatten",
"clean": "cd packages/hardhat-ts && npx hardhat clean",
"run-graph-node": "yarn workspace @scaffold-eth/services run-graph-node",
"remove-graph-node": "yarn workspace @scaffold-eth/services remove-graph-node",
"clean-graph-node": "yarn workspace @scaffold-eth/services clean-graph-node",
"graph-prepare": "mustache packages/subgraph/config/config.json packages/subgraph/src/subgraph.template.yaml > packages/subgraph/subgraph.yaml",
"graph-codegen": "yarn workspace @scaffold-eth/subgraph graph codegen",
"graph-build": "yarn workspace @scaffold-eth/subgraph graph build",
"graph-create-local": "yarn workspace @scaffold-eth/subgraph graph create --node http://localhost:8020/ scaffold-eth/your-contract",
"graph-remove-local": "yarn workspace @scaffold-eth/subgraph graph remove --node http://localhost:8020/ scaffold-eth/your-contract",
"graph-deploy-local": "yarn workspace @scaffold-eth/subgraph graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 scaffold-eth/your-contract",
"graph-ship-local": "yarn graph-prepare && yarn graph-codegen && yarn graph-deploy-local",
"deploy-and-graph": "yarn deploy && yarn graph-ship-local",
"theme": "yarn workspace @scaffold-eth/react-app theme",
"watch-theme": "yarn workspace @scaffold-eth/react-app watch"
},
"workspaces": {
"packages": [
"packages/hardhat-ts",
"packages/vite-app-ts",
"packages/services/*",
"packages/subgraph"
]
},
"packageManager": "yarn@3.1.0",
"devDependencies": {
"eslint": "^8.6.0",
"prettier": "^2.5.1",
"shx": "^0.3.4"
}
}
7 changes: 7 additions & 0 deletions packages/hardhat-ts/contracts/Staker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,26 @@ import './ExampleExternalContract.sol';
contract Staker {
ExampleExternalContract public exampleExternalContract;

mapping(address => uint256) public balances;
uint256 public constant threshold = 1 ether;

constructor(address exampleExternalContractAddress) public {
exampleExternalContract = ExampleExternalContract(exampleExternalContractAddress);
}

// Collect funds in a payable `stake()` function and track individual `balances` with a mapping:
// ( make sure to add a `Stake(address,uint256)` event and emit it for the frontend <List/> display )
function stake() public payable {}

// After some `deadline` allow anyone to call an `execute()` function
// It should either call `exampleExternalContract.complete{value: address(this).balance}()` to send all the value
function execute() public {}

// if the `threshold` was not met, allow everyone to call a `withdraw()` function
function withdraw(address to) public {}

// Add a `timeLeft()` view function that returns the time left before the deadline for the frontend
function timeLeft() public view returns (uint256) {}

// Add the `receive()` special function that receives eth and calls stake()
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { DeployFunction } from 'hardhat-deploy/types';
import { HardhatRuntimeEnvironmentExtended } from 'helpers/types/hardhat-type-extensions';
import { HardhatRuntimeEnvironment } from 'hardhat/types';

const func: DeployFunction = async (hre: HardhatRuntimeEnvironmentExtended) => {
const { getNamedAccounts, deployments } = hre as any;
const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { getNamedAccounts, deployments } = hre;
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();
await deploy('ExampleExternalContract', {
Expand Down
3 changes: 1 addition & 2 deletions packages/hardhat-ts/generated/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
!contract-types
!.gitignore
Loading