Skip to content

Commit

Permalink
Pull the correct SN rewards contract address in C++, fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Doy-lee committed Oct 17, 2024
1 parent 860a5e0 commit 1cabda5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/cpp/test/src/hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ std::string_view DOMAIN_SEPARATION_TAG_BYTES32 =

std::array<std::string, 4> convertToHexStrings(const uint8_t md[128]) {
std::array<std::string, 4> 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<int>(md[i * 32 + j]);
}
result[i] = ss.str();
Expand Down
5 changes: 4 additions & 1 deletion test/cpp/test/src/rewards_contract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 1cabda5

Please sign in to comment.