Skip to content

Instantly share code, notes, and snippets.

@dancojocaru2000
Created July 12, 2022 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dancojocaru2000/900ac59fcb70f72c01f15a791f637913 to your computer and use it in GitHub Desktop.
Save dancojocaru2000/900ac59fcb70f72c01f15a791f637913 to your computer and use it in GitHub Desktop.
Thingymajig
final data = [
{
"name":"approve",
"inputs":[
{
"name":"to",
"type":"address"
},
{
"name":"tokenId",
"type":"uint256"
}
]
},
{
"name":"renounceOwnership",
"inputs":[
]
},
{
"name":"safeTransferFrom",
"inputs":[
{
"name":"from",
"type":"address"
},
{
"name":"to",
"type":"address"
},
{
"name":"tokenId",
"type":"uint256"
}
]
},
{
"name":"safeTransferFrom",
"inputs":[
{
"name":"from",
"type":"address"
},
{
"name":"to",
"type":"address"
},
{
"name":"tokenId",
"type":"uint256"
},
{
"name":"_data",
"type":"bytes"
}
]
},
{
"name":"setApprovalForAll",
"inputs":[
{
"name":"operator",
"type":"address"
},
{
"name":"approved",
"type":"bool"
}
]
},
{
"name":"transferFrom",
"inputs":[
{
"name":"from",
"type":"address"
},
{
"name":"to",
"type":"address"
},
{
"name":"tokenId",
"type":"uint256"
}
]
},
{
"name":"transferOwnership",
"inputs":[
{
"name":"newOwner",
"type":"address"
}
]
},
{
"name":"setIsAllowListActive",
"inputs":[
{
"name":"_isAllowListActive",
"type":"bool"
}
]
},
{
"name":"setAllowList",
"inputs":[
{
"name":"addresses",
"type":"address[]"
},
{
"name":"numAllowedToMint",
"type":"uint8"
}
]
},
{
"name":"mintAllowList",
"inputs":[
{
"name":"numberOfTokens",
"type":"uint8"
}
]
},
{
"name":"setBaseURI",
"inputs":[
{
"name":"baseURI_",
"type":"string"
}
]
},
{
"name":"setProvenance",
"inputs":[
{
"name":"provenance",
"type":"string"
}
]
},
{
"name":"reserve",
"inputs":[
{
"name":"n",
"type":"uint256"
}
]
},
{
"name":"setSaleState",
"inputs":[
{
"name":"newState",
"type":"bool"
}
]
},
{
"name":"mint",
"inputs":[
{
"name":"numberOfTokens",
"type":"uint256"
}
]
},
{
"name":"withdraw",
"inputs":[
]
}
];
Map<String, dynamic> methodParameters = {
'numberOfTokens': 1,
};
final name = "mint";
void main() {
print(data.where((d) => d['name'] == name).first['inputs']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment