Skip to content

Commit

Permalink
draft abi
Browse files Browse the repository at this point in the history
  • Loading branch information
Farber98 committed Sep 23, 2024
1 parent e6bb94a commit 805bbd3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 28 deletions.
11 changes: 8 additions & 3 deletions contracts/src/v0.8/shared/test/helpers/ChainReaderTester.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ struct TestStruct {
uint8 OracleId;
uint8[32] OracleIds;
address Account;
address AccountStr;
address[] Accounts;
int192 BigField;
MidLevelTestStruct NestedStruct;
Expand All @@ -29,6 +30,7 @@ contract ChainReaderTester {
uint8 oracleId,
uint8[32] oracleIds,
address Account,
address AccountStr,
address[] Accounts,
string differentField,
int192 bigField,
Expand Down Expand Up @@ -61,11 +63,12 @@ contract ChainReaderTester {
uint8 oracleId,
uint8[32] calldata oracleIds,
address account,
address accountStr,
address[] calldata accounts,
int192 bigField,
MidLevelTestStruct calldata nestedStruct
) public {
s_seen.push(TestStruct(field, differentField, oracleId, oracleIds, account, accounts, bigField, nestedStruct));
s_seen.push(TestStruct(field, differentField, oracleId, oracleIds, account, accountStr, accounts, bigField, nestedStruct));
}

function setAlterablePrimitiveValue(uint64 value) public {
Expand All @@ -78,11 +81,12 @@ contract ChainReaderTester {
uint8 oracleId,
uint8[32] calldata oracleIds,
address account,
address accountStr,
address[] calldata accounts,
int192 bigField,
MidLevelTestStruct calldata nestedStruct
) public pure returns (TestStruct memory) {
return TestStruct(field, differentField, oracleId, oracleIds, account, accounts, bigField, nestedStruct);
return TestStruct(field, differentField, oracleId, oracleIds, account, accountStr, accounts, bigField, nestedStruct);
}

function getElementAtIndex(uint256 i) public view returns (TestStruct memory) {
Expand Down Expand Up @@ -114,12 +118,13 @@ contract ChainReaderTester {
uint8 oracleId,
uint8[32] calldata oracleIds,
address account,
address accountStr,
address[] calldata accounts,
string calldata differentField,
int192 bigField,
MidLevelTestStruct calldata nestedStruct
) public {
emit Triggered(field, oracleId, oracleIds, account, accounts, differentField, bigField, nestedStruct);
emit Triggered(field, oracleId, oracleIds, account, accountStr, accounts, differentField, bigField, nestedStruct);
}

function triggerEventWithDynamicTopic(string calldata field) public {
Expand Down
Loading

0 comments on commit 805bbd3

Please sign in to comment.