diff --git a/test/cpp/test/src/hash.cpp b/test/cpp/test/src/hash.cpp index b828c4b..5f320ef 100644 --- a/test/cpp/test/src/hash.cpp +++ b/test/cpp/test/src/hash.cpp @@ -13,10 +13,10 @@ std::string_view DOMAIN_SEPARATION_TAG_BYTES32 = std::array convertToHexStrings(const uint8_t md[128]) { std::array result; - for (int i = 0; i < 4; ++i) { + for (size_t i = 0; i < result.max_size(); ++i) { std::stringstream ss; ss << "0x"; - for (int j = 0; j < 32; ++j) { + for (size_t j = 0; j < 32; ++j) { ss << std::setfill('0') << std::setw(2) << std::hex << static_cast(md[i * 32 + j]); } result[i] = ss.str(); diff --git a/test/cpp/test/src/rewards_contract.cpp b/test/cpp/test/src/rewards_contract.cpp index 0e41f5b..d3609b3 100644 --- a/test/cpp/test/src/rewards_contract.cpp +++ b/test/cpp/test/src/rewards_contract.cpp @@ -39,7 +39,10 @@ int main(int argc, char *argv[]) { signer.provider->addClient("Client", std::string(config.RPC_URL)); erc20_contract.provider.addClient("Client", std::string(config.RPC_URL)); rewards_contract.provider.addClient("Client", std::string(config.RPC_URL)); - contract_address = defaultProvider.getContractDeployedInLatestBlock(); + + // NOTE: The SN rewards contract has a deterministic deployment address + // because we use a pre-determined debug wallet provided by Hardhat. + contract_address = "0x5FC8d32690cc91D4c39d9d3abcBD16989F875707"; // NOTE: Setup keys seckey = ethyl::utils::fromHexString(std::string(config.PRIVATE_KEY));