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
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?