Skip to content

Commit

Permalink
PP-885/explore-solution-b2 (#260)
Browse files Browse the repository at this point in the history
* refactor: integration test

* refactor: boltz components

* fix: change the estimation script to include the full boltz template

* fix: cover the minimal boltz template with the gas estimation

* fix: remove hard-coded gas and add some checks on deployment

* refactor: minimal boltz

* refactor: destination contract


* chore: updated dependencies

* test: add some tests to show the interaction with the server without client

---------

Co-authored-by: Antonio <[email protected]>
  • Loading branch information
franciscotobar and antomor authored Mar 19, 2024
1 parent 54eab20 commit 1c0c81f
Show file tree
Hide file tree
Showing 17 changed files with 5,202 additions and 2,879 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run test
npm run test -- --network regtest
12 changes: 9 additions & 3 deletions contracts/import.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@ pragma solidity ^0.6.12;
import '@rsksmart/rif-relay-contracts/contracts/RelayHub.sol';
import '@rsksmart/rif-relay-contracts/contracts/smartwallet/SmartWallet.sol';
import '@rsksmart/rif-relay-contracts/contracts/smartwallet/CustomSmartWallet.sol';
import '@rsksmart/rif-relay-contracts/contracts/factory/SmartWalletFactory.sol';
import '@rsksmart/rif-relay-contracts/contracts/smartwallet/CustomSmartWallet.sol';
import '@rsksmart/rif-relay-contracts/contracts/smartwallet/BoltzSmartWallet.sol';
import '@rsksmart/rif-relay-contracts/contracts/smartwallet/MinimalBoltzSmartWallet.sol';
import '@rsksmart/rif-relay-contracts/contracts/factory/SmartWalletFactory.sol';
import '@rsksmart/rif-relay-contracts/contracts/factory/CustomSmartWalletFactory.sol';
import '@rsksmart/rif-relay-contracts/contracts/verifier/DeployVerifier.sol';
import '@rsksmart/rif-relay-contracts/contracts/factory/BoltzSmartWalletFactory.sol';
import '@rsksmart/rif-relay-contracts/contracts/factory/MinimalBoltzSmartWalletFactory.sol';
import '@rsksmart/rif-relay-contracts/contracts/verifier/CustomSmartWalletDeployVerifier.sol';
import '@rsksmart/rif-relay-contracts/contracts/verifier/DeployVerifier.sol';
import '@rsksmart/rif-relay-contracts/contracts/verifier/RelayVerifier.sol';
import '@rsksmart/rif-relay-contracts/contracts/verifier/BoltzRelayVerifier.sol';
import '@rsksmart/rif-relay-contracts/contracts/verifier/BoltzDeployVerifier.sol';
import '@rsksmart/rif-relay-contracts/contracts/verifier/MinimalBoltzRelayVerifier.sol';
import '@rsksmart/rif-relay-contracts/contracts/verifier/MinimalBoltzDeployVerifier.sol';
import '@rsksmart/rif-relay-contracts/contracts/Penalizer.sol';
import '@rsksmart/rif-relay-contracts/contracts/utils/UtilToken.sol';
import '@rsksmart/rif-relay-contracts/contracts/interfaces/IForwarder.sol';
Expand Down
19 changes: 19 additions & 0 deletions contracts/test/TestSwap.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

contract TestSwap {

function claim(
bytes32 preimage,
uint amount,
address refundAddress,
uint timelock
) external {
(bool success, ) = payable(msg.sender).call{value: amount}("");
require(success, "Could not transfer Ether");
}

// solhint-disable-next-line no-empty-blocks
receive() external payable {}

}
4,392 changes: 2,068 additions & 2,324 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"@metamask/eth-sig-util": "^5.0.2",
"@nomicfoundation/hardhat-toolbox": "^2.0.0",
"@nomiclabs/hardhat-ethers": "^2.2.1",
"@openzeppelin/contracts": "^3.4.0",
"@rsksmart/rif-relay-client": "github:rsksmart/rif-relay-client",
"@rsksmart/rif-relay-contracts": "github:rsksmart/rif-relay-contracts",
"@rsksmart/rif-relay-server": "github:rsksmart/rif-relay-server",
Expand Down Expand Up @@ -115,6 +116,7 @@
"devDependencies": {
"@types/express": "^4.17.17",
"@types/sinon-chai": "^3.2.10",
"axios": "^1.6.7",
"sinon": "^16.0.0",
"sinon-chai": "^3.7.0"
}
Expand Down
Loading

0 comments on commit 1c0c81f

Please sign in to comment.