Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
c2f5745a
Commit
c2f5745a
authored
May 03, 2023
by
tre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lint
parent
42d2d291
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
35 deletions
+15
-35
Faucet.sol
...contracts-periphery/contracts/universal/faucet/Faucet.sol
+15
-35
No files found.
packages/contracts-periphery/contracts/universal/faucet/Faucet.sol
View file @
c2f5745a
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
pragma solidity 0.8.15;
pragma solidity 0.8.15;
import { Semver } from "@eth-optimism/contracts-bedrock/contracts/universal/Semver.sol";
import { Semver } from "@eth-optimism/contracts-bedrock/contracts/universal/Semver.sol";
import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import { SignatureChecker } from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import { SignatureChecker } from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import {
import {
EIP712Upgradeable
EIP712Upgradeable
...
@@ -65,8 +64,6 @@ contract AdminFAM is FaucetAuthModule, Semver, EIP712Upgradeable {
...
@@ -65,8 +64,6 @@ contract AdminFAM is FaucetAuthModule, Semver, EIP712Upgradeable {
*/
*/
bytes32 public constant PROOF_TYPEHASH =
bytes32 public constant PROOF_TYPEHASH =
keccak256("Proof(address recipient,bytes32 nonce,bytes id)");
keccak256("Proof(address recipient,bytes32 nonce,bytes id)");
// bytes32 public constant PROOF_TYPEHASH =
// keccak256("Proof(address recipient,bytes id)");
/**
/**
* @notice Struct that represents a proof that verifies the admin.
* @notice Struct that represents a proof that verifies the admin.
...
@@ -107,13 +104,7 @@ contract AdminFAM is FaucetAuthModule, Semver, EIP712Upgradeable {
...
@@ -107,13 +104,7 @@ contract AdminFAM is FaucetAuthModule, Semver, EIP712Upgradeable {
Faucet.DripParameters memory params,
Faucet.DripParameters memory params,
bytes memory id,
bytes memory id,
bytes memory proof
bytes memory proof
)
) external view returns (bool) {
external
view
returns (
bool
)
{
// Generate a EIP712 typed data hash to compare against the proof.
// Generate a EIP712 typed data hash to compare against the proof.
bytes32 digest = _hashTypedDataV4(
bytes32 digest = _hashTypedDataV4(
keccak256(
keccak256(
...
@@ -203,10 +194,7 @@ contract Faucet {
...
@@ -203,10 +194,7 @@ contract Faucet {
/**
/**
* @notice Allows users to donate ETH to this contract.
* @notice Allows users to donate ETH to this contract.
*/
*/
receive()
receive() external payable {
external
payable
{
// Thank you!
// Thank you!
}
}
...
@@ -219,10 +207,7 @@ contract Faucet {
...
@@ -219,10 +207,7 @@ contract Faucet {
function withdraw(
function withdraw(
address payable recipient,
address payable recipient,
uint256 amount
uint256 amount
)
) public priviledged {
public
priviledged
{
new SafeSend{value: amount}(recipient);
new SafeSend{value: amount}(recipient);
}
}
...
@@ -235,10 +220,7 @@ contract Faucet {
...
@@ -235,10 +220,7 @@ contract Faucet {
function configure(
function configure(
FaucetAuthModule module,
FaucetAuthModule module,
ModuleConfig memory config
ModuleConfig memory config
)
) public priviledged {
public
priviledged
{
modules[module] = config;
modules[module] = config;
}
}
...
@@ -251,9 +233,7 @@ contract Faucet {
...
@@ -251,9 +233,7 @@ contract Faucet {
function drip(
function drip(
DripParameters memory params,
DripParameters memory params,
AuthParameters memory auth
AuthParameters memory auth
)
) public {
public
{
// Grab the module config once.
// Grab the module config once.
ModuleConfig memory config = modules[auth.module];
ModuleConfig memory config = modules[auth.module];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment