Skip to content

Commit

Permalink
style: MockOjoContract -> MockOjo
Browse files Browse the repository at this point in the history
  • Loading branch information
rbajollari committed Jan 23, 2024
1 parent 5a9fdd1 commit f90ed1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions contracts/MockOjoContract.sol → contracts/MockOjo.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IERC20.sol"
import "./IOjo.sol";
import "./OjoTypes.sol";

contract MockOjoContract {
contract MockOjo {
IOjo public immutable ojo;

struct Balance {
Expand Down Expand Up @@ -65,7 +65,7 @@ contract MockOjoContract {
ojo.callContractMethodWithOjoPriceData{value: msg.value}(
assetNames,
address(this),
MockOjoContract.setBalance.selector,
MockOjo.setBalance.selector,
commandParams
);
}
Expand All @@ -85,7 +85,7 @@ contract MockOjoContract {
ojo.callContractMethodWithOjoPriceDataAndToken{value: msg.value}(
assetNames,
address(this),
MockOjoContract.setBalance.selector,
MockOjo.setBalance.selector,
commandParams,
symbol,
amount
Expand Down
10 changes: 5 additions & 5 deletions test/MockOjoContract.ts → test/MockOjo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ describe("Deploy", function () {
const Ojo = await ethers.getContractFactory("Ojo");
const ojo = await Ojo.deploy(axelarGateway.address, axelarGasReceiver.address, ojoChain, ojoAddress, resolveWindow);

const MockOjoContract = await ethers.getContractFactory("MockOjoContract");
const mockOjoContract = await MockOjoContract.deploy(await ojo.getAddress())
const MockOjo = await ethers.getContractFactory("MockOjo");
const mockOjo = await MockOjo.deploy(await ojo.getAddress())

return {deployer, mockOjoContract, ojo}
return {deployer, mockOjo, ojo}
}


it("sets address of ojo contract correctly", async function(){
const { mockOjoContract, ojo} = await loadFixture(deployMockOjoContract);
const { mockOjo, ojo} = await loadFixture(deployMockOjoContract);

expect(await mockOjoContract.ojo()).eq(await ojo.getAddress())
expect(await mockOjo.ojo()).eq(await ojo.getAddress())
})
})

0 comments on commit f90ed1d

Please sign in to comment.