Skip to content

Commit

Permalink
perf: direct string conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
ethzoomer committed Aug 13, 2024
1 parent 475ff93 commit 1cf7a2d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions contracts/LpSugar.vy
Original file line number Diff line number Diff line change
Expand Up @@ -1309,18 +1309,18 @@ def _safe_symbol(_token: address) -> String[100]:
@param _token The token to call
"""
success: bool = False
response: Bytes[100] = b""
response: Bytes[192] = b""
success, response = raw_call(
_token,
method_id("symbol()"),
max_outsize=100,
max_outsize=192,
gas=50000,
is_delegate_call=False,
is_static_call=True,
revert_on_failure=False
)

if success:
return IERC20(_token).symbol()
return _abi_decode(response, String[100])

return "-NA-"
2 changes: 1 addition & 1 deletion env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONVERTOR_ADDRESS=0x585Af0b397AC42dbeF7f18395426BF878634f18D
RELAY_REGISTRY_ADDRESSES=0xe9F00f2e61CB0c6fb00A2e457546aCbF0fC303C2,0x6b1253B116B5919932399295C75116d33F8EfF96
SLIPSTREAM_HELPER_ADDRESS=0x5Bd7E2221C2d59c99e6A9Cd18D80A5F4257D0f32
GOVERNOR_ADDRESS=0x1F82e10D58aEf03DeA2e478029fB0387A1cbE989
LP_SUGAR_ADDRESS=0x39F850019b85c59BCa2fa0E437fBA8cEfc84528D
LP_SUGAR_ADDRESS=0xdcefde0ed145AF6A6c28471cf50Ab2d3Ee7D6939
VE_SUGAR_ADDRESS=0x94f913362b232e31daB49a1aFB775cfd25DaA6a1
RELAY_SUGAR_ADDRESS=0xb8307e5842B9aeE75C704183F0355076aa74b4e2

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Below is the list of datasets we support.
### Liquidity Pools Data

> [!NOTE]
> `LpSugar.vy` is deployed at `0x39F850019b85c59BCa2fa0E437fBA8cEfc84528D`
> `LpSugar.vy` is deployed at `0xdcefde0ed145AF6A6c28471cf50Ab2d3Ee7D6939`
It allows fetching on-chain pools data.
The returned data/struct of type `Lp` values represent:
Expand Down

0 comments on commit 1cf7a2d

Please sign in to comment.