@@ -449,6 +449,7 @@ type cadenceValueMigrationReporter struct {
449
449
450
450
var _ capcons.LinkMigrationReporter = & cadenceValueMigrationReporter {}
451
451
var _ capcons.CapabilityMigrationReporter = & cadenceValueMigrationReporter {}
452
+ var _ capcons.StorageCapabilityMigrationReporter = & cadenceValueMigrationReporter {}
452
453
var _ migrations.Reporter = & cadenceValueMigrationReporter {}
453
454
454
455
func newValueMigrationReporter (
@@ -529,6 +530,30 @@ func (t *cadenceValueMigrationReporter) MissingCapabilityID(
529
530
})
530
531
}
531
532
533
+ func (t * cadenceValueMigrationReporter ) MissingBorrowType (
534
+ accountAddress common.Address ,
535
+ addressPath interpreter.AddressPath ,
536
+ ) {
537
+ t .reportWriter .Write (storageCapConsMissingBorrowTypeEntry {
538
+ AccountAddress : accountAddress ,
539
+ AddressPath : addressPath ,
540
+ })
541
+ }
542
+
543
+ func (t * cadenceValueMigrationReporter ) IssuedStorageCapabilityController (
544
+ accountAddress common.Address ,
545
+ addressPath interpreter.AddressPath ,
546
+ borrowType * interpreter.ReferenceStaticType ,
547
+ capabilityID interpreter.UInt64Value ,
548
+ ) {
549
+ t .reportWriter .Write (storageCapConIssuedEntry {
550
+ AccountAddress : accountAddress ,
551
+ AddressPath : addressPath ,
552
+ BorrowType : borrowType ,
553
+ CapabilityID : capabilityID ,
554
+ })
555
+ }
556
+
532
557
func (t * cadenceValueMigrationReporter ) MigratedLink (
533
558
accountAddressPath interpreter.AddressPath ,
534
559
capabilityID interpreter.UInt64Value ,
@@ -801,35 +826,66 @@ func (e dictionaryKeyConflictEntry) MarshalJSON() ([]byte, error) {
801
826
})
802
827
}
803
828
804
- // storageCapconIssuedEntry
829
+ // storageCapConIssuedEntry
805
830
806
- type storageCapconIssuedEntry struct {
831
+ type storageCapConIssuedEntry struct {
807
832
AccountAddress common.Address
808
- Path interpreter.PathValue
833
+ AddressPath interpreter.AddressPath
809
834
BorrowType interpreter.StaticType
810
835
CapabilityID interpreter.UInt64Value
811
836
}
812
837
813
- var _ valueMigrationReportEntry = storageCapconIssuedEntry {}
838
+ var _ valueMigrationReportEntry = storageCapConIssuedEntry {}
814
839
815
- func (e storageCapconIssuedEntry ) accountAddress () common.Address {
840
+ func (e storageCapConIssuedEntry ) accountAddress () common.Address {
816
841
return e .AccountAddress
817
842
}
818
843
819
- var _ json.Marshaler = storageCapconIssuedEntry {}
844
+ var _ json.Marshaler = storageCapConIssuedEntry {}
820
845
821
- func (e storageCapconIssuedEntry ) MarshalJSON () ([]byte , error ) {
846
+ func (e storageCapConIssuedEntry ) MarshalJSON () ([]byte , error ) {
822
847
return json .Marshal (struct {
823
848
Kind string `json:"kind"`
824
849
AccountAddress string `json:"account_address"`
850
+ Address string `json:"address"`
825
851
Path string `json:"path"`
826
852
BorrowType string `json:"borrow_type"`
827
853
CapabilityID string `json:"capability_id"`
828
854
}{
829
855
Kind : "storage-capcon-issued" ,
830
856
AccountAddress : e .AccountAddress .HexWithPrefix (),
831
- Path : e .Path .String (),
857
+ Address : e .AddressPath .Address .HexWithPrefix (),
858
+ Path : e .AddressPath .Path .String (),
832
859
BorrowType : string (e .BorrowType .ID ()),
833
860
CapabilityID : e .CapabilityID .String (),
834
861
})
835
862
}
863
+
864
+ // StorageCapConMissingBorrowType
865
+
866
+ type storageCapConsMissingBorrowTypeEntry struct {
867
+ AccountAddress common.Address
868
+ AddressPath interpreter.AddressPath
869
+ }
870
+
871
+ var _ valueMigrationReportEntry = storageCapConsMissingBorrowTypeEntry {}
872
+
873
+ func (e storageCapConsMissingBorrowTypeEntry ) accountAddress () common.Address {
874
+ return e .AccountAddress
875
+ }
876
+
877
+ var _ json.Marshaler = storageCapConsMissingBorrowTypeEntry {}
878
+
879
+ func (e storageCapConsMissingBorrowTypeEntry ) MarshalJSON () ([]byte , error ) {
880
+ return json .Marshal (struct {
881
+ Kind string `json:"kind"`
882
+ AccountAddress string `json:"account_address"`
883
+ Address string `json:"address"`
884
+ Path string `json:"path"`
885
+ }{
886
+ Kind : "storage-capcon-missing-borrow-type" ,
887
+ AccountAddress : e .AccountAddress .HexWithPrefix (),
888
+ Address : e .AddressPath .Address .HexWithPrefix (),
889
+ Path : e .AddressPath .Path .String (),
890
+ })
891
+ }
0 commit comments