Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. pragma solidity >=0.4.22 <0.6.0;
  2.  
  3. contract Object{
  4. address oid;
  5.  
  6. struct Attribute{
  7. string attrName;
  8. string attrValue;
  9. }
  10.  
  11. mapping(string=>string) oa;
  12.  
  13. constructor()public payable{
  14.  
  15. }
  16. function appendAttribute(string memory _attrName,string memory _value) public{
  17. oa[_attrName] = _value;
  18.  
  19. }
  20.  
  21. function getAttriuteValue(string memory _attrName)
  22. public
  23. returns (string memory)
  24. {
  25. return oa[_attrName];
  26. }
  27.  
  28.  
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement