-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(tests): regression fix for
master-b352814976
(#2149)
<!-- Thanks for sending a pull request! --> #### What this PR does / why we need it: #### Which issue(s) does this PR fixes?: <!-- (Optional) Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Fixes # #### Additional comments?: - [x] deps: ethers & hardhat installed for evm stuff - [x] container: add `-ethrpcbind` to support eth rpc call + add `RUST_LOG=debug` - [x] CI - [x] enhance `checkIfEvmTx` - [x] fix: TD test (dftx composer, rpc & rawtx) - [x] func: add `ListUnspentQueryOptions` to support provider `listunspent` method - [x] fix: UpdateMN test - [x] lint: ts-ignore buggy AbortController.signal type check
- Loading branch information
1 parent
db38bfa
commit 1a2fcf4
Showing
30 changed files
with
7,775 additions
and
215 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,7 @@ tsconfig.build.tsbuildinfo | |
# Level | ||
.level | ||
.leveldb | ||
|
||
# sol | ||
artifacts | ||
cache |
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
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,76 @@ | ||
// File: @openzeppelin/[email protected]/token/ERC20/IERC20.sol | ||
|
||
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
interface IERC20 { | ||
function transferFrom(address from, address to, uint256 amount) external returns (bool); | ||
} | ||
|
||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity >=0.8.2 <0.9.0; | ||
|
||
/** | ||
* @title TransferDomain | ||
*/ | ||
contract TransferDomain { | ||
event Transfer(address indexed from, address indexed to, uint256 amount); | ||
event NativeAddress(string nativeAddress); | ||
|
||
function transfer(address from, address payable to, uint256 amount, string memory nativeAddress) external { | ||
if (to != address(this)) { | ||
require(address(this).balance >= amount, "Insufficient contract balance"); | ||
to.transfer(amount); | ||
} | ||
|
||
emit Transfer(from, to, amount); | ||
emit NativeAddress(nativeAddress); | ||
} | ||
|
||
/** | ||
* @dev Returns the name of the token. | ||
*/ | ||
function name() public view virtual returns (string memory) { | ||
return "DFI"; | ||
} | ||
|
||
/** | ||
* @dev Returns the symbol of the token, usually a shorter version of the | ||
* name. | ||
*/ | ||
function symbol() public view virtual returns (string memory) { | ||
return "DFI"; | ||
} | ||
|
||
/** | ||
* @dev Returns the number of decimals used to get its user representation. | ||
* For example, if `decimals` equals `2`, a balance of `505` tokens should | ||
* be displayed to a user as `5.05` (`505 / 10 ** 2`). | ||
* | ||
* Tokens usually opt for a value of 18, imitating the relationship between | ||
* Ether and Wei. This is the default value returned by this function, unless | ||
* it's overridden. | ||
* | ||
* NOTE: This information is only used for _display_ purposes: it in | ||
* no way affects any of the arithmetic of the contract, including | ||
* {IERC20-balanceOf} and {IERC20-transfer}. | ||
*/ | ||
function decimals() public view virtual returns (uint8) { | ||
return 18; | ||
} | ||
|
||
function bridgeDST20( | ||
address contractAddress, | ||
address from, | ||
address payable to, | ||
uint256 amount, | ||
string memory nativeAddress | ||
) external { | ||
if (to != address(this)) { | ||
IERC20(contractAddress).transferFrom(from, to, amount); | ||
} | ||
emit NativeAddress(nativeAddress); | ||
} | ||
} |
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,4 @@ | ||
/** @type import('hardhat/config').HardhatUserConfig */ | ||
module.exports = { | ||
solidity: '0.8.19' | ||
} |
Oops, something went wrong.