-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #242 from skalenetwork/beta
Metaport 2.0.2 Stable build
- Loading branch information
Showing
11 changed files
with
128 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* @license | ||
* SKALE Metaport | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** | ||
* @file Transactions.ts | ||
* @copyright SKALE Labs 2023-Present | ||
*/ | ||
|
||
import { type TransactionResponse } from 'ethers'; | ||
|
||
export interface TxResponse { | ||
status: boolean | ||
err: TxResponseError | undefined | ||
response: TransactionResponse | undefined | ||
} | ||
|
||
export interface TxResponseError { | ||
name: string | ||
msg: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* @license | ||
* SKALE Metaport | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** | ||
* @file transactions.ts | ||
* @copyright SKALE Labs 2023-Present | ||
*/ | ||
|
||
import { type TransactionResponse } from 'ethers'; | ||
import { TRANSFER_ERROR_MSG } from './constants' | ||
import { TxResponse } from './interfaces' | ||
|
||
|
||
export async function sendTransaction(func: any, args: any[]): Promise<TxResponse> { | ||
try { | ||
const response: TransactionResponse = await func(...args) | ||
await response.wait() | ||
return { status: true, err: undefined, response: response } | ||
} catch (err) { | ||
console.error(err) | ||
const msg = err.message | ||
let name | ||
if (err.code && err.code === 'ACTION_REJECTED') { | ||
name = 'Transaction signing was rejected' | ||
} else { | ||
name = TRANSFER_ERROR_MSG | ||
} | ||
if (err.info && err.info.error && err.info.error.data && err.info.error.data.message) { | ||
name = err.info.error.data.message | ||
} | ||
if (err.shortMessage) { | ||
name = err.shortMessage | ||
} | ||
return { status: false, err: { name, msg }, response: undefined } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"mainnet": "mainnet.skalenodes.com", | ||
"staging": "staging-v3.skalenodes.com", | ||
"legacy": "legacy-proxy.skalenodes.com/", | ||
"regression": "https://regression-proxy.skalenodes.com/", | ||
"legacy": "legacy-proxy.skalenodes.com", | ||
"regression": "regression-proxy.skalenodes.com", | ||
"qatestnet": "new-testnet-proxy.skalenodes.com" | ||
} |
583ff28
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
metaport – ./
metaport-skale-network.vercel.app
metaport-gamma.vercel.app
metaport-git-stable-skale-network.vercel.app