@@ -35,28 +35,28 @@ use ethabi::{Function, Param, ParamType, StateMutability, Token};
35
35
use frame_support:: RuntimeDebug ;
36
36
use sp_std:: prelude:: * ;
37
37
38
- fn authorize_operator_function ( ) -> Function {
38
+ fn register_app_function ( ) -> Function {
39
39
Function {
40
- name : "authorizeDefaultOperator " . into ( ) ,
40
+ name : "registerApp " . into ( ) ,
41
41
constant : None ,
42
42
state_mutability : StateMutability :: NonPayable ,
43
43
outputs : vec ! [ ] ,
44
44
inputs : vec ! [ Param {
45
- name: "operator " . into( ) ,
45
+ name: "newApp " . into( ) ,
46
46
kind: ParamType :: Address ,
47
47
internal_type: None ,
48
48
} ] ,
49
49
}
50
50
}
51
51
52
- fn revoke_operator_function ( ) -> Function {
52
+ fn remove_app_function ( ) -> Function {
53
53
Function {
54
- name : "revokeDefaultOperator " . into ( ) ,
54
+ name : "removeApp " . into ( ) ,
55
55
constant : None ,
56
56
state_mutability : StateMutability :: NonPayable ,
57
57
outputs : vec ! [ ] ,
58
58
inputs : vec ! [ Param {
59
- name: "operator " . into( ) ,
59
+ name: "app " . into( ) ,
60
60
kind: ParamType :: Address ,
61
61
internal_type: None ,
62
62
} ] ,
@@ -65,28 +65,28 @@ fn revoke_operator_function() -> Function {
65
65
66
66
// Message to Ethereum (ABI-encoded)
67
67
#[ derive( Copy , Clone , PartialEq , Eq , RuntimeDebug ) ]
68
- pub struct DeregisterOperatorPayload {
69
- pub operator : H160 ,
68
+ pub struct RemoveAppPayload {
69
+ pub app : H160 ,
70
70
}
71
71
72
- impl DeregisterOperatorPayload {
72
+ impl RemoveAppPayload {
73
73
/// ABI-encode this payload
74
74
pub fn encode ( & self ) -> Result < Vec < u8 > , ethabi:: Error > {
75
- let tokens = & [ Token :: Address ( self . operator ) ] ;
76
- revoke_operator_function ( ) . encode_input ( tokens. as_ref ( ) )
75
+ let tokens = & [ Token :: Address ( self . app ) ] ;
76
+ remove_app_function ( ) . encode_input ( tokens. as_ref ( ) )
77
77
}
78
78
}
79
79
80
80
// Message to Ethereum (ABI-encoded)
81
81
#[ derive( Copy , Clone , PartialEq , Eq , RuntimeDebug ) ]
82
- pub struct RegisterOperatorPayload {
83
- pub operator : H160 ,
82
+ pub struct RegisterAppPayload {
83
+ pub app : H160 ,
84
84
}
85
85
86
- impl RegisterOperatorPayload {
86
+ impl RegisterAppPayload {
87
87
/// ABI-encode this payload
88
88
pub fn encode ( & self ) -> Result < Vec < u8 > , ethabi:: Error > {
89
- let tokens = & [ Token :: Address ( self . operator ) ] ;
90
- authorize_operator_function ( ) . encode_input ( tokens. as_ref ( ) )
89
+ let tokens = & [ Token :: Address ( self . app ) ] ;
90
+ register_app_function ( ) . encode_input ( tokens. as_ref ( ) )
91
91
}
92
92
}
0 commit comments