mirror of
https://github.com/Instadapp/dsa-periphery-contract.git
synced 2024-07-29 22:27:13 +00:00
fix: unit test
This commit is contained in:
parent
dc2f9b736f
commit
b2b8385e68
|
@ -118,7 +118,7 @@ contract InstadappAdapterTest is TestHelper {
|
|||
InstadappAdapter.CastData memory castData = InstadappAdapter.CastData(_targetNames, _datas, _origin);
|
||||
|
||||
bytes
|
||||
memory signature = hex"ac66d103e593be748af47496663fd93133970928dbfdade49bcca087d41773e95f4ead6a0897057adc61a67a6664de7730cc34055fdd500fded8c83b1e696fd61b";
|
||||
memory signature = hex"ec163cca0d31ea58537dfff8377fdbd957fb0ba58088f74436af944bf1c3248148910f14a13b7d0b6d707fb7478cfd7f9ae3830b02d0a5e5584ef7648460a8d71c";
|
||||
|
||||
address auth = originSender;
|
||||
vm.warp(timestamp);
|
||||
|
@ -145,7 +145,7 @@ contract InstadappAdapterTest is TestHelper {
|
|||
InstadappAdapter.CastData memory castData = InstadappAdapter.CastData(_targetNames, _datas, _origin);
|
||||
|
||||
bytes
|
||||
memory signature = hex"ac66d103e593be748af47496663fd93133970928dbfdade49bcca087d41773e95f4ead6a0897057adc61a67a6664de7730cc34055fdd500fded8c83b1e696fd61b";
|
||||
memory signature = hex"ec163cca0d31ea58537dfff8377fdbd957fb0ba58088f74436af944bf1c3248148910f14a13b7d0b6d707fb7478cfd7f9ae3830b02d0a5e5584ef7648460a8d71c";
|
||||
|
||||
address auth = originSender;
|
||||
vm.warp(timestamp);
|
||||
|
|
|
@ -13,11 +13,7 @@ import {TestERC20} from "./utils/TestERC20.sol";
|
|||
contract MockInstadappReceiver is InstadappAdapter {
|
||||
constructor() {}
|
||||
|
||||
function tryGetDigest(
|
||||
CastData memory castData,
|
||||
bytes32 salt,
|
||||
uint256 deadline
|
||||
) external returns(bytes32) {
|
||||
function tryGetDigest(CastData memory castData, bytes32 salt, uint256 deadline) external returns (bytes32) {
|
||||
return getDigest(castData, salt, deadline);
|
||||
}
|
||||
}
|
||||
|
@ -28,15 +24,21 @@ contract InstadappTargetTest is TestHelper, EIP712 {
|
|||
address instadappReceiver = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f;
|
||||
|
||||
// ============ Events ============
|
||||
event AuthCast(bytes32 indexed transferId, address indexed dsaAddress, bool indexed success, address auth, bytes returnedData);
|
||||
event AuthCast(
|
||||
bytes32 indexed transferId,
|
||||
address indexed dsaAddress,
|
||||
bool indexed success,
|
||||
address auth,
|
||||
bytes returnedData
|
||||
);
|
||||
|
||||
// ============ Test set up ============
|
||||
function setUp() public override {
|
||||
super.setUp();
|
||||
|
||||
instadappTarget = new InstadappTarget(MOCK_CONNEXT);
|
||||
MockInstadappReceiver _instadappReceiver = new MockInstadappReceiver();
|
||||
vm.etch(instadappReceiver, address(_instadappReceiver).code);
|
||||
|
||||
instadappTarget = new InstadappTarget(MOCK_CONNEXT);
|
||||
}
|
||||
|
||||
constructor() EIP712("InstaTargetAuth", "1") {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user