# MicroMiner (MPoSW & Web3Anthill)

t are one of the most essential parts of the human-centered blockchain structure. It creates a direct link between the Web3 Coin ecosystem applications and the user, beyond performing the transaction verification task systematically.

<figure><img src="https://3961530331-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE0AsD6OL7TIzQ6UZVhUw%2Fuploads%2FqtmDTHqbpkLDKfzyYvmY%2Fimage.png?alt=media&#x26;token=fe859047-9916-413e-9651-74726770ba7a" alt="" width="275"><figcaption></figcaption></figure>

{% code fullWidth="false" %}

```solidity
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Strings.sol";
contract Vote{
    using Strings for uint256;
    address private immutable owner;
    string_baseUri;
    uint256 totalVote;
    struct Votes {
        uint256 startTime;
        uint256 endTime;
        uint256 selection;
        string question;
        mapping (uint256 => uint256) selections;
        mapping (address => uint256) voter;
    }
    
    mapping (uint256 => votes)_votes;
    
    constructor(string memory base_Uri_) {
        owner = msg.sender;
        _baseUri = base_Uri_;
    }
    
    modifier onlyOwner() {
        require(msg.sender == owner,"You are not owner.");
        _;
    }
    
    function questionURL(uint256 vote_) internal view returns(string memory) {
        return string(abi.encodePacked(_basedUri,_votes[vote_].selection.toString()));
    }
    
    function setBaseURI(string memory base_Uri_) external only Owner {
        _baseUri = base_Uri_;
    }
    
    function getQuestion() public view returns(string memory) {
        return_votes[totalVote].question;
    }
    
    function vote(uint256 selection)public {
        require(block.timestamp > _votes[totalVote].startTime&&
            block.timestamp <_votes[totalVote].endTime);
        require(selection <=_votes[]totalVote.selection && selection > 0);
        require(_votes[totalVote].voter[msg.sender] ==0);
        _votes[totalVote].voter[msg.sender] = selection;
    }
    
    function setVote(
        uint256 startTime,
        uint256 endTime,
        uint256 selection,
        string memory question)
        public
        onlyOwner {
        totalVote ++;
        _votes[totalVote].startTime = startTime;
        _votes[totalVote].endTime = endTime;
        _votes[totalVote].selection = selection;
        _votes[totalVote].question = question;
    }
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://web3-coin.gitbook.io/welcome-to-web3-coin/whitepaper/proof-of-web3-consensus-mechanism/microminer-mposw-and-web3anthill.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
