mirror of
https://github.com/placeholder-soft/tokenbound.git
synced 2026-04-29 12:25:00 +08:00
* moved to custom proxy implementation, added example for locked vault * Removed lock implementation using module * Moved to MinimalProxyStore + execution module pattern * Removed MinimalReceiver * Added natspec to MinimalProxyStore * Cleaned up imports and modified contract natspec * Improved natspec docs * Added test for minimal proxy store reverts * Cleaned up tests * Added test for custom execution module
33 lines
791 B
Solidity
33 lines
791 B
Solidity
// SPDX-License-Identifier: UNLICENSED
|
|
pragma solidity ^0.8.13;
|
|
|
|
import "forge-std/Test.sol";
|
|
|
|
import "../src/Vault.sol";
|
|
import "../src/VaultRegistry.sol";
|
|
|
|
contract VaultRegistryTest is Test {
|
|
VaultRegistry public vaultRegistry;
|
|
|
|
function setUp() public {
|
|
vaultRegistry = new VaultRegistry();
|
|
}
|
|
|
|
function testDeployVault(uint256 tokenId) public {
|
|
assertTrue(address(vaultRegistry) != address(0));
|
|
|
|
address predictedVaultAddress = vaultRegistry.vaultAddress(
|
|
vm.addr(1337),
|
|
tokenId
|
|
);
|
|
|
|
address vaultAddress = vaultRegistry.deployVault(
|
|
vm.addr(1337),
|
|
tokenId
|
|
);
|
|
|
|
assertTrue(vaultAddress != address(0));
|
|
assertTrue(vaultAddress == predictedVaultAddress);
|
|
}
|
|
}
|