Skip to content

Commit

Permalink
fix: arc56 AVMBytes for state keys
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-p committed Oct 20, 2024
1 parent 40bfc31 commit 4db575a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/reti/artifacts/StakingPool.arc56_draft.json
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@
"algodVer": {
"key": "YWxnb2RWZXI=",
"keyType": "AVMBytes",
"valueType": "byte[]"
"valueType": "AVMBytes"
},
"roundsPerDay": {
"key": "cm91bmRzUGVyRGF5",
Expand Down
2 changes: 1 addition & 1 deletion examples/reti/artifacts/ValidatorRegistry.arc56_draft.json
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@
"stakingPoolApprovalProgram": {
"key": "cG9vbFRlbXBsYXRlQXBwcm92YWxCeXRlcw==",
"keyType": "AVMBytes",
"valueType": "byte[]"
"valueType": "AVMBytes"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/lib/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7719,7 +7719,7 @@ declare type AssetFreezeTxn = Required<AssetFreezeParams>;
state.keys[sp.type][sp.name] = {
key: Buffer.from(sp.key).toString('base64'),
keyType: 'AVMBytes',
valueType: typeInfoToABIString(sp.valueType),
valueType: equalTypes(sp.valueType, StackType.bytes) ? 'AVMBytes' : typeInfoToABIString(sp.valueType),
};
} else {
let keyType = equalTypes(sp.keyType, StackType.bytes) ? 'AVMBytes' : typeInfoToABIString(sp.keyType);
Expand Down
4 changes: 2 additions & 2 deletions tests/contracts/artifacts/GeneralTest.arc56_draft.json
Original file line number Diff line number Diff line change
Expand Up @@ -1100,12 +1100,12 @@
"pageOne": {
"key": "cGFnZU9uZQ==",
"keyType": "AVMBytes",
"valueType": "byte[]"
"valueType": "AVMBytes"
},
"pageTwo": {
"key": "cGFnZVR3bw==",
"keyType": "AVMBytes",
"valueType": "byte[]"
"valueType": "AVMBytes"
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions tests/contracts/artifacts/StorageTest.arc56_draft.json
Original file line number Diff line number Diff line change
Expand Up @@ -615,14 +615,14 @@
"globalKey": {
"key": "Zm9v",
"keyType": "AVMBytes",
"valueType": "byte[]"
"valueType": "AVMBytes"
}
},
"local": {
"localKey": {
"key": "Zm9v",
"keyType": "AVMBytes",
"valueType": "byte[]"
"valueType": "AVMBytes"
}
},
"box": {
Expand All @@ -634,7 +634,7 @@
"boxKey": {
"key": "Zm9v",
"keyType": "AVMBytes",
"valueType": "byte[]"
"valueType": "AVMBytes"
}
}
},
Expand Down

0 comments on commit 4db575a

Please sign in to comment.