Skip to content
This repository was archived by the owner on Jun 7, 2024. It is now read-only.

Commit d6d9835

Browse files
committed
first checkin of tyepscript. copied over from scaffold-eth typescript branch
0 parents  commit d6d9835

File tree

151 files changed

+24416
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+24416
-0
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[packages/**.js{,x}]
4+
indent_style = space
5+
indent_size = 2
6+
7+
[*.{sol,yul}]
8+
indent_style = space
9+
indent_size = 4

.github/ISSUE_TEMPLATE/bug_report.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.gitignore

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
packages/subgraph/subgraph.yaml
2+
packages/subgraph/generated
3+
packages/subgraph/abis/*
4+
packages/hardhat/*.txt
5+
**/aws.json
6+
7+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
8+
**/node_modules
9+
10+
packages/hardhat/artifacts*
11+
packages/hardhat/deployments
12+
packages/react-app/src/contracts/*
13+
!packages/react-app/src/contracts/external_contracts.js
14+
packages/hardhat/cache*
15+
packages/**/data
16+
!packages/react-app/src/contracts/contracts.js
17+
18+
19+
# ts
20+
packages/hardhat-ts/cache
21+
# secrets
22+
.secret
23+
24+
packages/subgraph/config/config.json
25+
tenderly.yaml
26+
27+
# dependencies
28+
/node_modules
29+
/.pnp
30+
.pnp.js
31+
32+
# testing
33+
coverage
34+
35+
# production
36+
build
37+
# yarn / eslint
38+
.yarn/cache
39+
.yarn/install-state.gz
40+
.yarn/build-state.yml
41+
.eslintcache
42+
# testing
43+
coverage
44+
45+
# production
46+
build
47+
48+
#Hardhat files
49+
cache
50+
artifacts
51+
52+
# misc
53+
.DS_Store
54+
.env*
55+
56+
# debug
57+
npm-debug.log*
58+
yarn-debug.log*
59+
yarn-error.log*
60+
61+
.idea
62+
63+
# Local Netlify folder
64+
.netlify
65+
*.tsbuildinfo
66+
*.stackdump

.gitmodules

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[submodule "packages/services/arbitrum"]
2+
path = packages/services/arbitrum
3+
url = https://github.com/OffchainLabs/arbitrum
4+
branch = master
5+
[submodule "packages/services/optimism"]
6+
path = packages/services/optimism
7+
url = https://github.com/ethereum-optimism/optimism
8+
branch = regenesis/0.4.0

.gitpod.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
tasks:
2+
- name: App
3+
init: >
4+
yarn &&
5+
gp sync-done install
6+
command: REACT_APP_PROVIDER=$(gp url 8545) yarn start
7+
- name: Chain
8+
init: gp sync-await install
9+
command: yarn chain
10+
openMode: split-right
11+
- name: Deployment
12+
init: gp sync-await install
13+
command: yarn deploy
14+
openMode: split-right
15+
ports:
16+
- port: 3000
17+
onOpen: open-preview
18+
- port: 8545
19+
onOpen: ignore
20+
github:
21+
prebuilds:
22+
pullRequestsFromForks: true
23+
addComment: true
24+
vscode:
25+
extensions:
26+
- dbaeumer.vscode-eslint
27+
- esbenp.prettier-vscode
28+
- juanblanco.solidity

.vscode/settings.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"solidity.packageDefaultDependenciesDirectory": "node_modules/@scaffold-eth/hardhat/node_modules/",
3+
"solidity-va.test.defaultUnittestTemplate": "hardhat",
4+
"files.exclude": {
5+
"**/.git": true,
6+
"**/.svn": true,
7+
"**/.hg": true,
8+
"**/CVS": true,
9+
"**/.DS_Store": true,
10+
"**/.cache": true,
11+
"**/.vs/": true,
12+
"**/*.cs": true,
13+
"**/*.orig": true,
14+
"**/bin/": true,
15+
"**/build/": true,
16+
"**/debug/": true,
17+
"**/dist/": true,
18+
"**/node_modules/": true,
19+
"**/obj": true,
20+
"yarn-error.log": true,
21+
"**/yarn-error.log": true,
22+
"packages\\eth-hooks/lib": true
23+
},
24+
"explorerExclude.backup": null,
25+
"eslint.workingDirectories": [
26+
27+
{ "directory": "packages/eth-hooks", "changeProcessCWD": true },
28+
{ "directory": "packages/hardhat-ts", "changeProcessCWD": true },
29+
{ "directory": "packages/vite-app-ts", "changeProcessCWD": true },
30+
],
31+
"search.exclude": {
32+
"**/yarn-error.log": true,
33+
"**/yarn.lock": true
34+
}
35+
}

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Austin Griffith 2021
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# 🏗 Scaffold-ETH Typescript
2+
## Typescript
3+
This is the typescript branch of scaffold.eth. The directories that you'll use are:
4+
```
5+
packages/vite-app-ts/
6+
packages/hardhat-ts/
7+
```
8+
All the typescript yarn commands have a postfix of `-ts` See the quick start section for more details
9+
10+
## Overview
11+
12+
> everything you need to build on Ethereum! 🚀
13+
14+
🧪 Quickly experiment with Solidity using a frontend that adapts to your smart contract:
15+
16+
![image](https://user-images.githubusercontent.com/2653167/124158108-c14ca380-da56-11eb-967e-69cde37ca8eb.png)
17+
18+
19+
20+
# 🏄‍♂️ Quick Start
21+
22+
Prerequisites: [Node](https://nodejs.org/en/download/) plus [Yarn](https://classic.yarnpkg.com/en/docs/install/) and [Git](https://git-scm.com/downloads)
23+
24+
25+
> clone/fork 🏗 scaffold-eth:
26+
27+
```bash
28+
git clone https://github.com/austintgriffith/scaffold-eth.git
29+
```
30+
31+
> install and start your 👷‍ Hardhat chain:
32+
33+
```bash
34+
cd scaffold-eth
35+
yarn install
36+
yarn chain-ts
37+
```
38+
39+
> in a second terminal window, start your 📱 frontend:
40+
41+
```bash
42+
cd scaffold-eth
43+
yarn start-ts
44+
```
45+
46+
> in a third terminal window, 🛰 deploy your contract:
47+
48+
```bash
49+
cd scaffold-eth
50+
yarn deploy-ts
51+
```
52+
53+
🔏 Edit your smart contract `YourContract.sol` in `packages/hardhat/contracts`
54+
55+
📝 Edit your frontend `App.jsx` in `packages/react-app/src`
56+
57+
💼 Edit your deployment scripts in `packages/hardhat/deploy`
58+
59+
📱 Open http://localhost:3000 to see the app
60+
61+
# 📚 Documentation
62+
63+
Documentation, tutorials, challenges, and many more resources, visit: [docs.scaffoldeth.io](https://docs.scaffoldeth.io)
64+
65+
# 🔭 Learning Solidity
66+
67+
📕 Read the docs: https://docs.soliditylang.org
68+
69+
📚 Go through each topic from [solidity by example](https://solidity-by-example.org) editing `YourContract.sol` in **🏗 scaffold-eth**
70+
71+
- [Primitive Data Types](https://solidity-by-example.org/primitives/)
72+
- [Mappings](https://solidity-by-example.org/mapping/)
73+
- [Structs](https://solidity-by-example.org/structs/)
74+
- [Modifiers](https://solidity-by-example.org/function-modifier/)
75+
- [Events](https://solidity-by-example.org/events/)
76+
- [Inheritance](https://solidity-by-example.org/inheritance/)
77+
- [Payable](https://solidity-by-example.org/payable/)
78+
- [Fallback](https://solidity-by-example.org/fallback/)
79+
80+
📧 Learn the [Solidity globals and units](https://solidity.readthedocs.io/en/v0.6.6/units-and-global-variables.html)
81+
82+
# 🛠 Buidl
83+
84+
Check out all the [active branches](https://github.com/austintgriffith/scaffold-eth/branches/active), [open issues](https://github.com/austintgriffith/scaffold-eth/issues), and join/fund the 🏰 [BuidlGuidl](https://BuidlGuidl.com)!
85+
86+
87+
- 🚤 [Follow the full Ethereum Speed Run](https://medium.com/@austin_48503/%EF%B8%8Fethereum-dev-speed-run-bd72bcba6a4c)
88+
89+
90+
- 🎟 [Create your first NFT](https://github.com/austintgriffith/scaffold-eth/tree/simple-nft-example)
91+
- 🥩 [Build a staking smart contract](https://github.com/austintgriffith/scaffold-eth/tree/challenge-1-decentralized-staking)
92+
- 🏵 [Deploy a token and vendor](https://github.com/austintgriffith/scaffold-eth/tree/challenge-2-token-vendor)
93+
- 🎫 [Extend the NFT example to make a "buyer mints" marketplace](https://github.com/austintgriffith/scaffold-eth/tree/buyer-mints-nft)
94+
- 🎲 [Learn about commit/reveal](https://github.com/austintgriffith/scaffold-eth/tree/commit-reveal-with-frontend)
95+
- ✍️ [Learn how ecrecover works](https://github.com/austintgriffith/scaffold-eth/tree/signature-recover)
96+
- 👩‍👩‍👧‍👧 [Build a multi-sig that uses off-chain signatures](https://github.com/austintgriffith/scaffold-eth/tree/meta-multi-sig)
97+
-[Extend the multi-sig to stream ETH](https://github.com/austintgriffith/scaffold-eth/tree/streaming-meta-multi-sig)
98+
- ⚖️ [Learn how a simple DEX works](https://medium.com/@austin_48503/%EF%B8%8F-minimum-viable-exchange-d84f30bd0c90)
99+
- 🦍 [Ape into learning!](https://github.com/austintgriffith/scaffold-eth/tree/aave-ape)
100+
101+
# 💬 Support Chat
102+
103+
Join the telegram [support chat 💬](https://t.me/joinchat/KByvmRe5wkR-8F_zz6AjpA) to ask questions and find others building with 🏗 scaffold-eth!
104+
105+
---
106+
107+
🙏 Please check out our [Gitcoin grant](https://gitcoin.co/grants/2851/scaffold-eth) too!

0 commit comments

Comments
 (0)