@@ -858,19 +858,19 @@ StakingContract::precompile_dispatch(byte_string_view &input)
858858 case PrecompileSelector::GET_DELEGATIONS:
859859 // [0,100,0,0,0,0,0]
860860 return {
861- &StakingContract::precompile_get_delegations,
861+ &StakingContract::precompile_get_delegations<traits> ,
862862 LINKED_LIST_GETTER_OP_COST};
863863 case PrecompileSelector::GET_DELEGATORS:
864864 // [0,100,0,0,0,0,0]
865865 return {
866- &StakingContract::precompile_get_delegators,
866+ &StakingContract::precompile_get_delegators<traits> ,
867867 LINKED_LIST_GETTER_OP_COST};
868868 default :
869869 return {&StakingContract::precompile_fallback, 40000 };
870870 }
871871}
872872
873- EXPLICIT_MONAD_TRAITS_MEMBER (StakingContract::precompile_dispatch)
873+ EXPLICIT_MONAD_TRAITS_MEMBER (StakingContract::precompile_dispatch);
874874
875875std::tuple<bool , u32_be, std::vector<u64_be>> StakingContract::get_valset (
876876 StorageArray<u64_be> const &valset, uint32_t const start_index,
@@ -985,8 +985,8 @@ Result<byte_string> StakingContract::get_valset(
985985 return StakingError::InternalError;
986986 }
987987
988- auto const [done, next_index, valids] = get_valset (
989- valset, start_index.native (), limits::paginated_results_size ());
988+ auto const [done, next_index, valids] =
989+ get_valset ( valset, start_index.native (), limits::array_pagination ());
990990 AbiEncoder encoder;
991991 encoder.add_bool (done);
992992 encoder.add_uint (next_index);
@@ -1019,6 +1019,7 @@ Result<byte_string> StakingContract::precompile_get_execution_valset(
10191019 return get_valset (input, valset);
10201020}
10211021
1022+ template <Traits traits>
10221023Result<byte_string> StakingContract::precompile_get_delegations (
10231024 byte_string_view input, evmc_address const &,
10241025 evmc_uint256be const &msg_value)
@@ -1032,7 +1033,7 @@ Result<byte_string> StakingContract::precompile_get_delegations(
10321033 }
10331034
10341035 auto const [done, next_val_id, vals_page] = get_validators_for_delegator (
1035- delegator, start_val_id, limits::paginated_results_size ());
1036+ delegator, start_val_id, limits::linked_list_pagination<traits> ());
10361037
10371038 AbiEncoder encoder;
10381039 encoder.add_bool (done);
@@ -1041,6 +1042,9 @@ Result<byte_string> StakingContract::precompile_get_delegations(
10411042 return encoder.encode_final ();
10421043}
10431044
1045+ EXPLICIT_MONAD_TRAITS_MEMBER (StakingContract::precompile_get_delegations);
1046+
1047+ template <Traits traits>
10441048Result<byte_string> StakingContract::precompile_get_delegators (
10451049 byte_string_view input, evmc_address const &,
10461050 evmc_uint256be const &msg_value)
@@ -1055,7 +1059,9 @@ Result<byte_string> StakingContract::precompile_get_delegators(
10551059 }
10561060
10571061 auto const [done, next_del_addr, dels_page] = get_delegators_for_validator (
1058- val_id, start_delegator_address, limits::paginated_results_size ());
1062+ val_id,
1063+ start_delegator_address,
1064+ limits::linked_list_pagination<traits>());
10591065
10601066 AbiEncoder encoder;
10611067 encoder.add_bool (done);
@@ -1064,6 +1070,8 @@ Result<byte_string> StakingContract::precompile_get_delegators(
10641070 return encoder.encode_final ();
10651071}
10661072
1073+ EXPLICIT_MONAD_TRAITS_MEMBER (StakingContract::precompile_get_delegators);
1074+
10671075Result<byte_string> StakingContract::precompile_get_epoch (
10681076 byte_string_view const , evmc_address const &,
10691077 evmc_uint256be const &msg_value)
@@ -1322,7 +1330,7 @@ Result<void> StakingContract::delegate(
13221330 return outcome::success ();
13231331}
13241332
1325- EXPLICIT_MONAD_TRAITS_MEMBER (StakingContract::delegate)
1333+ EXPLICIT_MONAD_TRAITS_MEMBER (StakingContract::delegate);
13261334
13271335template <Traits traits>
13281336Result<byte_string> StakingContract::precompile_delegate (
@@ -1341,7 +1349,7 @@ Result<byte_string> StakingContract::precompile_delegate(
13411349 return byte_string{abi_encode_bool (true )};
13421350}
13431351
1344- EXPLICIT_MONAD_TRAITS_MEMBER (StakingContract::precompile_delegate)
1352+ EXPLICIT_MONAD_TRAITS_MEMBER (StakingContract::precompile_delegate);
13451353
13461354template <Traits traits>
13471355Result<byte_string> StakingContract::precompile_undelegate (
@@ -1434,7 +1442,7 @@ Result<byte_string> StakingContract::precompile_undelegate(
14341442 return byte_string{abi_encode_bool (true )};
14351443}
14361444
1437- EXPLICIT_MONAD_TRAITS_MEMBER (StakingContract::precompile_undelegate)
1445+ EXPLICIT_MONAD_TRAITS_MEMBER (StakingContract::precompile_undelegate);
14381446
14391447// TODO: No compounds allowed if auth_address is under sufficent amount.
14401448template <Traits traits>
@@ -1467,7 +1475,7 @@ Result<byte_string> StakingContract::precompile_compound(
14671475 return byte_string{abi_encode_bool (true )};
14681476}
14691477
1470- EXPLICIT_MONAD_TRAITS_MEMBER (StakingContract::precompile_compound)
1478+ EXPLICIT_MONAD_TRAITS_MEMBER (StakingContract::precompile_compound);
14711479
14721480Result<byte_string> StakingContract::precompile_withdraw (
14731481 byte_string_view input, evmc_address const &msg_sender,
@@ -1731,7 +1739,7 @@ Result<void> StakingContract::syscall_reward(
17311739 return outcome::success ();
17321740}
17331741
1734- EXPLICIT_MONAD_TRAITS_MEMBER (StakingContract::syscall_reward)
1742+ EXPLICIT_MONAD_TRAITS_MEMBER (StakingContract::syscall_reward);
17351743
17361744Result<void > StakingContract::syscall_snapshot (
17371745 byte_string_view const input, uint256_t const &value)
0 commit comments