CRYPTO NEWS

how raw_call actually works in vyper

I am new to Vyper. I was analyzing the contract there I saw raw_call in a method

raw_call(reward_contract, self.claim_sig)

its permalink: https://github.com/curvefi/curve-dao-contracts/blob/3bee979b7b6293c9e7654ee7dfbf5cc9ff40ca58/contracts/gauges/RewardsOnlyGauge.vy#L113

and claim_sig Four-byte selectors for staking, withdrawing, and claiming, left padded with zero bytes. If the reward contract can be claimed from but does not require staking, the staking and withdraw selectors should be set to 0x00

its permalink: https://github.com/curvefi/curve-dao-contracts/blob/3bee979b7b6293c9e7654ee7dfbf5cc9ff40ca58/contracts/gauges/RewardsOnlyGauge.vy#L427-L430

more about sigs: A concatenation of three four-byte function signatures: stake, withdraw, and getReward. The signatures are then right padded with empty bytes. See the example below for more information on how to prepare this data.

An example of generating the signatures input and enabling a vanilla SNX rewards contract:

Rewards = Contract("0x99ac10631f69c753ddb595d074422a0922d9056b")

first, we get the signatures for depositing, withdrawing and claiming sigs = [rewards.stake.signature, rewards.withdraw.signature, rewards.getReward.signature] sigs ["0xa694fc3a", "0x2e1a7d4d", "0x3d18b912"]

now we remove the leading 0x and concatentate them sigs = "".join(i[2:] for i in sigs) sigs "a694fc3a2e1a7d4d3d18b912"

finally, we add the leading 0x and trailing 00 bytes sigs = "0x" + sigs + ("00" * 20) sigs "0xa694fc3a2e1a7d4d3d18b9120000000000000000000000000000000000000000"

now we are ready to set the rewards contract gauge.set_rewards(rewards, sigs, [reward_token] + [ZERO_ADDRESS] * 7, {‘from’: alice})

and the question is:

as it says there are three signatures... does raw_call calls every function? and how is it passing their parameters?

BlockFi CEO Responds To Rumors They Sold For $25 Million

Rumors of a BlockFi sale for a paltry $25 million are swirling around the internet. CEO Zac Prince responded to the claim… FTX closes in on a deal to buy embattled crypto lender BlockFi for $25 million in a fire sale https://t.co/9uRESw9KCt — CNBC (@CNBC) June 30, 2022 Kate Rooney of CNBC reported earlier today::Listen

Rumors of a BlockFi sale for a paltry $25 million are swirling around the internet. CEO Zac Prince responded to the claim…

Kate Rooney of CNBC reported earlier today that FTX is buying BlockFi for the super low price of $25 million USD. According to Rooney, three sources familiar with the matter — who wished to remain unnamed — divulged the details of the deal.

Recommended: Grayscale Sues The SEC

  • The term sheet is not finalized but it’s set to finalize by the end of the week. Rooney didn’t clarify whether a BlockFi sale should be expected by Friday or Sunday.
  • Both BlockFi and FTX declined to comment. However, CEO of BlockFI Zac Prince responded to the rumors via Twitter: Lots of market rumors out there – I can 100% confirm that we aren’t being sold for $25M. I encourage everyone to trust only details that you hear directly from @BlockFi. We will share more w you as soon as we can.”
  • The obscenely low number being reported is quite different than the last valuation of BlockFi, which valued the crypto savings and lender at 4.8 billion.
  • We previously reported on BlockFi and FTX and how early investor Morgan Creek Digital was trying to raise enough money to beat an offer by FTX. An FTX purchase would possibly leave Morgan Creek with nothing.
  • Reportedly, the $250 million dollar credit line extended to BlockFi doesn’t hamper its ability to sell to the highest bidder. BlockFi is apparently entertaining several offers.

 

The post BlockFi CEO Responds To Rumors They Sold For $25 Million appeared first on CryptosRus.

how raw_call actually works in vyper

Shopping cart
There are no products in the cart!
Continue shopping
0