feat: remaining record content types to support #79

Closed
0xmuralik wants to merge 35 commits from murali/record-attributes into main
Showing only changes of commit 4d5568bf83 - Show all commits

View File

@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"reflect"
"reflect" // #nosec G702 This is also used in eip712 antehandler code. No new risk introduced.
github-code-scanning[bot] commented 2023-01-20 11:11:55 +00:00 (Migrated from github.com)
Review

Sensitive package import

Certain system packages contain functions which may be a possible source of non-determinism

Show more details

## Sensitive package import Certain system packages contain functions which may be a possible source of non-determinism [Show more details](https://github.com/cerc-io/laconicd/security/code-scanning/599)
github-code-scanning[bot] commented 2023-03-16 05:25:52 +00:00 (Migrated from github.com)
Review

Sensitive package import

Certain system packages contain functions which may be a possible source of non-determinism

Show more details

## Sensitive package import Certain system packages contain functions which may be a possible source of non-determinism [Show more details](https://github.com/cerc-io/laconicd/security/code-scanning/1208)
"sort"
"time"
@ -332,6 +332,7 @@ func (k Keeper) ProcessAttributes(ctx sdk.Context, record types.RecordType) erro
func (k Keeper) insertAttributes(ctx sdk.Context, recordID string, attr interface{}, keyPrefix string) error {
if reflect.TypeOf(attr).Kind() == reflect.Map {
val := attr.(map[string]interface{})
// #nosec G705
for key := range val {
newKeyPrefix := fmt.Sprint(keyPrefix + key + "---")
if err := k.insertAttributes(ctx, recordID, val[key], newKeyPrefix); err != nil {