@@ -9,7 +9,6 @@ use fvm_shared::bigint::bigint_ser::BigIntDe;
9
9
use fvm_shared:: bigint:: BigInt ;
10
10
use fvm_shared:: bigint:: Zero ;
11
11
use fvm_shared:: econ:: TokenAmount ;
12
- use fvm_shared:: ActorID ;
13
12
14
13
use self :: errors:: ActorError ;
15
14
use self :: state:: TokenState ;
83
82
/// Injected blockstore
84
83
bs : BS ,
85
84
/// Access to the runtime
86
- fvm : FVM ,
87
- }
88
-
89
- /// Resolve an address to an ActorID
90
- fn resolve_address ( address : & Address ) -> Result < ActorID > {
91
- match fvm_sdk:: actor:: resolve_address ( address) {
92
- Some ( addr) => Ok ( addr) ,
93
- None => Err ( ActorError :: AddrNotFound ( * address) ) ,
94
- }
85
+ _fvm : FVM ,
95
86
}
96
87
97
88
impl < BS , FVM > StandardToken < BS , FVM >
@@ -114,7 +105,7 @@ where
114
105
init_state. save ( & self . bs ) ;
115
106
116
107
let mint_params = params. mint_params ;
117
- self . mint ( mint_params) ;
108
+ self . mint ( mint_params) ? ;
118
109
Ok ( ( ) )
119
110
}
120
111
@@ -230,7 +221,7 @@ where
230
221
} ,
231
222
// No allowance recorded previously
232
223
None => {
233
- caller_allowances_map. set ( spender, BigIntDe ( params. value . clone ( ) ) ) ;
224
+ caller_allowances_map. set ( spender, BigIntDe ( params. value . clone ( ) ) ) ? ;
234
225
params. value
235
226
}
236
227
} ;
@@ -263,7 +254,7 @@ where
263
254
. checked_sub ( & params. value )
264
255
. unwrap ( ) // Unwrap should be safe as allowance always > 0
265
256
. max ( BigInt :: zero ( ) ) ;
266
- caller_allowances_map. set ( spender, BigIntDe ( new_allowance. clone ( ) ) ) ;
257
+ caller_allowances_map. set ( spender, BigIntDe ( new_allowance. clone ( ) ) ) ? ;
267
258
new_allowance
268
259
}
269
260
None => {
@@ -298,7 +289,7 @@ where
298
289
} ;
299
290
300
291
let new_allowance = TokenAmount :: zero ( ) ;
301
- caller_allowances_map. set ( spender, BigIntDe ( new_allowance. clone ( ) ) ) ;
292
+ caller_allowances_map. set ( spender, BigIntDe ( new_allowance. clone ( ) ) ) ? ;
302
293
state. save ( & self . bs ) ;
303
294
304
295
Ok ( AllowanceReturn {
@@ -336,11 +327,11 @@ where
336
327
} )
337
328
}
338
329
339
- fn burn ( & self , params : BurnParams ) -> Result < BurnReturn > {
330
+ fn burn ( & self , _params : BurnParams ) -> Result < BurnReturn > {
340
331
todo ! ( )
341
332
}
342
333
343
- fn transfer_from ( & self , params : TransferParams ) -> Result < TransferReturn > {
334
+ fn transfer_from ( & self , _params : TransferParams ) -> Result < TransferReturn > {
344
335
todo ! ( )
345
336
}
346
337
}
0 commit comments