Skip to content

Instantly share code, notes, and snippets.

View zed-wong's full-sized avatar
😵‍💫
Tired

Zed Wong zed-wong

😵‍💫
Tired
View GitHub Profile
@zed-wong
zed-wong / mixin-unique-conversation-id.go
Created June 29, 2023 03:28
mixin-unique-conversation-id
//https://go.dev/play/
package main
import (
"crypto/md5"
"io"
"strings"
"github.com/gofrs/uuid"
)
@zed-wong
zed-wong / aragon_zh_common.json
Created May 18, 2023 14:54
Chinese translation file for Aragon front end app
{
"testnetIndicator": "测试网激活",
"menu": "菜单",
"navLinks": {
"dashboard": "仪表盘",
"governance": "治理",
"finance": "财务",
"community": "社区",
"explore": "探索",
"learn": "学习",
@zed-wong
zed-wong / aragon_sdk_1.6.0_modify.md
Last active May 22, 2023 02:43
aragon_sdk_1.6.0_modify.md

package.json:

  • yarn add @mixinao/osx-ethers
  • replace @aragon/osx-ethers to @mixinao/osx-ethers

modules/client/src/client-common/constants.ts:

  • Add MVMProvider
export const MVMProvider = new JsonRpcProvider('https://geth.mvm.dev', {
  chainId: 73927,
  name: 'mvm',
@zed-wong
zed-wong / aragon_sdk_1.3.1_modify.md
Last active May 18, 2023 09:37
aragon_sdk_1.3.1_modify.md
  • package.json

yarn add @mixinao/osx-ethers

  • replace @aragon/osx-ethers to @mixinao/osx-ethers

  • modules/client/src/client-common/constants.ts:

Add

@zed-wong
zed-wong / aragon_frontend_edit.md
Last active May 23, 2023 11:53
aragon_frontend_modify
  • Add '@mixinao/sdk-client' to package.json

replace @aragon/sdk-client:

  • packages/web-app/src/context/providers.tsx
  • packages/web-app/src/hooks/useClient.tsx
  • packages/web-app/src/hooks/usePluginClient.tsx
  • packages/web-app/src/hooks/useDaoDetails.tsx
  • packages/web-app/src/hooks/useDaos.tsx
  • packages/web-app/src/hooks/useWallet.tsx
  • packages/web-app/src/hooks/useWalletCanVote.tsx
@zed-wong
zed-wong / verify_aragon_contracts.sh
Created May 12, 2023 16:41
Verify aragon contracts
npx hardhat verify --network mvm "0xe06aD15c6441850313D30692B4177CabbeE435F5"
npx hardhat verify --network mvm "0x2aaf3c1019FcaC45CBf00171c80aA89c88c243Db"
npx hardhat verify --network mvm "0xB269b926d06186dA332DED7d9229becfdbDA6b72"
npx hardhat verify --network mvm "0xA71697E970c5AC213D69853fc12EABcdD7B7231f" "0xB269b926d06186dA332DED7d9229becfdbDA6b72" "0x0000000000000000000000000000000000000000"
# PublicResolver: ENSRegistry NULL_ADDRESS
npx hardhat verify --network mvm "0x0E0317C7212dD4823A9CCE526A6c52F038fEAF80"
npx hardhat verify --network mvm "0xeBF8738a3De1b3Dd846613bfBFC030E921CbDA03"
npx hardhat verify --network mvm "0xc07A25Cbd7b778352b32Fc9B066Cb95616C8D5df"
npx hardhat verify --network mvm "0x1BF09A650d53324b3617dE71Aa455E2b92399EfC"
npx hardhat verify --network mvm "0x94A72fbF4527c8942563434f79B34A3e95140C9B"
@zed-wong
zed-wong / deploy_aragon_log.log
Created May 12, 2023 07:06
deploy aragon log
2023.05.12
# whoami @ Surface in ~/dev/aragon/v2/osx/packages/contracts on git:develop x [14:58:29]
$ yarn deploy --network mvm --reset
yarn run v1.22.17
$ hardhat deploy --network mvm --reset
Nothing to compile
No need to generate any newer typings.
Deploying ManagingDao.
@zed-wong
zed-wong / aragon_ens_debug.md
Created May 11, 2023 12:19
Aragon ens debug

Error:

POST https://geth.mvm.dev/

{"method":"eth_call","params":[{"to":"0x8a38cb623199a4647754dab8ff751001b081e2b0","data":"0x0178b8bf970f805f2000a67797a92296777b123ab29e0e9bcfd5eb206d96ee84fea3b1bf"},"latest"],"id":45,"jsonrpc":"2.0"}

{"jsonrpc":"2.0","id":45,"result":"0x0000000000000000000000000000000000000000000000000000000000000000"}

The address is ENSRegistry, so it's an ENS error. I don't know what happens after the deployment of a DAO, so I checked DAOFactory.

@zed-wong
zed-wong / gh-pages-deploy.md
Created April 29, 2023 01:12 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@zed-wong
zed-wong / nginx-https-graph-node.conf
Created April 27, 2023 06:17
Nginx conf for setting up https for graph node
server {
listen 80;
server_name graph.mvg.finance;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name graph.mvg.finance;