daily pastebin goal
43%
SHARE
TWEET

Untitled

a guest Aug 15th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pragma solidity ^0.4.11;
  2. contract sm1{
  3.     event RequessToPasMessage(
  4.         address _eth,
  5.         bytes _dat
  6.     );
  7.    
  8.     function transwerMessage(address _a, bytes _b){
  9.         RequessToPasMessage(_a, _b);
  10.     }
  11. }
  12.  
  13.  
  14.  
  15.  
  16.  
  17. ----------------------------------------------------------------------------------------------------------------------
  18.  
  19.  
  20.  
  21. pragma solidity ^0.4.24;
  22.  
  23. contract sm2{
  24.     uint cnt;
  25.     address last;
  26.     mapping (address => bool) public volid;
  27.    
  28.     function addValid(){
  29.         volid[0xe868b537d601a40244bca72f7a7bf71ecb966dda] = true;
  30.         volid[0x570921b1bc7d749f13a162fb5f1c89e0aaa7aba8] = true;
  31.         cnt = 0;
  32.     }
  33.    
  34.     event MessageSucessfulPassed(address indexed addre,bytes  byt);
  35.     event MessagePassFail(address indexed ad,bytes by);
  36.    
  37.        
  38.     function PassMesage (address _sign, address _addre, bytes _data){
  39.         if(volid[_sign]==true){
  40.             cnt++;
  41.             volid[_sign] = false;
  42.         }        
  43.         if(cnt == 2){
  44.             if(_addre.call(_data)==true){
  45.                 MessageSucessfulPassed(_addre,_data);
  46.                 require(false);
  47.             }
  48.             else{
  49.                 MessagePassFail(_addre,_data);    
  50.                 require(false);
  51.             }
  52.         }
  53.     }
  54. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top