Skip to content

Commit

Permalink
feat: update interface
Browse files Browse the repository at this point in the history
  • Loading branch information
iavl committed May 29, 2024
1 parent 6c853a2 commit 3504247
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 34 deletions.
7 changes: 7 additions & 0 deletions src/Follow.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.22;

import {IFollow} from "./interfaces/IFollow.sol";
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";

//contract Follow is IFollow, ERC20 {}
19 changes: 0 additions & 19 deletions src/interfaces/IAccountFactory.sol

This file was deleted.

28 changes: 13 additions & 15 deletions src/interfaces/IEntryPoint.sol → src/interfaces/IFollow.sol
Original file line number Diff line number Diff line change
@@ -1,49 +1,47 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.22;

interface IEntryPoint {
interface IFollow {
/**
* @notice Creates a new contract account.
* @notice Register a new account.
* @dev Only ADMIN_ROLE is allowed to call this method.
* @param owner The account owner.
* @param userId The new user ID to register.
*/
function createAccount(address owner) external returns (address);
function register(bytes32 userId, address account) external returns (address);

/**
* @notice Creates a new contract account.
* @notice Mints new tokens.
* @param to The account to receive the tokens.
*/
function claimTokens(address to) external;
function mint(address to) external;

/**
* @notice Creates a feed.
* @dev Only ADMIN_ROLE is allowed to call this method.
* @param feedId The feed id.
* @param account The account who owns the feed.
* @param userId The user ID who owns the feed.
*/
function createFeed(bytes32 feedId, address account) external;
function createFeed(bytes32 feedId, bytes32 userId) external;

/**
* @notice Returns the feed owner.
* @param feedId The feed id.
* @return The feed owner.
* @return userId The user ID who owns the feed.
*/
function getFeedOwner(bytes32 feedId) external view returns (address);
function getFeedOwner(bytes32 feedId) external view returns (bytes32 userId);

/**
* @notice Tips the recipient feed.
* @param from The address who sends the tip.
* @param amount The amount of the tip.
* @param feedId The feed id.
* @param entryId The entry id.
*/
function tip(address from, uint256 amount, bytes32 feedId, uint256 entryId) external;
function tip(address from, uint256 amount, bytes32 feedId) external;

/**
* @notice Transfer tokens.
* @param from The address who sends the tokens.
* @notice Withdraws tokens.
* @param to The address who receives the tokens.
* @param amount The amount of the tokens.
*/
function transfer(address from, address to, uint256 amount) external;
function withdraw(address to, uint256 amount) external;
}

0 comments on commit 3504247

Please sign in to comment.