> For the complete documentation index, see [llms.txt](https://docs.metatime.com/whitepaper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.metatime.com/whitepaper/proof-of-meta-consensus-mechanism/microminer-mposw-and-metaanthill.md).

# MicroMiner (MPoSW & MetaAnthill)

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

<figure><img src="https://989455816-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAIzmobbGXH6E0WrRNrgp%2Fuploads%2FAbgo6AkBNlk5r3p5zIZs%2Fmicrominer.png?alt=media&amp;token=50359bb7-6c6a-449f-a316-16be3163ae9e" 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 %}
