I want to originate a contract in SmartPy with an initial map()
payload. However the originated contract always has an empty contracts storage. Here's what I have:
def __init__(self):
self.init_type(
sp.TRecord(
contracts = sp.TMap(
sp.TString,
sp.TAddress
)
)
)
self.init(
contracts = {"contractA": sp.address("KT...")}
)
)
I have also tried removing sp.address
and having a simple string like "KT..."
. I also tried the alternate method of defining a map, anything that's described in the official documentation. I cannot understand what I'm doing wrong.