-
Notifications
You must be signed in to change notification settings - Fork 0
/
automationTime.ts
90 lines (90 loc) · 2.38 KB
/
automationTime.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
export default {
rpc: {
getTimeAutomationFees: {
description: 'Retrieve automation fees',
params: [
{ name: 'action', type: 'AutomationAction' },
{ name: 'executions', type: 'u32' },
],
type: 'Balance',
},
calculateOptimalAutostaking: {
description: 'Calculate the optimal period to restake',
params: [
{ name: 'principal', type: 'i128' },
{ name: 'collator', type: 'AccountId' },
],
type: 'AutostakingResult',
},
getAutoCompoundDelegatedStakeTaskIds: {
description: 'Return autocompounding tasks by account',
params: [
{ name: 'account_id', type: 'AccountId' },
],
type: 'Vec<Hash>',
},
queryFeeDetails: {
description: 'The transaction fee details',
params: [
{ name: 'extrinsic', type: 'Extrinsic' },
],
type: 'AutomationFeeDetails'
},
},
types: {
AutomationAction: {
_enum: [
'NativeTransfer',
'XCMP',
'AutoCompoundDelegatedStake'
],
},
AutostakingResult: {
period: 'i32',
apy: 'f64',
},
AutomationFeeDetails: {
scheduleFee: 'Balance',
executionFee: 'Balance',
},
},
runtime: {
AutomationTimeApi: [
{
methods: {
get_time_automation_fees: {
description: 'Retrieve automation fees',
params: [
{ name: 'action', type: 'AutomationAction' },
{ name: 'executions', type: 'u32' },
],
type: 'Balance',
},
calculate_optimal_autostaking: {
description: 'Calculate the optimal period to restake',
params: [
{ name: 'principal', type: 'i128' },
{ name: 'collator', type: 'AccountId' },
],
type: 'AutostakingResult',
},
get_auto_compound_delegated_stake_task_ids: {
description: 'Return autocompounding tasks by account',
params: [
{ name: 'account_id', type: 'AccountId' },
],
type: 'Vec<Hash>',
},
query_fee_details: {
description: 'The transaction fee details',
params: [
{ name: 'extrinsic', type: 'Extrinsic' },
],
type: 'AutomationFeeDetails'
},
},
version: 1
}
]
}
}