Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pragma solidity >=0.4.22 <0.6.0;
- contract Object{
- address oid;
- struct Attribute{
- string attrName;
- string attrValue;
- }
- mapping(string=>string) oa;
- constructor()public payable{
- }
- function appendAttribute(string memory _attrName,string memory _value) public{
- oa[_attrName] = _value;
- }
- function getAttriuteValue(string memory _attrName)
- public
- returns (string memory)
- {
- return oa[_attrName];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement