Skip to content

Commit

Permalink
[AUD-726] Ask for create sender attestation on registration (#117)
Browse files Browse the repository at this point in the history
* [AUD-726] Ask for attestation on registration

* Clean up

* Update comment

* Fix 3box dep

* Bump libs

* Remove unused

* Update env
  • Loading branch information
raymondjacobson authored and michellebrier committed Oct 9, 2023
1 parent 2da8360 commit ee64084
Show file tree
Hide file tree
Showing 8 changed files with 470 additions and 1,855 deletions.
11 changes: 11 additions & 0 deletions packages/protocol-dashboard/.env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,14 @@ REACT_APP_GQL_URI=https://gateway.thegraph.com/api/372f3681a94e4a45867d46cf59423
REACT_APP_GQL_BACKUP_URI=https://api.thegraph.com/subgraphs/name/audius-infra/audius-network-mainnet

REACT_APP_IDENTITY_SERVICE_ENDPOINT=https://identityservice.audius.co

REACT_APP_SOLANA_WEB3_CLUSTER=mainnet-beta
REACT_APP_SOLANA_CLUSTER_ENDPOINT=https://audius.rpcpool.com
REACT_APP_WAUDIO_MINT_ADDRESS=9LzCMqDgTKYz9Drzqnpgee3SGa89up3a247ypMj2xrqM
REACT_APP_SOLANA_TOKEN_PROGRAM_ADDRESS=TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
REACT_APP_CLAIMABLE_TOKEN_PDA=5ZiE3vAkrdXBgyFL7KqG3RoEGBws4CjRcXVbABDLZTgx
REACT_APP_SOLANA_FEE_PAYER_ADDRESS=CgJhbUdHQNN5HBeNEN7J69Z89emh6BtyYX1CPEGwaeqi
REACT_APP_CLAIMABLE_TOKEN_PROGRAM_ADDRESS=Ewkv3JahEFRKkcJmpoKB7pXbnUHwjAyXiwEo4ZY2rezQ
REACT_APP_REWARDS_MANAGER_PROGRAM_ID=DDZDcYdQFEMwcu2Mwo75yGFjJ1mUQyyXLWzhZLEVFcei
REACT_APP_REWARDS_MANAGER_PROGRAM_PDA=71hWFVYokLaN1PNYzTAWi13EfJ7Xt9VbSWUKsXUT8mxE
REACT_APP_REWARDS_MANAGER_TOKEN_PDA=3V9opXNpHmPPymKeq7CYD8wWMH8wzFXmqEkNdzfsZhYq
11 changes: 11 additions & 0 deletions packages/protocol-dashboard/.env.stage
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,14 @@ REACT_APP_AUDIUS_URL=https://staging.audius.co
REACT_APP_GQL_URI=https://api.thegraph.com/subgraphs/name/audius-infra/audius-network-ropsten

REACT_APP_IDENTITY_SERVICE_ENDPOINT=https://identityservice.staging.audius.co

REACT_APP_SOLANA_WEB3_CLUSTER=mainnet-beta
REACT_APP_SOLANA_CLUSTER_ENDPOINT=https://audius.rpcpool.com
REACT_APP_WAUDIO_MINT_ADDRESS=BELGiMZQ34SDE6x2FUaML2UHDAgBLS64xvhXjX5tBBZo
REACT_APP_SOLANA_TOKEN_PROGRAM_ADDRESS=TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
REACT_APP_CLAIMABLE_TOKEN_PDA=Aw5AjygeMf9Nvg61BXvFSAzkqxcLqL8koepb14kvfc3W
REACT_APP_SOLANA_FEE_PAYER_ADDRESS=E3CfijtAJwBSHfwFEViAUd3xp7c8TBxwC1eXn1Fgxp8h
REACT_APP_CLAIMABLE_TOKEN_PROGRAM_ADDRESS=2sjQNmUfkV6yKKi4dPR8gWRgtyma5aiymE3aXL2RAZww
REACT_APP_REWARDS_MANAGER_PROGRAM_ID=CDpzvz7DfgbF95jSSCHLX3ERkugyfgn9Fw8ypNZ1hfXp
REACT_APP_REWARDS_MANAGER_PROGRAM_PDA=GaiG9LDYHfZGqeNaoGRzFEnLiwUT7WiC6sA6FDJX9ZPq
REACT_APP_REWARDS_MANAGER_TOKEN_PDA=HJQj8P47BdA7ugjQEn45LaESYrxhiZDygmukt8iumFZJ
3 changes: 2 additions & 1 deletion packages/protocol-dashboard/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ eth-contracts-ganache-accounts.json
.DS_Store
.env.local
.env.development.local
.env.dev.local
.env.test.local
.env.production.local

Expand All @@ -31,4 +32,4 @@ yarn-error.log*

.vscode/**

.idea
.idea
41 changes: 35 additions & 6 deletions packages/protocol-dashboard/configureLocalEnv.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
const AUDIUS_CONFIG = '.audius/config.json'
const AUDIUS_ETH_CONFIG = '.audius/eth-config.json'
const AUDIUS_SOL_CONFIG = '.audius/solana-program-config.json'

const fs = require('fs')
const path = require('path')
const homeDir = require('os').homedir()
try {
const configFile = require(path.join(homeDir, AUDIUS_CONFIG))
console.log(configFile)
const ethConfigFile = require(path.join(homeDir, AUDIUS_ETH_CONFIG))
const solConfigFile = require(path.join(homeDir, AUDIUS_SOL_CONFIG))
console.log(configFile)
console.log(ethConfigFile)
console.log(solConfigFile)

const remoteHost = process.env.AUDIUS_REMOTE_DEV_HOST
const localhost = 'localhost'
Expand All @@ -30,7 +33,23 @@ try {
const REACT_APP_ETH_PROVIDER_URL = `http://${host}:8546`
const REACT_APP_ETH_TOKEN_ADDRESS = ethConfigFile.audiusTokenAddress
const REACT_APP_ETH_OWNER_WALLET = ethConfigFile.ownerWallet
const REACT_APP_ETH_NETWORK_ID = 1602058537970
// Chain id is 1337 for local eth ganache because we are ... leet
const REACT_APP_ETH_NETWORK_ID = 1337

const REACT_APP_CLAIMABLE_TOKEN_PROGRAM_ADDRESS =
solConfigFile.claimableTokenAddress
const REACT_APP_REWARDS_MANAGER_PROGRAM_ID =
solConfigFile.rewardsManagerAddress
const REACT_APP_REWARDS_MANAGER_PROGRAM_PDA =
solConfigFile.rewardsManagerAccount
const REACT_APP_REWARDS_MANAGER_TOKEN_PDA =
solConfigFile.rewardsManagerTokenAccount
const REACT_APP_SOLANA_TOKEN_PROGRAM_ADDRESS =
'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'
const REACT_APP_SOLANA_WEB3_CLUSTER = 'devnet'
const REACT_APP_SOLANA_CLUSTER_ENDPOINT = `http://${host}:8899`
const REACT_APP_WAUDIO_MINT_ADDRESS = solConfigFile.splToken
const REACT_APP_SOLANA_FEE_PAYER_ADDRESS = solConfigFile.feePayerWalletPubkey

const REACT_APP_AUDIUS_URL = `http://${host}:3000`
const REACT_APP_GQL_URI = `http://${host}:8000/subgraphs/name/AudiusProject/audius-subgraph`
Expand Down Expand Up @@ -58,6 +77,16 @@ try {
REACT_APP_ETH_OWNER_WALLET=${REACT_APP_ETH_OWNER_WALLET}
REACT_APP_ETH_NETWORK_ID=${REACT_APP_ETH_NETWORK_ID}
REACT_APP_CLAIMABLE_TOKEN_PROGRAM_ADDRESS=${REACT_APP_CLAIMABLE_TOKEN_PROGRAM_ADDRESS}
REACT_APP_SOLANA_TOKEN_PROGRAM_ADDRESS=${REACT_APP_SOLANA_TOKEN_PROGRAM_ADDRESS}
REACT_APP_SOLANA_CLUSTER_ENDPOINT=${REACT_APP_SOLANA_CLUSTER_ENDPOINT}
REACT_APP_SOLANA_WEB3_CLUSTER=${REACT_APP_SOLANA_WEB3_CLUSTER}
REACT_APP_WAUDIO_MINT_ADDRESS=${REACT_APP_WAUDIO_MINT_ADDRESS}
REACT_APP_SOLANA_FEE_PAYER_ADDRESS=${REACT_APP_SOLANA_FEE_PAYER_ADDRESS}
REACT_APP_REWARDS_MANAGER_PROGRAM_ID=${REACT_APP_REWARDS_MANAGER_PROGRAM_ID}
REACT_APP_REWARDS_MANAGER_PROGRAM_PDA=${REACT_APP_REWARDS_MANAGER_PROGRAM_PDA}
REACT_APP_REWARDS_MANAGER_TOKEN_PDA=${REACT_APP_REWARDS_MANAGER_TOKEN_PDA}
REACT_APP_AUDIUS_URL=${REACT_APP_AUDIUS_URL}
REACT_APP_GQL_URI=${REACT_APP_GQL_URI}
Expand All @@ -66,15 +95,15 @@ try {

// Note .env.development.local takes precidence over .env.development
// https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables
fs.writeFile('./.env.development.local', contents, err => {
fs.writeFile('./.env.dev.local', contents, err => {
if (err) {
console.error(err)
}
console.log('Configured .env.development.local')
console.log('Configured .env.dev.local')
})
} catch (e) {
console.error(`
Did not find ~/${AUDIUS_CONFIG} configuration file.
Did not find configuration file.
See https://github.com/AudiusProject/audius-e2e-tests to configure a local dev environment.
`)
`, e)
}
Loading

0 comments on commit ee64084

Please sign in to comment.