Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
286 commits
Select commit Hold shift + click to select a range
7b13669
Add ICallProxy and Flags to whitelisted docs
Vsevo1od Dec 2, 2021
0f6cb17
Add NatSpec for getters in ICallProxy and IDeBridgeGate
Vsevo1od Dec 2, 2021
4d3aaf2
Fix NatSpec for submissionNativeSender
Vsevo1od Dec 2, 2021
38b3932
Fix some link names in docs has .md extension
Vsevo1od Dec 2, 2021
2f3cd3f
Set fixed solidity-docgen version in package.json
Vsevo1od Dec 2, 2021
ffe92fd
Add comment that file is autogenerated to docs template
Vsevo1od Dec 2, 2021
fa26fd8
Make minor changes to DeBridgeGate NatSpecs
Vsevo1od Dec 2, 2021
fa8308b
Make docs template use bigger headers
Vsevo1od Dec 2, 2021
c09816c
Update docs by running `yarn docs`
Vsevo1od Dec 2, 2021
83d6c65
Fix documentaion for Claimed event
Vsevo1od Dec 3, 2021
a1e289e
Merge pull request #138 from debridge-finance/improvement/add-docs-ge…
idealatom Dec 3, 2021
59b0b7b
add deploy script for FeesCalculator
idealatom Dec 3, 2021
1b26f49
GitBook: [#109] Talks and Videos, External Links
Dec 7, 2021
f676db0
Move docs generation scripts to scripts dir
Vsevo1od Dec 6, 2021
0334bd3
Add NatSpec descriptions for 9 main contracts
Vsevo1od Dec 7, 2021
12bdcce
Add 'autogenerate' to TOC start/end mark text
Vsevo1od Dec 7, 2021
7ff628f
Extract writeBetweenMarks from writeTocToSummary
Vsevo1od Dec 7, 2021
455661a
Make generateTableOfContents/index.ts sync
Vsevo1od Dec 7, 2021
c3ebe26
Add README.md check to 'docs are in sync' check
Vsevo1od Dec 7, 2021
82dc881
Add 'isWhitelisted' handlebars helper
Vsevo1od Dec 7, 2021
9ee8e77
Move main template to a separate folder
Vsevo1od Dec 7, 2021
1c2aaf9
Add comment about 'is autogenerated' comment
Vsevo1od Dec 7, 2021
3eede85
Add descriptions generation to README.md
Vsevo1od Dec 7, 2021
661aa99
Update readme to main branch version
Vsevo1od Dec 7, 2021
d0aa4ca
Add assertion that marks exist
Vsevo1od Dec 7, 2021
6253813
Add logging to console to docsGeneration/generate
Vsevo1od Dec 7, 2021
fbf96f9
Add parent dir for contracts description in readme
Vsevo1od Dec 7, 2021
b233fd9
Add marks for description insertion to README.md
Vsevo1od Dec 7, 2021
edde0cc
Update NatSpecs for DeBridgeToken
Vsevo1od Dec 7, 2021
89e69f6
Update NatSpecs for SimpleFeeProxy
Vsevo1od Dec 7, 2021
5ecd1f3
Update NatSpecs for AggregatorBase
Vsevo1od Dec 7, 2021
67e61a6
Update NatSpecs for WethGate
Vsevo1od Dec 7, 2021
acb7c49
Add cleaning docs/contracts before generation
Vsevo1od Dec 7, 2021
1f36636
Add notice to not remove auto-generation marks
Vsevo1od Dec 7, 2021
e97aa6f
Add documented contracts to whitelist
Vsevo1od Dec 7, 2021
1e53901
Fix events render may break
Vsevo1od Dec 7, 2021
ffd3e55
Fix typo in AggregatorBase.sol
Vsevo1od Dec 7, 2021
c9cd028
Update docs by running `yarn docs`
Vsevo1od Dec 7, 2021
49df03c
trim trailing whitespaces
idealatom Dec 8, 2021
569fab6
use type(uint256).max
idealatom Dec 8, 2021
a23a006
Remove trailing spaces in .sol and generated .md files
Vsevo1od Dec 8, 2021
2fe4d02
set minReservesBps to 100% for new assets
idealatom Dec 8, 2021
8c51ed8
compare amount with debridge.maxAmount after overwriting amount
idealatom Dec 8, 2021
0417f19
Merge pull request #140 from debridge-finance/improvement/set-up-runn…
idealatom Dec 8, 2021
dc333ba
use msg.value as amount for native tokens
idealatom Dec 8, 2021
a07a7a5
fix calculating fixed fee for native token transfers
idealatom Dec 8, 2021
f5ea704
add _applyDiscount function
idealatom Dec 8, 2021
2ba19c5
remove adding weth asset in DeBridgeGate initializer
idealatom Dec 8, 2021
6b1b4f6
clean comments
idealatom Dec 8, 2021
1cc8b11
fix overwriting chainFees.transferFeeBps in _send
idealatom Dec 8, 2021
0a36390
use uint256 for lockedClaim
idealatom Dec 8, 2021
d9a7095
update docs
idealatom Dec 8, 2021
4dbfaf2
bump gate version
idealatom Dec 9, 2021
f6372cf
update setting feeInfo.useAssetFee value
idealatom Dec 9, 2021
2d2da3a
Merge pull request #147 from debridge-finance/fix/pre-release-updates
artyukh Dec 9, 2021
e22c8fc
Merge pull request #139 from debridge-finance/feature/fees-calculator
artyukh Dec 9, 2021
8996aa0
Merge pull request #146 from debridge-finance/improvement/add-full-do…
idealatom Dec 10, 2021
25550c6
update calculation of asset fixed fees in FeesCalculator
idealatom Dec 10, 2021
2256503
fix indentation in testSubmissionFees function
idealatom Dec 10, 2021
0b4045e
fix adding new asset for native tokens in _send function
idealatom Dec 10, 2021
2c7d9a4
bump gate version
idealatom Dec 10, 2021
8402aba
add testing of getNativeInfo mapping for ERC20 tokens
idealatom Dec 10, 2021
1ca6491
added prefix to submission
artyukh Dec 14, 2021
5861135
Merge branch 'develop' into fix/prefix-submission
artyukh Dec 14, 2021
3d0f6b0
Updated docs
artyukh Dec 15, 2021
6c41ed5
Merge pull request #149 from debridge-finance/fix/pre-release-updates
artyukh Dec 15, 2021
efeed32
Updated docs
idealatom Dec 15, 2021
7ec916d
Merge branch 'develop' into fix/prefix-submission
idealatom Dec 15, 2021
51fad8d
Merge pull request #148 from debridge-finance/feature/fees-calculator
artyukh Dec 15, 2021
13b2147
Merge pull request #152 from debridge-finance/fix/prefix-submission
idealatom Dec 15, 2021
3db1242
Remove ConfirmationAggregator and SignatureAggregator contracts
idealatom Dec 15, 2021
e41b80a
Merge pull request #153 from debridge-finance/fix/remove-aggregator-c…
artyukh Dec 15, 2021
cd59dac
fix calculation fee
artyukh Dec 15, 2021
b07ffcb
pausable DeBridgeToken, add DeBridgeTokenPaused
idealatom Dec 15, 2021
2b29f5b
Fix FeesCalculator and test
artyukh Dec 15, 2021
66e9141
Merge pull request #155 from debridge-finance/feature/pausable-detoken
artyukh Dec 15, 2021
0af99db
Merge pull request #154 from debridge-finance/fix/calculation-fee
artyukh Dec 15, 2021
892d02b
return flashloans tests
idealatom Dec 17, 2021
ebc7628
GitBook: [#110] No subject
nadia-zee Dec 17, 2021
dfa8506
Merge pull request #157 from debridge-finance/feature/batch-balance
artyukh Dec 17, 2021
24c1399
Update README.md
artyukh Dec 29, 2021
d28e9f6
Update README.md
artyukh Dec 29, 2021
971643d
Removed strategies contracts
artyukh Dec 29, 2021
86fc096
Merge pull request #164 from debridge-finance/fix/remove-obsolete-con…
artyukh Dec 29, 2021
a77b5d2
Add L2Base example contract
Vsevo1od Jan 6, 2022
980c6f1
Add Flags library to L2Base
Vsevo1od Jan 6, 2022
1a47390
Fix typo DeBridgeGate to IDeBridgeGate
Vsevo1od Jan 6, 2022
08907ae
Fix typo in folder name
Vsevo1od Jan 6, 2022
74e982e
Update L2Base to use standard init function names
Vsevo1od Jan 7, 2022
28cc9d3
Add Incrementor.sol
Vsevo1od Jan 7, 2022
7c73012
Replace claim with onBridgedMessage
Vsevo1od Jan 7, 2022
ccbd40c
Revert changes in DeBridgeGate bytecode by using an IDeBridgeGate fork
Vsevo1od Jan 7, 2022
df3d31f
Allow using custom execution fee
Vsevo1od Jan 7, 2022
bb7867c
Add ability to change chainIdToContractAddress
Vsevo1od Jan 10, 2022
b1993b0
Fix incorrect encodeWithSignature argument
Vsevo1od Jan 10, 2022
0b79194
Make Incrementor.claimedTimes public
Vsevo1od Jan 10, 2022
4705b32
GitBook: [#112] No subject
Jan 11, 2022
9a29b47
Add scripts for examples/Incrementor
Vsevo1od Jan 10, 2022
6e339f1
Update examples/Incrementor/README.md
Vsevo1od Jan 10, 2022
27d3a12
Add printing implementation address after deploy
Vsevo1od Jan 11, 2022
a45cce9
Fix getClaimedTimesOnReceivingChain prints BigNumber
Vsevo1od Jan 11, 2022
41eac42
Remove L2Base methods and use Flags setter in Incrementor
Vsevo1od Jan 11, 2022
51fe06d
Move forked IDeBridgeGate to a folder
Vsevo1od Jan 11, 2022
4ef361a
Replace npm with yarn in L2Base README
Vsevo1od Jan 11, 2022
2477125
Lower sending value
Vsevo1od Jan 11, 2022
5caa039
Add info about hardhat-etherscan import for verify
Vsevo1od Jan 11, 2022
95c53bb
Refactor send.ts
Vsevo1od Jan 11, 2022
cf35c64
Update Flags documentation
Vsevo1od Jan 11, 2022
241aa22
Update README.md
Jan 11, 2022
472272c
Update README.md
Jan 11, 2022
c1fa50b
Move files from test-send-method
Vsevo1od Jan 11, 2022
1468e6c
Rename L2Base to BridgeAppBase
Vsevo1od Jan 11, 2022
3f9c47f
Organize examples in examples folders
Vsevo1od Jan 11, 2022
a087d17
Update README.md
Jan 11, 2022
2bb3758
Merge pull request #166 from debridge-finance/feature/l2base-example-…
artyukh Jan 11, 2022
bfe2dca
Merge pull request #168 from debridge-finance/develop
Jan 11, 2022
5ade40a
mintOrTransfer only for amount>0
artyukh Jan 14, 2022
170b4ff
Merge pull request #169 from debridge-finance/fix/mintOrTransfer
artyukh Jan 14, 2022
427d43c
add data length to calculation submissionId
artyukh Jan 14, 2022
162cbe6
add normalize executionee
artyukh Jan 14, 2022
532668b
revert if the execution fee need to be rounded
artyukh Jan 17, 2022
9c56f85
Update auto-generated docs
Vsevo1od Jan 17, 2022
aeda196
Moved lock for claim in CallProxy
artyukh Jan 17, 2022
8f883ab
Merge pull request #173 from debridge-finance/feature/lock-callProxy
artyukh Jan 17, 2022
bb0f5cf
added fallbackAddress lenght to submissionId
artyukh Jan 17, 2022
a2fd0ad
DeBridgeGate
artyukh Jan 17, 2022
b9106b6
Merge pull request #170 from debridge-finance/fix/submissionId
artyukh Jan 17, 2022
6a1108c
Merge branch 'develop' into fix/normalize-executionee
artyukh Jan 17, 2022
875637a
Add normalize executionFee
artyukh Jan 18, 2022
d6fa0cd
update docs
artyukh Jan 18, 2022
0eada73
rename publishSubmission to _publishSubmission
artyukh Jan 18, 2022
1131439
removed unused NeedRoundAmount
artyukh Jan 18, 2022
5de7c0a
Merge pull request #171 from debridge-finance/fix/normalize-executionee
artyukh Jan 18, 2022
4389ef3
Update CallProxy version 130
artyukh Jan 18, 2022
948ecac
Merge pull request #175 from debridge-finance/develop
artyukh Jan 18, 2022
a5ded57
ReferralSystem.sol added
dmitrysonder Jan 20, 2022
d6f706c
GitBook: [#111] No subject
nadia-zee Jan 21, 2022
bce426d
GitBook: [#113] No subject
nadia-zee Jan 21, 2022
4ff875d
GitBook: [#114] No subject
Jan 23, 2022
b4930b6
GitBook: [#115] No subject
nadia-zee Jan 24, 2022
ddc333f
Fix ReferralSystem
artyukh Jan 25, 2022
257b29b
Restore TOC marks for docs generation
Vsevo1od Jan 26, 2022
d877ff7
deploy script
dmitrysonder Jan 26, 2022
3fd6dc7
RefferalSystem fixes and deploy script
dmitrysonder Jan 26, 2022
5c5f62b
event ReferralAdded + fixes
dmitrysonder Jan 26, 2022
cb85509
ZeroSender error instead revert
dmitrysonder Jan 26, 2022
9c4c44b
Remove payable from Incrementor.onBridgedMessage
Vsevo1od Jan 27, 2022
d14260c
Merge pull request #181 from debridge-finance/improvement/remove-paya…
artyukh Jan 27, 2022
162a803
Merge pull request #180 from debridge-finance/hotfix/restore-toc-marks
artyukh Jan 27, 2022
aed6084
GitBook: [#116] No subject
Jan 30, 2022
0333d2b
GitBook: [#117] No subject
Jan 30, 2022
81f0f71
GitBook: [#118] No subject
Jan 30, 2022
24ec69f
GitBook: [#119] No subject
Jan 30, 2022
6d5032b
GitBook: [#120] No subject
Jan 30, 2022
3005595
GitBook: [#121] No subject
Jan 30, 2022
be10e90
GitBook: [#122] No subject
Jan 30, 2022
173157c
GitBook: [#123] No subject
Jan 30, 2022
d507197
GitBook: [#126] No subject
nadia-zee Jan 31, 2022
48ac52d
Remove duplicated dotenv parsing
Vsevo1od Jan 12, 2022
a52ebcd
Rename PRIVATE_KEY env var to SENDER_PRIVATE_KEY
Vsevo1od Jan 12, 2022
835a01f
Make Web3RpcUrl readonly
Vsevo1od Jan 12, 2022
de7fca8
Fix paths in send scripts
Vsevo1od Jan 12, 2022
33944e9
Add swap to a point of encoding ABI
Vsevo1od Jan 12, 2022
60cf20c
Extract genericSend from sendERC20
Vsevo1od Jan 12, 2022
fdc2d8b
Clean up sendERC20.ts
Vsevo1od Jan 12, 2022
49c71ad
Add swap to a point of generation of send args
Vsevo1od Jan 13, 2022
90a94c4
Add swap to a point of successful send (claim fails)
Vsevo1od Jan 13, 2022
6e61d39
Fix fees are not subtracted from amount before swap
Vsevo1od Jan 14, 2022
f4627cf
Fix wrong to address used for swap
Vsevo1od Jan 14, 2022
47ecbf2
Fix tests fail
Vsevo1od Jan 14, 2022
ced81f8
Remove BN from variable names
Vsevo1od Jan 17, 2022
f846505
Add comment why io-ts is used and how to replace
Vsevo1od Jan 17, 2022
b09a4fc
Fix error in fee calculation formula
Vsevo1od Jan 17, 2022
6478aa1
Unset REVERT_IF_EXTERNAL_FAIL flag in swap example
Vsevo1od Jan 17, 2022
e8c935c
Add ability to receive native tokens
Vsevo1od Jan 17, 2022
516b26a
Replace some env vars with console args in swap example
Vsevo1od Jan 17, 2022
93b79bb
Add ability to send custom token
Vsevo1od Jan 18, 2022
9e22ac8
Fix sending deTokens and main tokens fails
Vsevo1od Jan 18, 2022
62595be
Add more logging
Vsevo1od Jan 18, 2022
e1934b7
Extract getCallToUniswapRouterEncoded to a file
Vsevo1od Jan 31, 2022
75a4bc5
Extract FeesCalculator
Vsevo1od Jan 31, 2022
79f0b65
Move GENERIC_ERROR_CODE to ../constants
Vsevo1od Jan 31, 2022
14d8a9d
CallProxy: Send full gas to externalCall
artyukh Feb 1, 2022
6d1fb85
GitBook: [#128] No subject
Feb 12, 2022
8279bb3
ReferralSystem. removed payable from onBridgedMessage
artyukh Feb 13, 2022
e718985
renamed InvitationContract
artyukh Feb 13, 2022
dae3ea6
InvitationContract removed Upgradeable
artyukh Feb 13, 2022
ac7b3d2
Merge pull request #182 from debridge-finance/fix/callproxy
artyukh Feb 14, 2022
eb76d1c
DebrdigeGate change transfer to _safeTransferETH
artyukh Feb 14, 2022
5e23a36
DebridgeGate up version
artyukh Feb 14, 2022
8ae47dd
Merge pull request #185 from debridge-finance/fix/removed-transfer
artyukh Feb 14, 2022
0dd6db8
SubmissionId calc upd. keccak256(autoParams.data)
artyukh Feb 15, 2022
705b205
Support send hashed data
artyukh Feb 15, 2022
73f2515
Allow fallback address to claim with hash of data
artyukh Feb 15, 2022
2db0b36
updated docs
artyukh Feb 15, 2022
3ca2035
Fix README
artyukh Feb 15, 2022
c1660fb
added monitoring event
artyukh Feb 15, 2022
0a0335a
update docs
artyukh Feb 15, 2022
42feedd
removed extra check !_result
artyukh Feb 15, 2022
7955713
Merge pull request #191 from debridge-finance/fix/callProxy-refactor
artyukh Feb 15, 2022
c8f12d2
Merge pull request #190 from debridge-finance/feature/monitoring-event
artyukh Feb 15, 2022
18b6c54
Merge pull request #189 from debridge-finance/feature/fallback-claim-…
artyukh Feb 16, 2022
b98299d
removed extra getNativeTokenInfo
artyukh Feb 16, 2022
ab6f6aa
fix docs
artyukh Feb 16, 2022
e573ed8
FeeProxy update version
artyukh Feb 16, 2022
b1b215f
Merge pull request #193 from debridge-finance/fix/contract-size
artyukh Feb 16, 2022
6de3b0f
CallProxy updade approve
artyukh Feb 16, 2022
a761d89
Merge pull request #194 from debridge-finance/fix/call-proxy-approve
artyukh Feb 16, 2022
edbe2ab
GitBook: [#127] No subject
nadia-zee Feb 16, 2022
ae58135
GitBook: [#129] No subject
Feb 17, 2022
a7915d8
GitBook: [#130] No subject
Feb 17, 2022
cbaf900
GitBook: [#131] Remove Light Validation Paragraph
Feb 17, 2022
9858a75
GitBook: [#132] Transfers flow fixed
Feb 17, 2022
862b8b4
GitBook: [#133] Added pool addresses
Feb 18, 2022
c8cd388
Update pipeline.yml
artyukh Feb 27, 2022
beb2ca5
Merge pull request #184 from debridge-finance/develop
artyukh Feb 28, 2022
a4c8b53
Merge pull request #172 from debridge-finance/feature/add-cross-chain…
artyukh Mar 1, 2022
d6be724
GitBook: [#134] No subject
Mar 20, 2022
4ae8195
GitBook: [#135] No subject
Mar 28, 2022
3aa74a7
forward gaslimit to callProxy. Release 4.1.0
artyukh Mar 30, 2022
aa8e7ca
Merge pull request #197 from debridge-finance/develop
artyukh Mar 30, 2022
13b619a
Merge pull request #198 from debridge-finance/feature/referral-system
artyukh Apr 18, 2022
8cbc704
Added support multiSend
artyukh May 9, 2022
c32eb25
updated yarn.lock
artyukh May 9, 2022
65c0314
Update pipeline.yml
artyukh May 9, 2022
41c922f
Merge pull request #200 from debridge-finance/feature/multisend
artyukh May 9, 2022
879ae94
CallProxy inherit from MultiSendCallOnly
artyukh May 19, 2022
ba5272b
Merge pull request #201 from debridge-finance/feature/multisend
artyukh May 19, 2022
a2a8110
CallProxy version 423
artyukh May 29, 2022
47335f5
Merge pull request #202 from debridge-finance/feature/multisend
artyukh May 29, 2022
8c6f384
Update README.md
artyukh Jun 5, 2022
5711592
Update LICENSE
Jun 30, 2022
bdc89c8
debridge-protocol-evm-interfaces npm package introduced (#203)
alexeychr Sep 12, 2022
cdcd271
Update LICENSE
merrymari Oct 26, 2022
533c033
Merge pull request #204 from merrymari/patch-1
artyukh Oct 26, 2022
52fb6e7
Update LICENSE
merrymari Oct 27, 2022
f5ecaaa
Merge pull request #205 from merrymari/patch-2
artyukh Oct 27, 2022
a542b0b
removed obsolete logic . added sendMessage
artyukh Nov 13, 2022
5a2605d
Merge pull request #207 from debridge-finance/feature/sendMessage
artyukh Nov 25, 2022
26c1aa7
Add view attr in intarfaces
artyukh Dec 8, 2022
d3043c3
Merge pull request #208 from debridge-finance/fix/interface-view
artyukh Dec 8, 2022
80205ac
Update LICENSE
artyukh Feb 17, 2023
3031b7f
update init params. clear deploy scripts
artyukh Jul 17, 2023
575853c
added Linea configs
artyukh Jul 17, 2023
f9c6cc9
refactor deploy scripts
artyukh Jul 17, 2023
30319d5
removed "de" from token symbol
artyukh Jul 19, 2023
17e99de
Merge pull request #214 from debridge-finance/feature/remove-de
artyukh Jul 19, 2023
8d9912f
Create funding.json
artyukh Jun 4, 2024
e3cf67c
Update README.md
merrymari Oct 23, 2024
2e9f9c7
Merge pull request #220 from merrymari/patch-3
artyukh Oct 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitbook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
root: ./docs/
structure:
readme: README.md
summary: SUMMARY.md
Binary file added .gitbook/assets/27 (1).jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/27.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/3_v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/Bg1 (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/Bg1 (2).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/Bg1 (3).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/C.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/Cross-chain.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/OracledeBridge (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/OracledeBridge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/TransfersdeBridge (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/TransfersdeBridge (2).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/TransfersdeBridge.png
Binary file added .gitbook/assets/Untitled Diagram-Fees (1).png
Binary file added .gitbook/assets/Untitled Diagram-Fees (2).png
Binary file added .gitbook/assets/Untitled Diagram-Fees.png
Binary file added .gitbook/assets/Untitled Diagram-Page-2 (1).png
Binary file added .gitbook/assets/Untitled Diagram-Page-2 (2).png
Binary file added .gitbook/assets/Untitled Diagram-Page-2.png
Binary file added .gitbook/assets/deBridge (1).png
Binary file added .gitbook/assets/deBridge.png
Binary file added .gitbook/assets/image (1).png
Binary file added .gitbook/assets/image (2).png
Binary file added .gitbook/assets/image (3).png
Binary file added .gitbook/assets/image (4).png
Binary file added .gitbook/assets/image (5).png
Binary file added .gitbook/assets/image (6).png
Binary file added .gitbook/assets/image (7) (1).png
Binary file added .gitbook/assets/image (7).png
Binary file added .gitbook/assets/image (8).png
Binary file added .gitbook/assets/image.png
Binary file added .gitbook/assets/token2.jpg
32 changes: 7 additions & 25 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: Pipeline
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ develop ]
branches: [ develop, main ]
pull_request:
branches: [ develop ]
branches: [ develop, main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -59,33 +59,15 @@ jobs:
steps.cache-yarn-cache.outputs.cache-hit != 'true' ||
steps.cache-node-modules.outputs.cache-hit != 'true'

# - name: Check docs are in sync
# run: yarn docs:assert-in-sync

- name: Lint (prettier)
run: yarn lint:check
continue-on-error: true

- name: Test CallProxy
run: yarn run hardhat test test/00_CallProxy.test.js

- name: Test Aggregator
run: yarn test test/00_Aggregator.test.js

- name: Test DeBridge Light
run: yarn test test/02_LightDebridge.test.js

- name: Test DeBridge real transfer pipeline
run: yarn test test/05_DebridgePipeline.test.js

- name: Test PriceConsumer
run: yarn test test/06_PriceConsumer.test.js

- name: Test SignatureAggregator
run: yarn test test/07_SignatureAggregator.test.js

# - name: Test DefiController
# run: yarn test test/DefiController.test.js

# - name: Test AaveController (AaveInteractor)
# run: yarn test test/AaveController.test.js
- name: Test
run: yarn test:ci

- name: Tests coverage
run: yarn coverage
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ coverage/
yarn-error.log
/deployments/
/scripts/proxies.json
typechain-types/
typechain-types/
typechain-types-web3/
tmp/
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.

Parameters

Licensor: Mongoose Orchestra Limited (BVI Co. No: 2067815)
Licensor: DxTech Inc. (Company No.155728732)

Licensed Work: deBridge V1
The Licensed Work is (c) 2021 Mongoose Orchestra Limited
The Licensed Work is (c) 2021 DxTech Inc.

Additional Use Grant: Any uses listed and defined at
v1-license-grants.dbr.eth

Change Date: The earlier of 31 December 2022 or a date specified at
Change Date: The earlier of 31 December 2025 or a date specified at
v1-license-date.dbr.eth

Change License: GNU General Public License v2.0 or later
Expand Down
138 changes: 61 additions & 77 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,93 +1,69 @@
# Debridge Smart Contracts
<br/>
<p align="center">
<a href="https://debridge.finance/" target="_blank">
<img src="https://github.com/user-attachments/assets/01c30bd5-2a18-470f-9df8-c9ac77a2a4c4" width="225" alt="logo">
</a>
</p>
<br/>

[deBridge](https://debridge.finance/) — cross-chain interoperability
and liquidity transfer protocol that allows the truly decentralized transfer of data and assets between various blockchains. deBridge protocol is an infrastructure platform and a hooking service which aims to become a standard for:
- cross-chain composability of smart contracts
- cross-chain swaps
- bridging of any arbitrary asset
- interoperability and bridging of NFTs

More information about the project can be also found in the [documentation portal](https://docs.debridge.finance/)
<br/>
UI deployed on [app.debridge.finance](https://app.debridge.finance/)

# [Complete Documentation https://docs.debridge.finance/](https://docs.debridge.finance/)
# Debridge Smart Contracts

UI deployed on [testv2.debridge.finance](https://testv2.debridge.finance/)

The contracts directory contains the following subfolders:
The contracts' directory contains the following subfolders:

```
contracts/
chainlink/ - related to chainlink integration
interfaces/ - contains interfaces of the project contracts
libraries/ - libraries created for the project
mock/ - contracts for tests
oracles/ - related to oracle's stake management
periphery/ - periphery contracts
transfers/ - related to core cross-chain functionality
```
The detailed methods' description can be found in the contracts themselves or in the [documentation](https://docs.debridge.finance/).

A detailed description of each method of the smart contracts can be found in [documentation portal](https://docs.debridge.finance/smart-contracts/whitedebridge)

The full list of contracts:

- DeBridgeGate
- AggregatorBase
- SignatureAggregator
- ConfirmationAggregator
- SignatureVerifier
- DelegatedStaking
- CallProxy
- FeeProxy
- WrappedAsset
- DefiController
- Pausable

## Transfers

**DeBridgeGate**

Contract for assets transfers. The user can transfer the asset to any of the approved chains. The admin manages the assets, fees and other important protocol parameters.

The detailed methods description can be found in the contracts themselves.

## Chainlink

**AggregatorBase**

The base contract for Chainlink oracles management. Allows to add/remove oracles, manage the minimal required amount of confirmations and assign oracle admins.

**ConfirmationAggregator**

Extends the **AggregatorBase** with confirmation-related methods; is deployed to the chain with low fees and is used to collect confirmations from oracles.

**SignatureAggregator**

Extends the **AggregatorBase** with confirmation-related methods; is deployed to the chain with low fees and is used to collect signatures from oracles that confirm the transfers.

**SignatureVerifier.sol**

Is deployed to the chain with high fees and is used to verify the transfer by oracles signatures.

## Oracles

Contains variety of the contracts interfaces.

**DelegatedStaking**

Manages oracle and delegator stakes. Oracles are required to stake LINK token to be accepted as an oracle on aggregators.

<!-- Part between CONTRACTS_AUTOGENERATED_DESCRIPTION* is autogenerated. Do no remove CONTRACTS_AUTOGENERATED_DESCRIPTION* -->
<!-- CONTRACTS_AUTOGENERATED_DESCRIPTION_START -->
## Periphery

**WrappedAsset**

### CallProxy
Proxy to execute the other contract calls.
This contract is used when a user requests transfer with specific call of other contract.
### DeBridgeToken
ERC20 token that is used as wrapped asset to represent the native token value on the other chains.

**DefiController**

Mock contract responsible for using the asset from the Debridge contracts in other DeFi protocols to earn extra reward.

**FeeProxy**

Helper to swap any token to Link. \*\*\*\*

**CallProxy**

Proxy to execute the other contract calls. This contract is used when the user requests transfer with specific call of other contract.

**Pausable**

Helper for pausable contracts.

### DeBridgeTokenProxy
This contract implements a proxy that gets the implementation address for each call
from DeBridgeTokenDeployer. It's deployed by DeBridgeTokenDeployer.
Implementation is DeBridgeToken.
### SimpleFeeProxy
Helper to withdraw fees from DeBridgeGate and transfer them to a treasury.
## Transfers
### DeBridgeGate
Contract for assets transfers. The user can transfer the asset to any of the approved chains.
The admin manages the assets, fees and other important protocol parameters.
### DeBridgeTokenDeployer
Deploys a deToken(DeBridgeTokenProxy) for an asset.
### OraclesManager
The base contract for oracles management. Allows adding/removing oracles,
managing the minimal required amount of confirmations.
### SignatureVerifier
It's used to verify that a transfer is signed by oracles.
### WethGate
Upgradable contracts cannot receive ether via `transfer` because of increased SLOAD gas cost.
We use this non-upgradeable contract as the recipient and then immediately transfer to an upgradable contract.
More details about this issue can be found
[here](https://forum.openzeppelin.com/t/openzeppelin-upgradeable-contracts-affected-by-istanbul-hardfork/1616).

<!-- CONTRACTS_AUTOGENERATED_DESCRIPTION_END -->

## [How Transfers Works](https://docs.debridge.finance/the-core-protocol/transfers)

Expand All @@ -104,9 +80,17 @@ INFURA_ID=xxx # Change to your infura id
```
then run `yarn test`

## Docs generation
`yarn docs`

## Troubleshooting
### Cannot find module '../typechain-types' or its corresponding type declarations.
`hardhat clean`
>> https://github.com/dethcrypto/TypeChain/tree/master/packages/hardhat#installation
>
>Warning: before running it for the first time you need to do hardhat clean, otherwise TypeChain will think that there is no need to generate any typings. This is because this plugin will attempt to do incremental generation and generate typings only for changed contracts. You should also do hardhat clean if you change any TypeChain related config option.
>Warning: before running it for the first time you need to do hardhat clean, otherwise TypeChain will think that there is no need to generate any typings. This is because this plugin will attempt to do incremental generation and generate typings only for changed contracts. You should also do hardhat clean if you change any TypeChain related config option.


## Verify contract

Add ETHERSCAN_API_KEY variable to your .env file before running `npx hardhat verify ...`
Loading