require_vaccount

require_vaccount | code​

1
/**
2
* LiquidAccounts use the require_vaccount macro in place of the require_auth macro for authenticating a LiquidAccount against the key assigned when calling regaccount
3
*
4
* @param {name} - vaccount from payload
5
*
6
* Example:
7
*
8
* @code
9
* require_vaccount(payload.vaccount);
10
* @endcode
11
*/
12
​
13
void required_key(const eosio::public_key& pubkey){ \
14
eosio::check(_pubkey == pubkey, "wrong public key"); \
15
} \
16
​
17
void require_vaccount(name vaccount){ \
18
auto pkey = handleNonce(vaccount); \
19
required_key(pkey); \
20
} \
Copied!
Copy link