-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Set functions for FHEVM/Gateway
- Loading branch information
1 parent
d06396e
commit 75e5aba
Showing
13 changed files
with
97 additions
and
23 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause-Clear | ||
pragma solidity ^0.8.24; | ||
|
||
import "fhevm/lib/TFHE.sol"; | ||
|
||
contract DefaultFHEVMConfig { | ||
constructor() { | ||
TFHE.setFHEVM(FHEVMConfig.defaultConfig()); | ||
} | ||
} |
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,10 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause-Clear | ||
pragma solidity ^0.8.24; | ||
|
||
import "fhevm/gateway/GatewayCaller.sol"; | ||
|
||
contract DefaultGatewayConfig { | ||
constructor() { | ||
Gateway.setGateway(Gateway.defaultGatewayAddress()); | ||
} | ||
} |
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,11 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause-Clear | ||
pragma solidity ^0.8.24; | ||
|
||
import { Comp } from "../../governance/Comp.sol"; | ||
import { DefaultFHEVMConfig } from "../DefaultFHEVMConfig.sol"; | ||
|
||
contract TestComp is DefaultFHEVMConfig, Comp { | ||
constructor(address owner_) Comp(owner_) { | ||
// | ||
} | ||
} |
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,17 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause-Clear | ||
pragma solidity ^0.8.24; | ||
|
||
import { GovernorAlphaZama } from "../../governance/GovernorAlphaZama.sol"; | ||
import { DefaultFHEVMConfig } from "../DefaultFHEVMConfig.sol"; | ||
import { DefaultGatewayConfig } from "../DefaultGatewayConfig.sol"; | ||
|
||
contract TestGovernorAlphaZama is DefaultFHEVMConfig, DefaultGatewayConfig, GovernorAlphaZama { | ||
constructor( | ||
address owner_, | ||
address timelock_, | ||
address comp_, | ||
uint256 votingPeriod_ | ||
) GovernorAlphaZama(owner_, timelock_, comp_, votingPeriod_) { | ||
// | ||
} | ||
} |
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,15 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause-Clear | ||
pragma solidity ^0.8.24; | ||
|
||
import { EncryptedERC20Mintable } from "../../../token/ERC20/extensions/EncryptedERC20Mintable.sol"; | ||
import { DefaultFHEVMConfig } from "../../DefaultFHEVMConfig.sol"; | ||
|
||
contract TestEncryptedERC20Mintable is DefaultFHEVMConfig, EncryptedERC20Mintable { | ||
constructor( | ||
string memory name_, | ||
string memory symbol_, | ||
address owner_ | ||
) EncryptedERC20Mintable(name_, symbol_, owner_) { | ||
// | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
contracts/test/token/ERC20/TestEncryptedERC20WithErrorsMintable.sol
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,15 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause-Clear | ||
pragma solidity ^0.8.24; | ||
|
||
import { EncryptedERC20WithErrorsMintable } from "../../../token/ERC20/extensions/EncryptedERC20WithErrorsMintable.sol"; | ||
import { DefaultFHEVMConfig } from "../../DefaultFHEVMConfig.sol"; | ||
|
||
contract TestEncryptedERC20WithErrorsMintable is DefaultFHEVMConfig, EncryptedERC20WithErrorsMintable { | ||
constructor( | ||
string memory name_, | ||
string memory symbol_, | ||
address owner_ | ||
) EncryptedERC20WithErrorsMintable(name_, symbol_, owner_) { | ||
// | ||
} | ||
} |
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