assetmantle / modules Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
"L|A|data,A|data1" works fine but the presence of a whitespace can cause problems
eg. "L|A|data, A|data1"
ReadIDData() can accept all special chars, there should be some kind of validation
GetID() along with other methods can accept special char.
https://github.com/AssetMantle/modules/blob/8963be3376df53e9816ecfd7ea61b667814da1d7/schema/data/base/idData.go
Line can't be hit, so can't get a success response in any case
modules/modules/assets/internal/transactions/renumerate/keeper.go
Lines 62 to 66 in a400852
decData.go: passing nil value in decData.GenerateHashID leads to panic - check if this is expected behaviour or not, null checks can be added to avoid fatal panic
modules/schema/lists/base/list_test.go
Line 90 in ed62da9
modules/modules/classifications/auxiliaries/define/request.go
Lines 25 to 32 in a689632
modules/modules/assets/internal/transactions/deputize/keeper.go
Lines 24 to 35 in ce0fbbb
modules/schema/properties/base/metaProperty_test.go
Lines 118 to 119 in 127e749
JSON output flag is not working. This will be great if you can integrate this flag.
assetClient query identities identities --output json
Error:
ERROR: Cannot encode unregistered concrete type mappable.identity.
modules/schema/lists/base/propertyList_test.go
Lines 188 to 190 in ed62da9
The use of testFromID, err := baseIDs.ReadIdentityID("CBepOLnJFnKO9NEyZlSv7r80nKNZFFXRqHfnsObZ_KU=.w1D9MwUD81HdnMXMEn-RjphrPDo76MVVH3EcgA81oVQ=") is causing errors, seems like an invalid base64 string however the real input required is not known yet so can’t update it
Initialize() for auxiliary panics for nil value
modules/schema/lists/base/idList_test.go
Line 55 in ed62da9
baseIDs.NewIdentityID(nil, nil)
having nil classificationID and immutables, NewIdentityID panics
HashID: GenerateHashID(classificationID.Bytes(), immutables.GenerateHashID().Bytes()),
Instead we can use:
baseIDs.PrototypeIdentityID()
there is no present check for deputize txns
{"+ve nil", fields{classificationID, baseQualified.Immutables{PropertyList: nil}.GenerateHashID()}, append(classificationID.Bytes(), baseQualified.Immutables{PropertyList: nil}.GenerateHashID().Bytes()...)},
Panics for
{"-ve InvalidParameter", args{baseTypes.NewParameter(baseIDs.NewID(""), baseData.NewStringData(""), validator)}, errors.InvalidParameter},
modules/schema/properties/base/metaProperty_test.go
Lines 175 to 176 in 127e749
modules/schema/properties/base/metaProperty_test.go
Lines 203 to 204 in 127e749
modules/schema/properties/base/metaProperty_test.go
Lines 259 to 260 in 127e749
modules/schema/properties/base/metaProperty_test.go
Lines 287 to 288 in 127e749
If Order is then nil then it will panic for nil to documents.Order typecasting
modules/modules/orders/internal/transactions/cancel/keeper.go
Lines 38 to 39 in e6d4b17
GenerateHash() along with some other functions panics for nil value.
https://github.com/AssetMantle/modules/blob/8963be3376df53e9816ecfd7ea61b667814da1d7/schema/data/base/listData.go
{"-ve", fields{"ID"}, args{NewID("ID2")}, 0},
for Above inputs it should result 1/-1 but it's passing that should not happen
modules/schema/properties/base/property_test.go
Lines 142 to 143 in 127e749
Instead of
func (listData listData) Search(data data.Data) (int, bool) {
return listData.Search(data)
}
It should be
func (listData listData) Search(data data.Data) (int, bool) {
return listData.Value.Search(data)
}
at listData.go
modules/modules/maintainers/internal/mappable/maintainer.go
Lines 30 to 35 in 753428b
in maintainer GetIdentityID(), panics at interface conversion
modules/schema/lists/base/dataList_test.go
Line 133 in ed62da9
modules/schema/lists/base/idList_test.go
Line 114 in ed62da9
for Test input:
{"+ve with nil mutables", fields{ClassificationID: classificationID, Immutables: testImmutables, Mutables: mutables{}}, args{[]properties.Property{testMutateProperty}}, document{ClassificationID: classificationID, Immutables: testImmutables, Mutables: mutables{}}.Mutate(testMutateProperty)},
in base/document.go
if metaProperties := base.NewMetaPropertyList(append(message.ImmutableMetaProperties.GetList(), message.MutableMetaProperties.GetList()...)...); metaProperties.GetMetaProperty(constants.LockProperty) != nil {
split = metaProperties.GetMetaProperty(constants.LockProperty).GetData().(data.DecData).Get()
}
Test Data:
id, testData, _ := createTestInput(t)
{"+ve", fields{id, testData, validator}, false},
Also For nil value it should not panic
https://github.com/AssetMantle/modules/blob/3e62f8cb40b10039df374e574e59a5f9518a135d/schema/parameters/base/parameter_test.go
// TODO fix this
// for i := range mappableList {
// immutables := baseQualified.NewImmutables(baseSimulation.GenerateRandomPropertyList(simulationState.Rand))
// mutables := baseQualified.NewMutables(baseSimulation.GenerateRandomPropertyList(simulationState.Rand))
// mappableList[i] = mappable.NewMappable(base.NewMaintainer(baseIDs.NewClassificationID(immutables, mutables), immutables, mutables))
// }
transactionKeeper have nil verifyAuxiliary
if auxiliaryResponse := transactionKeeper.verifyAuxiliary.GetKeeper().Help(context, verify.NewAuxiliaryRequest(message.From, message.FromID)); !auxiliaryResponse.IsSuccessful()
ReadListData() in listData.go file gives this error invalid Bech32 prefix; expected cosmos, got mantle
{"Test for some id", args{"mantle1x53dugvr4xvew442l9v2r5x7j8gfvged5xd3xr"}, NewListData(NewStringData("mantle1x53dugvr4xvew442l9v2r5x7j8gfvged5xd3xr")), assert.NoError},
modules/schema/ids/base/dataID_test.go
Line 27 in 0691026
modules/schema/ids/base/dataID_test.go
Line 78 in 0691026
modules/schema/ids/base/dataID_test.go
Line 110 in 0691026
For data {"-ve wrong parameter Type", args{baseTypes.NewParameter(baseIDs.NewID("newID"), baseData.NewStringData("newStringData"), validator)}, false},
it should return errors.InvalidParameter instead panics
https://github.com/AssetMantle/modules/blob/8963be3376df53e9816ecfd7ea61b667814da1d7/modules/identities/internal/parameters/dummy/validator.go
modules/schema/lists/base/idList_test.go
Line 30 in ed62da9
modules/schema/lists/base/propertyList_test.go
Lines 76 to 77 in ed62da9
For Following test data:
{"List Data", args{"L|"}, base.NewListData(nil), false}, //TODO: Fix this issue on priority
ReadData() is throwing fatal error: stack overflow
in string_test.go
recursion is happening on calling GetZeroValueDataFromID() at dataID.go
NewHeight() along with few other functions can accept -ve values as well for height.
eg. -100
In
modules/schema/data/base/listData.go
Line 29 in d67d671
modules/schema/data/base/listData_test.go
Line 283 in d67d671
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.