Skip to content

Commit

Permalink
Mostly working example on hyperspace
Browse files Browse the repository at this point in the history
  • Loading branch information
Alison Haire authored and Alison Haire committed Jan 22, 2023
1 parent 4cc88f5 commit 663675b
Show file tree
Hide file tree
Showing 44 changed files with 9,839 additions and 1,981 deletions.
17 changes: 16 additions & 1 deletion READMEapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Lessons in this build
Hardhat

1. Tasks in Hardhat are super versatile
2.
2. Still to learn:
3. hardhat network config
4. specific return meanings

NextJS

Expand All @@ -22,3 +24,16 @@ Typescript:
- A ReactElement is an object with a type and props.
- A ReactNode is a ReactElement, a ReactFragment, a string, a number or an array of ReactNodes, or null, or undefined, or a boolean:
- the render methods of class components return ReactNode, but function components return ReactElement

Javascript things

1. async await with timeout's are still a bit of a mystery - but i don't think you can use timeout in a chain and so need to write the request differently
2.

app bugslist

- text is non-responsive
- needs re-engineering for modularity
- typescript not enforced
- no error checking on wallet
- minting takes forever... make a loading component on a timer that says different things (takes an array and cycles through)
13 changes: 13 additions & 0 deletions READMEhardhat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Sample Hardhat Project

This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract.

Try running some of the following tasks:

```shell
npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.ts
```
14 changes: 10 additions & 4 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,22 @@ if (!walletPrivateKey) {

const config: HardhatUserConfig = {
solidity: '0.8.17',
defaultNetwork: 'ethGoerli',
defaultNetwork: 'filecoinWallaby',
networks: {
hardhat: {},
filecoinWallaby: {
url: 'https://wallaby.node.glif.io/rpc/v0',
chainId: 31415,
accounts: [process.env.WALLET_PRIVATE_KEY ?? 'undefined'],
httpHeaders: {},
//explorer: https://wallaby.filscan.io/ and starboard
},
filecoinHyperspace: {
url: 'https://api.hyperspace.node.glif.io/rpc/v1', //https://beryx.zondax.ch/
chainId: 3141,
accounts: [process.env.WALLET_PRIVATE_KEY ?? 'undefined'],
//faucet: https://hyperspace.yoga/#faucet
//info: https://github.com/filecoin-project/testnet-hyperspace,
//explorer: glif, filfox??
},
ethGoerli: {
url: 'https://eth-goerli.g.alchemy.com/v2/S4Rrp2eHb-xk5dxnNQygNcv-QfPmzTXX',
Expand All @@ -65,8 +73,6 @@ const config: HardhatUserConfig = {
// },
},
paths: {
sources: './pages/api/hardhat/contracts',
artifacts: './pages/api/hardhat/artifacts',
root: './pages/api/hardhat',
tests: './pages/api/hardhat/tests', //who names a directory in the singular?!!!
cache: './pages/api/hardhat/cache',
Expand Down
17 changes: 17 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'example.com',
port: '',
pathname: '/.ipfs.nftstorage.link/**',
},
],
},
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback.fs = false;
}

return config;
},
};

module.exports = nextConfig;
Loading

0 comments on commit 663675b

Please sign in to comment.