Skip to content

Commit

Permalink
docs: update README.md (#264)
Browse files Browse the repository at this point in the history
* docs: update README.md

* format: prettier
  • Loading branch information
Elvis339 authored Apr 18, 2023
1 parent 55a2323 commit 9b57feb
Showing 1 changed file with 10 additions and 94 deletions.
104 changes: 10 additions & 94 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,19 @@
# Golden Smart Contracts
# Golden.xyz

- Managed with [Hardhat](https://hardhat.org/getting-started/) and [Hardhat Deploy](https://github.com/wighawag/hardhat-deploy)
Contracts to support Golden's decentralized protocol for knowledge. These contracts are in the R&D phase. [Learn More.](https://docs.golden.xyz/)

## Development

First install dependencies

```
yarn
```

To reset your types and hardhat cache

```
yarn compile
```

For local development you shouldn't need anything else.

## Test
# Contributions

Run tests with

```
yarn test
```
Contributions are welcomed and encouraged! You can contribute by:

In order to deploy to a testnet you'll need to setup some env variables.
Copy `.env.example` to `.env` and supply necessary variables as follows:

#### `ETHERSCAN_API_KEY`

You'll need to signup for an account here: https://etherscan.io/register and then get your api key here: https://etherscan.io/myapikey

#### `[SEPOLIA|GOERLI|POLYGON|MUMBAI|ETC]_URL`

This is a 3rd party node provider RPC url. You can set up an account at https://Alchemy.io.

#### `PRIVATE_KEY`

This is the private key to an account you want to use for deploy.

#### `REPORT_GAS`

This boolean determines whether to calculate gas costs for deployment of contracts.

##### `Deploy Sepolia: `

Latest deployed contracts details are stored in `deployments/` for each network that has been deployed to. The main file of interest is the `*.json` of a contract which has it's address.
To deploy to Sepolia testnet run:

```
npx hardhat deploy --network sepolia
```
- Creating an issue
- Opening a PR. If you are opening a PR, it is a good idea to first join our [Discord](https://discord.com/invite/golden-protocol) and discuss your idea!

To get the deployed contract verified with etherscan run

```
npx hardhat verify <contract_address> --network sepolia
```

To get the deployed contract with constructor arguments verified with etherscan run

```
npx hardhat verify --constructor-args arguments.js <contract_address> --network sepolia
```

where arguments.js is just a file returning an array of arguments `module.exports = ["0xabcdef", 51];`

##### `Deploy Arbitrum Goerli: `

_Only for NFT contracts_
Same commands but with network: arbitrumGoerli

## GoldenToken
## Development

Guide to get verified for thumbnail and other metadata [here](https://info.etherscan.com/token-update-guide/)
1. `yarn install`
2. `yarn compile`
3. Run tests `yarn test`

## Upgrades

Expand All @@ -86,28 +24,6 @@ Upgrades are dealt with automatically, just make a change in the contract and de

Once the contract is deployed you can interact with it. <br />These commands will use the address set in the `hardhat.config.ts` as the signer. <br />By default it's the same address that deployed the contract (owner).

## Staking

_These tasks will only work if your deployer owns the contract_

#### `sendToken`

```
npx hardhat sendToken --network hardhat --to 0xB9563F6aEd9a3986Fe0e4B57cA1Af40dBD7F7720 --amount 10
```

#### `slash`

```
npx hardhat slash --network hardhat --account 0xB9563F6aEd9a3986Fe0e4B57cA1Af40dBD7F7720 --amount 10
```

#### `stake`

```
npx hardhat stake --network hardhat --amount 10
```

### Schema governance proposals

#### `addPredicate`
Expand Down

0 comments on commit 9b57feb

Please sign in to comment.