Skip to content

Commit

Permalink
update Engine Flex as PoC (#688)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryley-o authored May 3, 2023
1 parent 89bd352 commit fbb1791
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ contract GenArt721CoreV3_Engine_Flex is
IGenArt721CoreContractExposesHashSeed
{
using BytecodeStorageWriterV1 for string;
using BytecodeStorageReaderV1 for string;
using BytecodeStorageWriterV1 for address;
using BytecodeStorageReaderV1 for address;
using Bytes32Strings for bytes32;
uint256 constant ONE_HUNDRED = 100;
uint256 constant ONE_MILLION = 1_000_000;
Expand Down Expand Up @@ -1765,7 +1763,7 @@ contract GenArt721CoreV3_Engine_Flex is
if (_index >= project.scriptCount) {
return "";
}
return project.scriptBytecodeAddresses[_index].readFromBytecode();
return _readFromBytecode(project.scriptBytecodeAddresses[_index]);
}

/**
Expand Down Expand Up @@ -1996,7 +1994,7 @@ contract GenArt721CoreV3_Engine_Flex is
bytecodeAddress: _bytecodeAddress,
data: (_dependency.dependencyType ==
ExternalAssetDependencyType.ONCHAIN)
? _bytecodeAddress.readFromBytecode()
? _readFromBytecode(_bytecodeAddress)
: ""
});
}
Expand Down Expand Up @@ -2219,6 +2217,12 @@ contract GenArt721CoreV3_Engine_Flex is
FOUR_WEEKS_IN_SECONDS);
}

function _readFromBytecode(
address _address
) internal view returns (string memory) {
return BytecodeStorageReaderV1.readFromBytecode(_address);
}

// strings library from OpenZeppelin, modified for no constants

bytes16 private _HEX_SYMBOLS = "0123456789abcdef";
Expand Down
2 changes: 1 addition & 1 deletion hardhat.solidity-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const solidityConfig = {
settings: {
optimizer: {
enabled: true,
runs: 10,
runs: 25,
},
},
},
Expand Down

0 comments on commit fbb1791

Please sign in to comment.