Warhead is an interactive treasure hunt and community game designed to engage users in two modes: Open Drop and Friend-to-Friend Drop. The game leverages geolocation to create immersive and fun experiences for both individual users and groups.
The smart contracts for Warhead have been deployed on Linea Mainnet and Mantle Mainnet.
- WarheadFactory
- WarheadNft
- ERC6551Account
- ERC6551Registry
- LocationRegistry
The WarheadFactory
contract manages the creation, launching, and claiming of warheads.
The WarheadNft
contract implements an ERC721 token representing the warhead and uses ERC6551Registry
for creating token-bound smart accounts to hold rewards.
Network | Forwarder Address | WarheadFactory Address | WarheadNft Address | ERC6551Account Address | ERC6551Registry Address | LocationRegistry Address |
---|---|---|---|---|---|---|
Linea Mainnet | 0x98b898ee7e62D1b0af50fD0fd653020D25bfe2F1 | 0x67744580E1ffC939e7DaE8B9c7F3899B0667d8A8 | [Address Needed] | [Address Needed] | [Address Needed] | [Address Needed] |
Mantle Mainnet | 0x5f664fA188E0ae1aF0410842AB30b24d06a325a9 | 0x722368b00248032a00e6BB0BB0B9d1C6c91AA5d5 | [Address Needed] | [Address Needed] | [Address Needed] | [Address Needed] |
Other Network | 0x0c197ccb1A0D9638d1db127A35CEFD5a9064Aa2F | 0x722368b00248032a00e6BB0BB0B9d1C6c91AA5d5 | [Address Needed] | [Address Needed] | [Address Needed] | [Address Needed] |
-
Open Drop Mode
- Drop a warhead at a specific location filled with rewards.
- People present at that location at the specified time can collect the reward.
-
Friend-to-Friend Drop Mode
- Send money or rewards to a friend by dropping a warhead at a specific location.
- The friend must go to the designated location to collect the reward.
WarheadCreated(uint256 warheadId, address dropper, address warheadAddress)
WarheadCreatedWithReceiver(uint256 warheadId, address dropper, address warheadAddress, address targetReceiver)
WarheadDropped(uint256 warheadId, int256 targetLat, int256 targetLong, uint256 impactTime)
WarheadClaimed(uint256 warheadId, address claimer, uint256 claimedAt)
To create a new warhead, call the createWarhead
function with the target receiver's address.
function createWarhead(address targetReceiver) external;
To drop a warhead at a specific location, call the dropWarhead
function with the warhead ID, coordinates, and impact time.
function dropWarhead(uint256 warheadId, Coord memory coord, uint256 impactTime) external;
To claim a warhead, call the claim
function with the location coordinates and warhead ID.
function claim(Coord calldata location, uint256 warheadId) external;
To fetch the information of a specific warhead, call the fetchWarheadInfo
function with the warhead ID.
function fetchWarheadInfo(uint256 warheadId) public view returns (WarheadObject memory);
The subgraph for this project is deployed on The Graph Protocol and can be accessed via the following link:
The substream for this project is available at:
- The contracts use
Ownable
for access control. - Geolocation and time checks ensure the integrity of the game mechanics.
- The WarheadNft contract secures rewards using ERC6551 token-bound smart accounts.
For security issues or inquiries, please contact: [email protected]
This project is licensed under the MIT License.
This project utilizes OpenZeppelin's smart contract library for secure and reliable contract development.
Use the contracts at your own risk. The authors are not responsible for any loss of funds or damages incurred from using these contracts.