Skip to content

Solidity smart contract to implement Proof of Fund system

Notifications You must be signed in to change notification settings

0xjib/smart_contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

This Solidity smart contract implements a Proof of Funds system.

This contract allows an external party to verify that a specific Ethereum account has a certain balance of an ERC777 token. The contract stores the address of the ERC777 token and the required balance that an account must have to be considered verified.

constructor: This is the contract's constructor function, which takes two arguments: _erc777TokenAddress and _requiredBalance. It sets the owner, erc777TokenAddress, and requiredBalance state variables.

verify: This function takes an account address as an argument and returns a boolean value. It uses the IERC777 interface to check the balance of the specified account and returns true if the balance is greater than or equal to the requiredBalance.

updateRequiredBalance: This function takes a _requiredBalance value as an argument and updates the requiredBalance state variable. It can only be called by the contract's owner.

withdraw: This function allows the contract's owner to withdraw any funds that have been sent to the contract. It transfers the balance of the contract to the owner address. This function can only be called by the contract's owner.

The receive() function is a fallback function that does nothing but accept any incoming ether transactions.

Note that this contract does not implement the ERC777 interface. It only uses the balanceOf() function from the interface to check the balance of the ERC777 token.

About

Solidity smart contract to implement Proof of Fund system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published