prettyirrelevant / bridgebloc Goto Github PK
View Code? Open in Web Editor NEWExperience hassle-free token movement across EVM compatible chains
Home Page: https://bridgebloc.vercel.app
License: MIT License
Experience hassle-free token movement across EVM compatible chains
Home Page: https://bridgebloc.vercel.app
License: MIT License
#8 has the boilerplate code for EVMAggregator
and EVMClient
so you can reuse that for your LxLy implementation.
LxLyTokenConversionInitialisationSerializer
that validates the tx_hash
and chain
of the bridging process.CircleAPIConversionStepType
as inspiration.For the serializer part, here are certain checks.
check from
check source chain
check source token
check destination chain
check destination token
check the address is the contract deployed by us
To verify that an event exists for a tx receipt
cross_chain_bridge_contract = client.get_contract(
name='CrossChainBridge',
address='0x0a992d191DEeC32aFe36203Ad87D7d289a738F81',
)
token_messenger_contract = client.get_contract(
name='TokenMessenger',
address='0x0a992d191DEeC32aFe36203Ad87D7d289a738F81',
)
found_bridge_events = cross_chain_bridge_contract.events.BridgeDepositReceived().process_receipt(
receipt, errors=DISCARD
)
if len(found_bridge_events) == 0 or len(found_bridge_events) > 1:
raise serializers.ValidationError(
f'Expected just one `BridgeDepositReceived` event, got {len(found_bridge_events)}'
)
EVMClient
for a particular chainevm_client = EVMAggregator().get_client(chain)
SECRET_KEY="django-insecure-0i*m8syiir!bcgzas#5riq8&pic+m*jbiex&(zi^gnb@(xf^&g"
DATABASE_URL=sqlite:///db.sqlite3
HUEY_REDIS_URL=redis://localhost:6379
HUEY_IMMEDIATE=0
DJANGO_SETTINGS_MODULE=bridgebloc.conf.settings
DEBUG=1
ALLOWED_HOSTS=localhost,127.0.0.1
CIRCLE_SANDBOX_API_KEY=SAND_API_KEY:e2afe1f631722927b89ee5282fa6e559:3c1309e4a895933c679b5afe10fd91d5
CIRCLE_SANDBOX_BASE_URL=https://api-sandbox.circle.com
CIRCLE_LIVE_API_KEY=live-key
CIRCLE_LIVE_BASE_URL=https://api.circle.com
CIRCLE_MASTER_WALLET_ID=1016603050
ETHEREUM_RPC_NODES=https://eth.llamarpc.com
AVALANCHE_RPC_NODES=https://avalanche-c-chain.publicnode.com
POLYGON_POS_RPC_NODES=https://polygon.llamarpc.com
ARBITRUM_ONE_RPC_NODES=https://arbitrum-one.publicnode.com
POLYGON_ZKEVM_RPC_NODES=https://zkevm-rpc.com
ETHEREUM_TESTNET_RPC_NODES=https://ethereum-goerli.publicnode.com
AVALANCHE_TESTNET_RPC_NODES=https://avalanche-fuji-c-chain.publicnode.com
POLYGON_POS_TESTNET_RPC_NODES=https://polygon-mumbai-bor.publicnode.com
ARBITRUM_ONE_TESTNET_RPC_NODES=https://arbitrum-goerli.publicnode.com
POLYGON_ZKEVM_TESTNET_RPC_NODES=https://rpc.public.zkevm-test.net
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.