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 core mainnet #126

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 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
18 changes: 18 additions & 0 deletions src/plugins/oSnap/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,15 @@ export const contractData = [
'https://api.thegraph.com/subgraphs/name/umaprotocol/avalanche-optimistic-oracle-v3',
deployBlock: 27816737
},
{
// core
network: '1116',
name: 'OptimisticOracleV3',
address: '0xD84ACa67d683aF7702705141b3C7E57e4e5e7726',
subgraph:
'https://thegraph.coredao.org/subgraphs/name/umaprotocol/core-optimistic-oracle-v3',
deployBlock: 11341063
},
{
// mainnet
network: '1',
Expand Down Expand Up @@ -1480,6 +1489,15 @@ export const contractData = [
deployBlock: 28050250,
subgraph:
'https://api.thegraph.com/subgraphs/name/umaprotocol/avalanche-optimistic-governor'
},
{
// core
network: '1116',
name: 'OptimisticGovernor',
address: '0x596Fd6A5A185c67aBD1c845b39f593fBA9C233aa',
deployBlock: 11341122,
subgraph:
'https://thegraph.coredao.org/subgraphs/name/umaprotocol/core-optimistic-governor'
}
] as const;

Expand Down
10 changes: 10 additions & 0 deletions src/plugins/oSnap/utils/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ const BNB_COIN = {
logoUri:
'https://safe-transaction-assets.safe.global/chains/56/currency_logo.png'
} as const;
const CORE_COIN = {
name: 'Core',
symbol: 'CORE',
address: 'main',
decimals: 18,
logoUri:
'https://cloudflare-ipfs.com/ipfs/bafkreigjv5yb7uhlrryzib7j2f73nnwqan2tmfnwjdu26vkk365fyesoiu'
} as const;

export function getNativeAsset(network: Network) {
switch (parseInt(network)) {
Expand All @@ -55,6 +63,8 @@ export function getNativeAsset(network: Network) {
return EWC_COIN;
case 56:
return BNB_COIN;
case 1116:
return CORE_COIN;
}

return ETHEREUM_COIN;
Expand Down
22 changes: 21 additions & 1 deletion src/plugins/safeSnap/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export const EIP3770_PREFIXES = {
246: 'ewt',
73799: 'vt',
42161: 'arb1',
137: 'matic'
137: 'matic',
1116: 'core'
};

export const EXPLORER_API_URLS = {
Expand Down Expand Up @@ -348,6 +349,7 @@ export const MULTI_SEND_V1_3_0 = {
'288': '0x998739BFdAAdde7C933B942a68053933098f9EDa',
'588': '0x998739BFdAAdde7C933B942a68053933098f9EDa',
'1088': '0x998739BFdAAdde7C933B942a68053933098f9EDa',
'1116': '0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761',
'1285': '0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761',
'1287': '0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761',
'4002': '0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761',
Expand Down Expand Up @@ -460,6 +462,15 @@ export const contractData: ContractData[] = [
'https://api.thegraph.com/subgraphs/name/umaprotocol/avalanche-optimistic-oracle-v3',
deployBlock: 27816737
},
{
// core
network: '43114',
name: 'OptimisticOracleV3',
address: '0xD84ACa67d683aF7702705141b3C7E57e4e5e7726',
subgraph:
'https://thegraph.coredao.org/subgraphs/name/umaprotocol/core-optimistic-oracle-v3',
deployBlock: 11341063
},
{
// mainnet
network: '1',
Expand Down Expand Up @@ -523,5 +534,14 @@ export const contractData: ContractData[] = [
deployBlock: 28050250,
subgraph:
'https://api.thegraph.com/subgraphs/name/umaprotocol/avalanche-optimistic-governor'
},
{
// core
network: '1116',
name: 'OptimisticGovernor',
address: '0x596Fd6A5A185c67aBD1c845b39f593fBA9C233aa',
deployBlock: 11341122,
subgraph:
'https://thegraph.coredao.org/subgraphs/name/umaprotocol/core-optimistic-governor'
}
];
12 changes: 11 additions & 1 deletion src/plugins/safeSnap/utils/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ const BNB_COIN: TokenAsset = {
logoUri:
'https://safe-transaction-assets.safe.global/chains/56/currency_logo.png'
};
const CORE_COIN: TokenAsset = {
name: 'Core',
symbol: 'CORE',
address: 'main',
decimals: 18,
logoUri:
'https://cloudflare-ipfs.com/ipfs/bafkreigjv5yb7uhlrryzib7j2f73nnwqan2tmfnwjdu26vkk365fyesoiu'
};

export function getNativeAsset(network: Network) {
switch (parseInt(network)) {
Expand All @@ -53,7 +61,9 @@ export function getNativeAsset(network: Network) {
return EWC_COIN;
case 56:
return BNB_COIN;
}
case 1116:
return CORE_COIN;
}

return ETHEREUM_COIN;
}
Loading