Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diewland/abstract-101
Learn how to build and deploy smart contracts on Abstract Chain.
https://github.com/diewland/abstract-101
Last synced: 2 days ago
JSON representation
Learn how to build and deploy smart contracts on Abstract Chain.
- Host: GitHub
- URL: https://github.com/diewland/abstract-101
- Owner: diewland
- License: mit
- Created: 2024-08-28T16:08:17.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-10-17T02:40:23.000Z (29 days ago)
- Last Synced: 2024-10-19T05:02:15.080Z (27 days ago)
- Language: Solidity
- Homepage:
- Size: 350 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Abstract 101
Learn how to build and deploy smart contracts on Abstract Chain.### Prerequisites
* [Git v2.0.0+](https://git-scm.com/downloads)
* [Node.js v18.0.0+](https://nodejs.org/en/download/package-manager)### 1. Checkout code
```sh
git clone https://github.com/diewland/abstract-101.git && cd abstract-101
```### 2. Install dependencies
```sh
npm install
```
### 3. Create `.env` file
⚠️ DO NOT USE A PRIVATE KEY ASSOCIATED WITH REAL FUNDS. CREATE A NEW WALLET FOR THIS STEP.
```sh
PRIVATE_KEY=''
```### 4. Update wallet address on deploy script
`deploy/deploy.ts` line 22
```ts
19
20 // Deploy this contract. The returned object will be of a `Contract` type,
21 // similar to the ones in `ethers`.
22 const tokenContract = await deployer.deploy(artifact, [ "" ]);
23
```### 5. Compile contract
```sh
npx hardhat compile --network abstractTestnet
```### 6. Deploy contract
```sh
npx hardhat deploy-zksync --script deploy.ts --network abstractTestnet
```
output will be like this, `CONTRACT_ADDRESS` will be used in the next step
```sh
HelloABS was deployed to
```### 7. Verify contract
```sh
npx hardhat verify --network abstractTestnet
```### 8. Interact with contract
[click](https://github.com/diewland/abstract-101/tree/master/contracts)### References
* https://hardhat.org/hardhat-runner/docs/getting-started
* https://docs.abs.xyz/build-on-abstract/smart-contracts/hardhat