github.com/SmartMeshFoundation/Spectrum@v0.0.0-20220621030607-452a266fee1e/contracts/statute/src/meshbox.sol (about) 1 pragma solidity >=0.5.0 <=0.5.3; 2 3 import "./owned.sol"; 4 5 contract MeshBox is Owned { 6 7 mapping(address => uint256) meshboxAddress; 8 9 function addAddress(address[] memory _owners, uint256 version) public onlyOwner() { 10 uint len = _owners.length; 11 for (uint i = 0; i < len; i ++) { 12 meshboxAddress[_owners[i]] = version; 13 } 14 } 15 16 function delAddress(address[] memory _owners) public onlyOwner() { 17 uint len = _owners.length; 18 for (uint i = 0; i < len; i ++) { 19 meshboxAddress[_owners[i]] = 0; 20 } 21 } 22 23 function existAddress(address _owner) view public returns (uint256){ 24 return meshboxAddress[_owner]; 25 } 26 }