def test_bmd_decode_bin_path_0(self): cs = ContractStorage( michelson_to_micheline("storage (big_map address nat)")) cs.big_map_init({'int': 42}) res = cs.big_map_diff_decode([{ 'action': 'update', 'big_map': '42', 'key': { 'string': 'tz1irF8HUsQp2dLhKNMhteG1qALNU9g3pfdN' }, 'value': { 'int': '100500' } }]) self.assertDictEqual({'tz1irF8HUsQp2dLhKNMhteG1qALNU9g3pfdN': 100500}, res)
def test_bmd_nested_tuples(self): cs = ContractStorage(michelson_to_micheline(key_pair_storage)) cs.big_map_init( michelson_to_micheline(""" Pair 100 { Elt (Pair "main" 0) 42 } """))