Files
5b8cf885b3 improve(core): Upgrade to solidity 0.8.9 and resolve compiler warnings (#3447)
* Only set non-default Request storage variables saves 10k gas for requestPrice

* Save 1000 gas by exiting _getRequest early

* Initial tests

* Update OptimisticOracleLite.sol

* Add request params to events

* Remove customizeRequest, add bond and default liveness to requestPrice params

* Add requestAndProposePriceFor

* Add interface

* Change name

* Update OptimisticOracle.sol

* Update packages/core/contracts/oracle/interfaces/SkinnyOptimisticOracleInterface.sol

Co-authored-by: Chris Maree <[email protected]>

* temp

* Add callbacks

* Update SkinnyOptimisticOracle.sol

* Tests pass with Skinny OO

* Add test cases about when a relay is both disputed and re-relayed, should not be able to settle twice

* fix(insured-bridge): Instant relayer should only receive refund if they sped up valid relay

* Update BridgePool.js

* Fix clients

* Update BridgePool.sol

* Update BridgePool.sol

* Update BridgePool.sol

* Update BridgePool.sol

* Update packages/core/contracts/insured-bridge/BridgePool.sol

Co-authored-by: Chris Maree <[email protected]>

* Update packages/insured-bridge-relayer/test/Relayer.ts

Co-authored-by: Chris Maree <[email protected]>

* Update packages/insured-bridge-relayer/src/Relayer.ts

Co-authored-by: Chris Maree <[email protected]>

* Update InsuredBridgeL1Client.ts

* Merge master

* Fix tests

* Update FindContractVersion.ts

* Update Arbitrum_CrossDomainEnabled.sol

* Compiled contracts

* WIP

Signed-off-by: Nick Pai <[email protected]>

* Clarify test cases

* map relay ancillary data as bytes32 instead of bytes

* Tests

* Remove Disputed state

* Include Relay state in hash

* Store relay state in hash

```
···························|·······························|·············|·············|·················|···············|··············
|  BridgePool              ·  relayDeposit                 ·     332175  ·     375995  ·         362612  ·           29  ·          -  │
···························|·······························|·············|·············|·················|···············|··············
|  BridgePool              ·  removeLiquidity              ·      70712  ·     102702  ·          85114  ·            5  ·          -  │
···························|·······························|·············|·············|·················|···············|··············
|  BridgePool              ·  settleRelay                  ·     174741  ·     235642  ·         212400  ·           18  ·          -  │
···························|·······························|·············|·············|·················|···············|··············
|  Bri
```

* Update BridgePool.sol

* Update BridgePool.sol

* Update BridgePool.sol

* Add relay ancillary data hash to Relay event

* Fix relay ancillary data hash

* Clients done

* Add priceRequestTime to relayData

* L1Client stores priceRequestTime and relayId

* Change Relayer to work with latest clients

* Refactor tests to be more functional and have clearer default vars

* Update BridgePool.sol

* Update Relayer.ts

* Update

* Update packages/core/contracts/insured-bridge/BridgePool.sol

Co-authored-by: Chris Maree <[email protected]>

* Update BridgePool.sol

* Update BridgePool.sol

* Update packages/core/contracts/insured-bridge/BridgePool.sol

Co-authored-by: Chris Maree <[email protected]>

* lint

* Update HardhatConfig.ts

* feat(core): Bump compiler to 0.8.9 and silence trivial compile warnings

- removed variable name shadowing by function params
- removed names for unused function params
- changed function state mutability levels

* Update BalancerMock.sol

* fix tests

Co-authored-by: Chris Maree <[email protected]>
2021-10-08 10:22:32 -04:00

22 lines
595 B
Solidity

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.0;
import "../interfaces/Balancer.sol";
/**
* @title Balancer Mock
*/
contract BalancerMock is Balancer {
uint256 price = 0;
// these params arent used in the mock, but this is to maintain compatibility with balancer API
function getSpotPriceSansFee(address, address) external view virtual override returns (uint256 spotPrice) {
return price;
}
// this is not a balancer call, but for testing for changing price.
function setPrice(uint256 newPrice) external {
price = newPrice;
}
}