Created
July 12, 2022 07:41
-
-
Save dancojocaru2000/900ac59fcb70f72c01f15a791f637913 to your computer and use it in GitHub Desktop.
Thingymajig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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