mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Disallow to use typehash() for structs with nested mappings
This commit is contained in:
		
							parent
							
								
									c4e8d3754d
								
							
						
					
					
						commit
						1d40bb4940
					
				| @ -420,6 +420,9 @@ std::string StructDefinition::eip712EncodeTypeWithoutSubtypes() const | ||||
| 
 | ||||
| std::string StructDefinition::eip712EncodeType() const | ||||
| { | ||||
| 	// EIP-712 supports recurvie structs, but not containing nested mappings
 | ||||
| 	solAssert(!annotation().containsNestedMapping.has_value() || !annotation().containsNestedMapping.value(), "Struct containing mapping cannot be used in EIP-712."); | ||||
| 
 | ||||
| 	// std::set enables duplicates elimination and ordered enumeration
 | ||||
| 	std::set<std::string> subtypes; | ||||
| 	insertEip712EncodedSubtypes(subtypes); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user