Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support to the optimistic governor in base #162

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/plugins/oSnap/components/Input/SelectSafe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ const isModalOpen = ref(false);
<div class="mb-2">
<TuneButtonSelect
:model-value="
safes.find(safe => safe.safeAddress === selectedSafe?.safeAddress)
?.safeName || 'Select Safe'
safes.find(
safe =>
safe.safeAddress === selectedSafe?.safeAddress &&
safe.network === selectedSafe.network
)?.safeName || 'Select Safe'
"
@select="isModalOpen = true"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ function makeSafeDescription(safe: GnosisSafe) {
<div class="mx-0 my-4 flex flex-col space-y-3 md:mx-4">
<button v-for="(safe, key) in safes" :key="key" @click="select(safe)">
<BaseModalSelectItem
:selected="safe.safeAddress === selected?.safeAddress"
:selected="
safe.safeAddress === selected?.safeAddress &&
safe.network === selected.network
"
:title="safe.safeName"
:description="makeSafeDescription(safe)"
/>
Expand Down
21 changes: 21 additions & 0 deletions src/plugins/oSnap/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,7 @@ export const EXPLORER_API_URLS = {
'137': 'https://api.polygonscan.com/api',
'56': 'https://api.bscscan.com/api',
'42161': 'https://api.arbiscan.io/api',
'8453' : 'https://api.basescan.org/api',
// '1116': Add 'https://openapi.coredao.org/api' if API key requirement is removed
'11155111': 'https://api-sepolia.etherscan.io/api',
} as const;
Expand All @@ -1116,6 +1117,7 @@ export const GNOSIS_SAFE_TRANSACTION_API_URLS = {
'5': 'https://safe-transaction-goerli.safe.global/api',
'10': 'https://safe-transaction-optimism.safe.global/api',
'100': 'https://safe-transaction-gnosis-chain.safe.global/api',
'8453': 'https://safe-transaction-base.safe.global/api',
'73799': 'https://safe-transaction-volta.safe.global/api',
'246': 'https://safe-transaction-ewc.safe.global/api',
'137': 'https://safe-transaction-polygon.safe.global/api',
Expand All @@ -1135,6 +1137,7 @@ export const SAFE_APP_URLS = {
'56': 'https://app.safe.global/apps/open',
'42161': 'https://app.safe.global/apps/open',
'1116': 'https://safe.coredao.org/apps/open',
'8453': 'https://app.safe.global/apps/open',
'11155111': 'https://app.safe.global/apps/open',
} as const;

Expand Down Expand Up @@ -1445,6 +1448,15 @@ export const contractData = [
'https://thegraph.coredao.org/subgraphs/name/umaprotocol/core-optimistic-oracle-v3',
deployBlock: 11341063
},
{
// base
network: '8453',
name: 'OptimisticOracleV3',
address: '0x2aBf1Bd76655de80eDB3086114315Eec75AF500c',
subgraph:
'https://api.studio.thegraph.com/query/1057/base-optimistic-oracle-v3/version/latest',
deployBlock: 12066343
},
{
// sepolia
network: '11155111',
Expand Down Expand Up @@ -1527,6 +1539,15 @@ export const contractData = [
subgraph:
'https://thegraph.coredao.org/subgraphs/name/umaprotocol/core-optimistic-governor'
},
{
// base
network: '8453',
name: 'OptimisticGovernor',
address: '0x80bCA2E1c272239AdFDCdc87779BC8Af6E12e633',
deployBlock: 13062540,
subgraph:
'https://api.studio.thegraph.com/query/1057/base-optimistic-governor/version/latest'
},
{
// sepolia
network: '11155111',
Expand Down
21 changes: 20 additions & 1 deletion src/plugins/safeSnap/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ export const MULTI_SEND_V1_3_0 = {
'1285': '0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761',
'1287': '0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761',
'4002': '0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761',
'8453': '0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761',
'42161': '0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761',
'42220': '0x998739BFdAAdde7C933B942a68053933098f9EDa',
'43114': '0x998739BFdAAdde7C933B942a68053933098f9EDa',
Expand Down Expand Up @@ -400,7 +401,7 @@ export type ContractData = {
network: string;
name: string;
address?: string;
deployBlockNumber?: number;
deployBlock?: number;
subgraph?: string;
};
// contract addresses pulled from https://github.com/UMAprotocol/protocol/tree/master/packages/core/networks
Expand Down Expand Up @@ -477,6 +478,15 @@ export const contractData: ContractData[] = [
'https://thegraph.coredao.org/subgraphs/name/umaprotocol/core-optimistic-oracle-v3',
deployBlock: 11341063
},
{
// base
network: '8453',
name: 'OptimisticOracleV3',
address: '0x2aBf1Bd76655de80eDB3086114315Eec75AF500c',
subgraph:
'https://api.studio.thegraph.com/query/1057/base-optimistic-oracle-v3/version/latest',
deployBlock: 12066343
},
{
// sepolia
network: '11155111',
Expand Down Expand Up @@ -559,6 +569,15 @@ export const contractData: ContractData[] = [
subgraph:
'https://thegraph.coredao.org/subgraphs/name/umaprotocol/core-optimistic-governor'
},
{
// base
network: '8453',
name: 'OptimisticGovernor',
address: '0x80bCA2E1c272239AdFDCdc87779BC8Af6E12e633',
deployBlock: 13062540,
subgraph:
'https://api.studio.thegraph.com/query/1057/base-optimistic-governor/version/latest'
},
{
// sepolia
network: '11155111',
Expand Down
Loading