-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add metaforra.com futuructa game into a project list (#299) (cherry picked from commit 4948d37) * Sentry Update: (#305) 0. update sentry packages. 1. Setup sentry as wrapper 2. Added React Errorboundry to capture the react errors. 3. Sentry inititions will be block if there is no env pass 4. Ignore error from MM, JsonRPC, Chrome, Extension, Browser Console 5. Filtering http breadcrum from event before sending 6. disable sentry on localhost. (cherry picked from commit bb97d7f) * Support bobascan (#300) (cherry picked from commit 454eaa4) * [Gateway] : URL subpages (#322) Url Subpages so we can provide the link to the subpages and SEO specific improvement, (cherry picked from commit 3b96718) * Layer Zero monitor (#337) * cherry pick * Add AltL1 listen * only monitor current chain * Change to yarn try * Add layer zero addresses * Adjust with new addresss file * Update table name Co-authored-by: cby3149 <[email protected]> (cherry picked from commit 572be9b) * Add unpause function (#344) (cherry picked from commit 5edb00e) * Add CGT token in gateway (#345) (cherry picked from commit a8b22db) * Improve monitor service (#167) * Improve monitor * Reduce logs * Fix bug * Fix error * Reduce log * Fix timestamp issue * Add BobaStraw record * Fix bug * Fix BigNumber * Export logs * Update variable names and add them to docs * Store data into MySQL * Fix db query * Update variable names * Fix a special case caused by across bridge * Update submission time * Add logs * Stabilize integration tests * Update batch serialization test * Simplified code Co-authored-by: CAPtheorem <[email protected]> (cherry picked from commit bdf1c39) * Add Rabby Wallet (#311) (cherry picked from commit 9284d63) * Adding Beamer to the Boba ecosystem page (#290) Co-authored-by: Sahil K <[email protected]> Co-authored-by: Boyuan-Chen <[email protected]> (cherry picked from commit 04b95a7) * Update gas estimation account (#356) (cherry picked from commit 53d25c2) * Add Layer Zero bridge audit (#321) (cherry picked from commit abadae0) * Update Witnet Oracle (#323) update ecosystem project list for Witnet replace .svg update price-feed developer documentation for Witnet (cherry picked from commit 778851b) * harden stress test - cannot commit to miner (#266) * harden stress test - cannot commit to miner * harden stress test - nonces Co-authored-by: Ino Murko <[email protected]> (cherry picked from commit 728db7b) * Watcher API for LayerZero HistoryTab and Update Layer Zero monitor (#346) * Support multiple bridges * Fix env variables * Update mainnet layer zero address * Add watcher API * Add reference url * Remove scan-client * Remove checking status * Return reference Co-authored-by: Sahil K <[email protected]> (cherry picked from commit 4865f37) * fixes for proposal and lock record fetch & image import (#358) (cherry picked from commit ddafe33) * Gateway specific identifier to sentry and exporting all env from constant file. (#347) 1. update sentry package. 2. Env identifier to sentry setup 3. export all env params from constants 4. Fix for GraphQL module import 6. Fix for crash of toString console error for fetchProposal (cherry picked from commit 4649b44) Co-authored-by: sterswift <[email protected]> Co-authored-by: Sahil K <[email protected]> Co-authored-by: Boyuan-Chen <[email protected]> Co-authored-by: trangtran-enya <[email protected]> Co-authored-by: vvvvvv1vvvvvv <[email protected]> Co-authored-by: DBecane <[email protected]> Co-authored-by: parodyBit <[email protected]>
- Loading branch information
1 parent
2d7ec5e
commit bfbf2b4
Showing
72 changed files
with
2,199 additions
and
771 deletions.
There are no files selected for viewing
Binary file not shown.
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
67 changes: 67 additions & 0 deletions
67
ops_boba/api/watcher-api/watcher_getLayerZeroTransactions.py
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,67 @@ | ||
import json | ||
import yaml | ||
import pymysql | ||
|
||
|
||
def watcher_getLayerZeroTransaction(event, context): | ||
# Parse incoming event | ||
body = json.loads(event["body"]) | ||
address = body.get("address") | ||
fromRange = int(body.get("fromRange")) | ||
toRange = int(body.get("toRange")) | ||
|
||
# Read YML | ||
with open("env.yml", 'r') as ymlfile: | ||
config = yaml.load(ymlfile, Loader=yaml.FullLoader) | ||
|
||
# Get MySQL host and port | ||
endpoint = config.get('RDS_ENDPOINT') | ||
user = config.get('RDS_MYSQL_NAME') | ||
dbpassword = config.get('RDS_MYSQL_PASSWORD') | ||
dbname = config.get('RDS_DBNAME') | ||
|
||
con = pymysql.connect(host=endpoint, user=user, db=dbname, | ||
passwd=dbpassword, connect_timeout=5) | ||
|
||
transactionData = [] | ||
with con.cursor() as cur: | ||
try: | ||
cur.execute("""SELECT | ||
chainID, targetChainID, hash, blockNumber, amount, event, timestamp, reference | ||
FROM layerZeroTx | ||
WHERE `crossTxFrom`=%s AND blockNumber <= %s AND blockNumber >= %s ORDER BY blockNumber""", (address, toRange, fromRange)) | ||
transactionsDataRaw = cur.fetchall() | ||
print("total", len(transactionsDataRaw)) | ||
for transactionDataRaw in transactionsDataRaw: | ||
print("FOUND") | ||
transactionData.append({ | ||
"tx_hash": transactionDataRaw[2], | ||
"amount": transactionDataRaw[4], | ||
"event_type": transactionDataRaw[5], | ||
"destination_chain": transactionDataRaw[1], | ||
"timestamp": transactionDataRaw[6], | ||
"block_number": transactionDataRaw[3], | ||
"reference": transactionDataRaw[7] | ||
}) | ||
|
||
except Exception as e: | ||
print(e) | ||
transactionData = [] | ||
|
||
con.close() | ||
|
||
response = { | ||
"statusCode": 201, | ||
"headers": { | ||
"Access-Control-Allow-Origin": "*", | ||
"Access-Control-Allow-Credentials": True, | ||
"Strict-Transport-Security": "max-age=63072000; includeSubdomains; preload", | ||
"X-Content-Type-Options": "nosniff", | ||
"X-Frame-Options": "DENY", | ||
"X-XSS-Protection": "1; mode=block", | ||
"Referrer-Policy": "same-origin", | ||
"Permissions-Policy": "*", | ||
}, | ||
"body": json.dumps(transactionData), | ||
} | ||
return response |
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,13 @@ | ||
MYSQL_HOST_URL=127.0.0.1 | ||
MYSQL_PORT=3306 | ||
MYSQL_USERNAME=admin | ||
MYSQL_PASSWORD=password | ||
MYSQL_DATABASE_NAME=omg_xv1 | ||
MYSQL_DBNAME_TX=omg_tx | ||
MYSQL_DBNAME_RECEIPT=omg_receipts | ||
ADDRESS_MANAGER_ADDRESS= | ||
L1_NODE_WEB3_URL= | ||
LAYER_ZERO_ENABLE_TEST=true | ||
LAYER_ZERO_CHAIN=Testnet | ||
LAYER_ZERO_BRIDGES=EthBridgeToAvalanche,EthBridgeToFantom | ||
LAYER_ZERO_LATEST_BLOCK=1000 |
Oops, something went wrong.