Skip to content

Commit

Permalink
DFS changes and support BSC (#1364)
Browse files Browse the repository at this point in the history
* pay relayer: don't force claim to have bridge amount

* pay: new DFS deployment, bsc chain

* pay contracts: new contracts to support axelar bridge (#1363)

* pay contracts: axelar bridge contracts

* wip

* forge install: axelar-gmp-sdk-solidity

v6.0.3

* pay contract: new contract with axelar gas

* pay contract: pay axelar gas using native token

* contract: add axlUSDC to foreign token and deploy changes

* pay contract: new intent with bridge token out options

* pay contract: fix tests and deploy

* pay common: add pay order util functions

* pay contract: new deployments and added bridgeTokenOut to db

* pay contract: add pre and post calls. new dprelayer deployments

* pay: use zBigIntStr, revise axelar fees, use Strings.toHexString

* pay contract: new deployments

* pay contract: new deployments

* comment out deploy script

---------

Co-authored-by: Nalin Bhardwaj <[email protected]>
  • Loading branch information
andrewliu08 and nalinbhardwaj authored Nov 5, 2024
1 parent 117f212 commit 02fba9f
Show file tree
Hide file tree
Showing 111 changed files with 68,630 additions and 29,187 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@
[submodule "packages/contract/lib/openzeppelin-contracts-upgradeable"]
path = packages/contract/lib/openzeppelin-contracts-upgradeable
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
[submodule "packages/contract/lib/axelar-gmp-sdk-solidity"]
path = packages/contract/lib/axelar-gmp-sdk-solidity
url = https://github.com/axelarnetwork/axelar-gmp-sdk-solidity
5 changes: 4 additions & 1 deletion packages/contract/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: build clean full test coverage codegen deploy
.PHONY: build clean full test paytest coverage codegen deploy

build:
forge install
Expand All @@ -18,6 +18,9 @@ test:
forge test -vvv --fork-url "$(BASE_MAINNET_RPC)" --fork-block-number 14513720 --match-path "test/uniswap/*" --no-match-path "test/uniswap/Quoter.t.sol"
forge test -vvv --fork-url "$(BASE_MAINNET_RPC)" --fork-block-number 15950101 --match-path "test/uniswap/Quoter.t.sol"

paytest:
forge test -vvv --match-path "test/pay/*"

coverage:
$(eval BASE_MAINNET_RPC ?= $(or $(BASE_MAINNET_RPC),https://base-rpc.publicnode.com)) # Use environment variable if set, otherwise use default
@echo Running tests with RPC: $(BASE_MAINNET_RPC)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"transactions": [
{
"hash": "0x04ae8898cc5dcafb2a610d07c6fd534ef7e1f5e5293e492eb3af54826d7c114c",
"transactionType": "CREATE2",
"contractName": "CREATE3Factory",
"contractAddress": "0x4ce25be5611b6527ea48f7abf513d48bacb4cc44",
"function": null,
"arguments": null,
"transaction": {
"from": "0x2f321372e8a9755cd2ca6114eb8da32a14f8100b",
"to": "0x4e59b44847b379578588920ca78fbf26c0b4956c",
"gas": "0x7a1a5",
"value": "0x0",
"input": "0xb7b4348bd25e1384f3ea3920200f44516adaaaa36647ca6a75c74e53e700cbbe6080806040523460155761059e908161001b8239f35b600080fdfe608080604052600436101561001357600080fd5b60003560e01c90816350f1c46414610297575063cdcb760a1461003557600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102925760243567ffffffffffffffff811161029257366023820112156102925780600401359061008b826103ca565b91610099604051938461035a565b8083526020830191366024838301011161029257816000926024602093018537840101526040513360601b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166020820190815260043560348301529061012b81605481015b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261035a565b51902080610137610404565b6020815191016000f573ffffffffffffffffffffffffffffffffffffffff8116156102345760009261016b8493309061043f565b94519134905af13d1561022f573d610182816103ca565b90610190604051928361035a565b8152600060203d92013e5b80610225575b156101c75760209073ffffffffffffffffffffffffffffffffffffffff60405191168152f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f494e495449414c495a4154494f4e5f4641494c454400000000000000000000006044820152fd5b50803b15156101a1565b61019b565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4445504c4f594d454e545f4641494c45440000000000000000000000000000006044820152fd5b600080fd5b346102925760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610292576004359073ffffffffffffffffffffffffffffffffffffffff821682036102925760609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602082810191825260243560348401529161033c919061033281605481016100ff565b519020309061043f565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761039b57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff811161039b57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b6040519061041360408361035a565b601082527f67363d3d37363d34f03d5260086018f3000000000000000000000000000000006020830152565b9073ffffffffffffffffffffffffffffffffffffffff9161045e610404565b60208151910120604051917fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060208401947fff00000000000000000000000000000000000000000000000000000000000000865260601b16602184015260358301526055820152605581526104d460758261035a565b5190206040517fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060208201927fd694000000000000000000000000000000000000000000000000000000000000845260601b1660228201527f010000000000000000000000000000000000000000000000000000000000000060368201526017815261056160378261035a565b519020169056fea26469706673582212205ddc3b62506002605f8e56b354c461c27258994d60a0a456286a18125a7d5aa764736f6c634300081a0033",
"nonce": "0x0",
"chainId": "0x38"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x89726b",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"type": "0x0",
"transactionHash": "0x04ae8898cc5dcafb2a610d07c6fd534ef7e1f5e5293e492eb3af54826d7c114c",
"transactionIndex": "0x5f",
"blockHash": "0x9d2e054df111934440a3f6a376da9890df2b040728d8a380e7fafe8436b0335f",
"blockNumber": "0x298c452",
"gasUsed": "0x586c4",
"effectiveGasPrice": "0x3b9aca00",
"from": "0x2f321372e8a9755cd2ca6114eb8da32a14f8100b",
"to": "0x4e59b44847b379578588920ca78fbf26c0b4956c",
"contractAddress": "0x4ce25be5611b6527ea48f7abf513d48bacb4cc44"
}
],
"libraries": [],
"pending": [],
"returns": {
"factory": {
"internal_type": "contract CREATE3Factory",
"value": "0x4Ce25bE5611B6527eA48f7Abf513d48BAcb4Cc44"
}
},
"timestamp": 1730278550,
"chain": 56,
"commit": "740c9a76"
}
36 changes: 18 additions & 18 deletions packages/contract/broadcast/DeployDaimoPay.s.sol/1/run-latest.json

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions packages/contract/broadcast/DeployDaimoPay.s.sol/10/run-latest.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 02fba9f

Please sign in to comment.