github.com/lino-network/lino@v0.6.11/x/account/mocks/AccountKeeper.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 amino "github.com/tendermint/go-amino" 7 crypto "github.com/tendermint/tendermint/crypto" 8 9 linotypes "github.com/lino-network/lino/types" 10 11 mock "github.com/stretchr/testify/mock" 12 13 model "github.com/lino-network/lino/x/account/model" 14 15 types "github.com/cosmos/cosmos-sdk/types" 16 ) 17 18 // AccountKeeper is an autogenerated mock type for the AccountKeeper type 19 type AccountKeeper struct { 20 mock.Mock 21 } 22 23 // AddFrozenMoney provides a mock function with given fields: ctx, username, amount, start, interval, times 24 func (_m *AccountKeeper) AddFrozenMoney(ctx types.Context, username linotypes.AccountKey, amount linotypes.Coin, start int64, interval int64, times int64) types.Error { 25 ret := _m.Called(ctx, username, amount, start, interval, times) 26 27 var r0 types.Error 28 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey, linotypes.Coin, int64, int64, int64) types.Error); ok { 29 r0 = rf(ctx, username, amount, start, interval, times) 30 } else { 31 if ret.Get(0) != nil { 32 r0 = ret.Get(0).(types.Error) 33 } 34 } 35 36 return r0 37 } 38 39 // CheckSigningPubKeyOwner provides a mock function with given fields: ctx, me, signKey 40 func (_m *AccountKeeper) CheckSigningPubKeyOwner(ctx types.Context, me linotypes.AccountKey, signKey crypto.PubKey) (linotypes.AccountKey, types.Error) { 41 ret := _m.Called(ctx, me, signKey) 42 43 var r0 linotypes.AccountKey 44 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey, crypto.PubKey) linotypes.AccountKey); ok { 45 r0 = rf(ctx, me, signKey) 46 } else { 47 r0 = ret.Get(0).(linotypes.AccountKey) 48 } 49 50 var r1 types.Error 51 if rf, ok := ret.Get(1).(func(types.Context, linotypes.AccountKey, crypto.PubKey) types.Error); ok { 52 r1 = rf(ctx, me, signKey) 53 } else { 54 if ret.Get(1) != nil { 55 r1 = ret.Get(1).(types.Error) 56 } 57 } 58 59 return r0, r1 60 } 61 62 // CheckSigningPubKeyOwnerByAddress provides a mock function with given fields: ctx, addr, signkey, isPaid 63 func (_m *AccountKeeper) CheckSigningPubKeyOwnerByAddress(ctx types.Context, addr types.AccAddress, signkey crypto.PubKey, isPaid bool) types.Error { 64 ret := _m.Called(ctx, addr, signkey, isPaid) 65 66 var r0 types.Error 67 if rf, ok := ret.Get(0).(func(types.Context, types.AccAddress, crypto.PubKey, bool) types.Error); ok { 68 r0 = rf(ctx, addr, signkey, isPaid) 69 } else { 70 if ret.Get(0) != nil { 71 r0 = ret.Get(0).(types.Error) 72 } 73 } 74 75 return r0 76 } 77 78 // DoesAccountExist provides a mock function with given fields: ctx, username 79 func (_m *AccountKeeper) DoesAccountExist(ctx types.Context, username linotypes.AccountKey) bool { 80 ret := _m.Called(ctx, username) 81 82 var r0 bool 83 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey) bool); ok { 84 r0 = rf(ctx, username) 85 } else { 86 r0 = ret.Get(0).(bool) 87 } 88 89 return r0 90 } 91 92 // ExportToFile provides a mock function with given fields: ctx, cdc, filepath 93 func (_m *AccountKeeper) ExportToFile(ctx types.Context, cdc *amino.Codec, filepath string) error { 94 ret := _m.Called(ctx, cdc, filepath) 95 96 var r0 error 97 if rf, ok := ret.Get(0).(func(types.Context, *amino.Codec, string) error); ok { 98 r0 = rf(ctx, cdc, filepath) 99 } else { 100 r0 = ret.Error(0) 101 } 102 103 return r0 104 } 105 106 // GenesisAccount provides a mock function with given fields: ctx, username, signingKey, transactionKey 107 func (_m *AccountKeeper) GenesisAccount(ctx types.Context, username linotypes.AccountKey, signingKey crypto.PubKey, transactionKey crypto.PubKey) types.Error { 108 ret := _m.Called(ctx, username, signingKey, transactionKey) 109 110 var r0 types.Error 111 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey, crypto.PubKey, crypto.PubKey) types.Error); ok { 112 r0 = rf(ctx, username, signingKey, transactionKey) 113 } else { 114 if ret.Get(0) != nil { 115 r0 = ret.Get(0).(types.Error) 116 } 117 } 118 119 return r0 120 } 121 122 // GetAddress provides a mock function with given fields: ctx, username 123 func (_m *AccountKeeper) GetAddress(ctx types.Context, username linotypes.AccountKey) (types.AccAddress, types.Error) { 124 ret := _m.Called(ctx, username) 125 126 var r0 types.AccAddress 127 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey) types.AccAddress); ok { 128 r0 = rf(ctx, username) 129 } else { 130 if ret.Get(0) != nil { 131 r0 = ret.Get(0).(types.AccAddress) 132 } 133 } 134 135 var r1 types.Error 136 if rf, ok := ret.Get(1).(func(types.Context, linotypes.AccountKey) types.Error); ok { 137 r1 = rf(ctx, username) 138 } else { 139 if ret.Get(1) != nil { 140 r1 = ret.Get(1).(types.Error) 141 } 142 } 143 144 return r0, r1 145 } 146 147 // GetBank provides a mock function with given fields: ctx, username 148 func (_m *AccountKeeper) GetBank(ctx types.Context, username linotypes.AccountKey) (*model.AccountBank, types.Error) { 149 ret := _m.Called(ctx, username) 150 151 var r0 *model.AccountBank 152 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey) *model.AccountBank); ok { 153 r0 = rf(ctx, username) 154 } else { 155 if ret.Get(0) != nil { 156 r0 = ret.Get(0).(*model.AccountBank) 157 } 158 } 159 160 var r1 types.Error 161 if rf, ok := ret.Get(1).(func(types.Context, linotypes.AccountKey) types.Error); ok { 162 r1 = rf(ctx, username) 163 } else { 164 if ret.Get(1) != nil { 165 r1 = ret.Get(1).(types.Error) 166 } 167 } 168 169 return r0, r1 170 } 171 172 // GetBankByAddress provides a mock function with given fields: ctx, addr 173 func (_m *AccountKeeper) GetBankByAddress(ctx types.Context, addr types.AccAddress) (*model.AccountBank, types.Error) { 174 ret := _m.Called(ctx, addr) 175 176 var r0 *model.AccountBank 177 if rf, ok := ret.Get(0).(func(types.Context, types.AccAddress) *model.AccountBank); ok { 178 r0 = rf(ctx, addr) 179 } else { 180 if ret.Get(0) != nil { 181 r0 = ret.Get(0).(*model.AccountBank) 182 } 183 } 184 185 var r1 types.Error 186 if rf, ok := ret.Get(1).(func(types.Context, types.AccAddress) types.Error); ok { 187 r1 = rf(ctx, addr) 188 } else { 189 if ret.Get(1) != nil { 190 r1 = ret.Get(1).(types.Error) 191 } 192 } 193 194 return r0, r1 195 } 196 197 // GetFrozenMoneyList provides a mock function with given fields: ctx, addr 198 func (_m *AccountKeeper) GetFrozenMoneyList(ctx types.Context, addr types.Address) ([]model.FrozenMoney, types.Error) { 199 ret := _m.Called(ctx, addr) 200 201 var r0 []model.FrozenMoney 202 if rf, ok := ret.Get(0).(func(types.Context, types.Address) []model.FrozenMoney); ok { 203 r0 = rf(ctx, addr) 204 } else { 205 if ret.Get(0) != nil { 206 r0 = ret.Get(0).([]model.FrozenMoney) 207 } 208 } 209 210 var r1 types.Error 211 if rf, ok := ret.Get(1).(func(types.Context, types.Address) types.Error); ok { 212 r1 = rf(ctx, addr) 213 } else { 214 if ret.Get(1) != nil { 215 r1 = ret.Get(1).(types.Error) 216 } 217 } 218 219 return r0, r1 220 } 221 222 // GetInfo provides a mock function with given fields: ctx, username 223 func (_m *AccountKeeper) GetInfo(ctx types.Context, username linotypes.AccountKey) (*model.AccountInfo, types.Error) { 224 ret := _m.Called(ctx, username) 225 226 var r0 *model.AccountInfo 227 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey) *model.AccountInfo); ok { 228 r0 = rf(ctx, username) 229 } else { 230 if ret.Get(0) != nil { 231 r0 = ret.Get(0).(*model.AccountInfo) 232 } 233 } 234 235 var r1 types.Error 236 if rf, ok := ret.Get(1).(func(types.Context, linotypes.AccountKey) types.Error); ok { 237 r1 = rf(ctx, username) 238 } else { 239 if ret.Get(1) != nil { 240 r1 = ret.Get(1).(types.Error) 241 } 242 } 243 244 return r0, r1 245 } 246 247 // GetMeta provides a mock function with given fields: ctx, username 248 func (_m *AccountKeeper) GetMeta(ctx types.Context, username linotypes.AccountKey) (*model.AccountMeta, types.Error) { 249 ret := _m.Called(ctx, username) 250 251 var r0 *model.AccountMeta 252 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey) *model.AccountMeta); ok { 253 r0 = rf(ctx, username) 254 } else { 255 if ret.Get(0) != nil { 256 r0 = ret.Get(0).(*model.AccountMeta) 257 } 258 } 259 260 var r1 types.Error 261 if rf, ok := ret.Get(1).(func(types.Context, linotypes.AccountKey) types.Error); ok { 262 r1 = rf(ctx, username) 263 } else { 264 if ret.Get(1) != nil { 265 r1 = ret.Get(1).(types.Error) 266 } 267 } 268 269 return r0, r1 270 } 271 272 // GetPool provides a mock function with given fields: ctx, poolName 273 func (_m *AccountKeeper) GetPool(ctx types.Context, poolName linotypes.PoolName) (linotypes.Coin, types.Error) { 274 ret := _m.Called(ctx, poolName) 275 276 var r0 linotypes.Coin 277 if rf, ok := ret.Get(0).(func(types.Context, linotypes.PoolName) linotypes.Coin); ok { 278 r0 = rf(ctx, poolName) 279 } else { 280 r0 = ret.Get(0).(linotypes.Coin) 281 } 282 283 var r1 types.Error 284 if rf, ok := ret.Get(1).(func(types.Context, linotypes.PoolName) types.Error); ok { 285 r1 = rf(ctx, poolName) 286 } else { 287 if ret.Get(1) != nil { 288 r1 = ret.Get(1).(types.Error) 289 } 290 } 291 292 return r0, r1 293 } 294 295 // GetSavingFromUsername provides a mock function with given fields: ctx, username 296 func (_m *AccountKeeper) GetSavingFromUsername(ctx types.Context, username linotypes.AccountKey) (linotypes.Coin, types.Error) { 297 ret := _m.Called(ctx, username) 298 299 var r0 linotypes.Coin 300 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey) linotypes.Coin); ok { 301 r0 = rf(ctx, username) 302 } else { 303 r0 = ret.Get(0).(linotypes.Coin) 304 } 305 306 var r1 types.Error 307 if rf, ok := ret.Get(1).(func(types.Context, linotypes.AccountKey) types.Error); ok { 308 r1 = rf(ctx, username) 309 } else { 310 if ret.Get(1) != nil { 311 r1 = ret.Get(1).(types.Error) 312 } 313 } 314 315 return r0, r1 316 } 317 318 // GetSequence provides a mock function with given fields: ctx, address 319 func (_m *AccountKeeper) GetSequence(ctx types.Context, address types.Address) (uint64, types.Error) { 320 ret := _m.Called(ctx, address) 321 322 var r0 uint64 323 if rf, ok := ret.Get(0).(func(types.Context, types.Address) uint64); ok { 324 r0 = rf(ctx, address) 325 } else { 326 r0 = ret.Get(0).(uint64) 327 } 328 329 var r1 types.Error 330 if rf, ok := ret.Get(1).(func(types.Context, types.Address) types.Error); ok { 331 r1 = rf(ctx, address) 332 } else { 333 if ret.Get(1) != nil { 334 r1 = ret.Get(1).(types.Error) 335 } 336 } 337 338 return r0, r1 339 } 340 341 // GetSigningKey provides a mock function with given fields: ctx, username 342 func (_m *AccountKeeper) GetSigningKey(ctx types.Context, username linotypes.AccountKey) (crypto.PubKey, types.Error) { 343 ret := _m.Called(ctx, username) 344 345 var r0 crypto.PubKey 346 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey) crypto.PubKey); ok { 347 r0 = rf(ctx, username) 348 } else { 349 if ret.Get(0) != nil { 350 r0 = ret.Get(0).(crypto.PubKey) 351 } 352 } 353 354 var r1 types.Error 355 if rf, ok := ret.Get(1).(func(types.Context, linotypes.AccountKey) types.Error); ok { 356 r1 = rf(ctx, username) 357 } else { 358 if ret.Get(1) != nil { 359 r1 = ret.Get(1).(types.Error) 360 } 361 } 362 363 return r0, r1 364 } 365 366 // GetSupply provides a mock function with given fields: ctx 367 func (_m *AccountKeeper) GetSupply(ctx types.Context) model.Supply { 368 ret := _m.Called(ctx) 369 370 var r0 model.Supply 371 if rf, ok := ret.Get(0).(func(types.Context) model.Supply); ok { 372 r0 = rf(ctx) 373 } else { 374 r0 = ret.Get(0).(model.Supply) 375 } 376 377 return r0 378 } 379 380 // GetTransactionKey provides a mock function with given fields: ctx, username 381 func (_m *AccountKeeper) GetTransactionKey(ctx types.Context, username linotypes.AccountKey) (crypto.PubKey, types.Error) { 382 ret := _m.Called(ctx, username) 383 384 var r0 crypto.PubKey 385 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey) crypto.PubKey); ok { 386 r0 = rf(ctx, username) 387 } else { 388 if ret.Get(0) != nil { 389 r0 = ret.Get(0).(crypto.PubKey) 390 } 391 } 392 393 var r1 types.Error 394 if rf, ok := ret.Get(1).(func(types.Context, linotypes.AccountKey) types.Error); ok { 395 r1 = rf(ctx, username) 396 } else { 397 if ret.Get(1) != nil { 398 r1 = ret.Get(1).(types.Error) 399 } 400 } 401 402 return r0, r1 403 } 404 405 // ImportFromFile provides a mock function with given fields: ctx, cdc, filepath 406 func (_m *AccountKeeper) ImportFromFile(ctx types.Context, cdc *amino.Codec, filepath string) error { 407 ret := _m.Called(ctx, cdc, filepath) 408 409 var r0 error 410 if rf, ok := ret.Get(0).(func(types.Context, *amino.Codec, string) error); ok { 411 r0 = rf(ctx, cdc, filepath) 412 } else { 413 r0 = ret.Error(0) 414 } 415 416 return r0 417 } 418 419 // IncreaseSequenceByOne provides a mock function with given fields: ctx, address 420 func (_m *AccountKeeper) IncreaseSequenceByOne(ctx types.Context, address types.Address) types.Error { 421 ret := _m.Called(ctx, address) 422 423 var r0 types.Error 424 if rf, ok := ret.Get(0).(func(types.Context, types.Address) types.Error); ok { 425 r0 = rf(ctx, address) 426 } else { 427 if ret.Get(0) != nil { 428 r0 = ret.Get(0).(types.Error) 429 } 430 } 431 432 return r0 433 } 434 435 // InitGenesis provides a mock function with given fields: ctx, total, pools 436 func (_m *AccountKeeper) InitGenesis(ctx types.Context, total linotypes.Coin, pools []model.Pool) { 437 _m.Called(ctx, total, pools) 438 } 439 440 // Mint provides a mock function with given fields: ctx 441 func (_m *AccountKeeper) Mint(ctx types.Context) types.Error { 442 ret := _m.Called(ctx) 443 444 var r0 types.Error 445 if rf, ok := ret.Get(0).(func(types.Context) types.Error); ok { 446 r0 = rf(ctx) 447 } else { 448 if ret.Get(0) != nil { 449 r0 = ret.Get(0).(types.Error) 450 } 451 } 452 453 return r0 454 } 455 456 // MoveBetweenPools provides a mock function with given fields: ctx, from, to, amount 457 func (_m *AccountKeeper) MoveBetweenPools(ctx types.Context, from linotypes.PoolName, to linotypes.PoolName, amount linotypes.Coin) types.Error { 458 ret := _m.Called(ctx, from, to, amount) 459 460 var r0 types.Error 461 if rf, ok := ret.Get(0).(func(types.Context, linotypes.PoolName, linotypes.PoolName, linotypes.Coin) types.Error); ok { 462 r0 = rf(ctx, from, to, amount) 463 } else { 464 if ret.Get(0) != nil { 465 r0 = ret.Get(0).(types.Error) 466 } 467 } 468 469 return r0 470 } 471 472 // MoveCoin provides a mock function with given fields: ctx, sender, receiver, coin 473 func (_m *AccountKeeper) MoveCoin(ctx types.Context, sender linotypes.AccOrAddr, receiver linotypes.AccOrAddr, coin linotypes.Coin) types.Error { 474 ret := _m.Called(ctx, sender, receiver, coin) 475 476 var r0 types.Error 477 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccOrAddr, linotypes.AccOrAddr, linotypes.Coin) types.Error); ok { 478 r0 = rf(ctx, sender, receiver, coin) 479 } else { 480 if ret.Get(0) != nil { 481 r0 = ret.Get(0).(types.Error) 482 } 483 } 484 485 return r0 486 } 487 488 // MoveFromPool provides a mock function with given fields: ctx, poolName, dest, amount 489 func (_m *AccountKeeper) MoveFromPool(ctx types.Context, poolName linotypes.PoolName, dest linotypes.AccOrAddr, amount linotypes.Coin) types.Error { 490 ret := _m.Called(ctx, poolName, dest, amount) 491 492 var r0 types.Error 493 if rf, ok := ret.Get(0).(func(types.Context, linotypes.PoolName, linotypes.AccOrAddr, linotypes.Coin) types.Error); ok { 494 r0 = rf(ctx, poolName, dest, amount) 495 } else { 496 if ret.Get(0) != nil { 497 r0 = ret.Get(0).(types.Error) 498 } 499 } 500 501 return r0 502 } 503 504 // MoveToPool provides a mock function with given fields: ctx, poolName, from, amount 505 func (_m *AccountKeeper) MoveToPool(ctx types.Context, poolName linotypes.PoolName, from linotypes.AccOrAddr, amount linotypes.Coin) types.Error { 506 ret := _m.Called(ctx, poolName, from, amount) 507 508 var r0 types.Error 509 if rf, ok := ret.Get(0).(func(types.Context, linotypes.PoolName, linotypes.AccOrAddr, linotypes.Coin) types.Error); ok { 510 r0 = rf(ctx, poolName, from, amount) 511 } else { 512 if ret.Get(0) != nil { 513 r0 = ret.Get(0).(types.Error) 514 } 515 } 516 517 return r0 518 } 519 520 // RecoverAccount provides a mock function with given fields: ctx, username, newTransactionPubKey, newSigningKey 521 func (_m *AccountKeeper) RecoverAccount(ctx types.Context, username linotypes.AccountKey, newTransactionPubKey crypto.PubKey, newSigningKey crypto.PubKey) types.Error { 522 ret := _m.Called(ctx, username, newTransactionPubKey, newSigningKey) 523 524 var r0 types.Error 525 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey, crypto.PubKey, crypto.PubKey) types.Error); ok { 526 r0 = rf(ctx, username, newTransactionPubKey, newSigningKey) 527 } else { 528 if ret.Get(0) != nil { 529 r0 = ret.Get(0).(types.Error) 530 } 531 } 532 533 return r0 534 } 535 536 // RegisterAccount provides a mock function with given fields: ctx, referrer, registerFee, username, signingKey, transactionKey 537 func (_m *AccountKeeper) RegisterAccount(ctx types.Context, referrer linotypes.AccOrAddr, registerFee linotypes.Coin, username linotypes.AccountKey, signingKey crypto.PubKey, transactionKey crypto.PubKey) types.Error { 538 ret := _m.Called(ctx, referrer, registerFee, username, signingKey, transactionKey) 539 540 var r0 types.Error 541 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccOrAddr, linotypes.Coin, linotypes.AccountKey, crypto.PubKey, crypto.PubKey) types.Error); ok { 542 r0 = rf(ctx, referrer, registerFee, username, signingKey, transactionKey) 543 } else { 544 if ret.Get(0) != nil { 545 r0 = ret.Get(0).(types.Error) 546 } 547 } 548 549 return r0 550 } 551 552 // UpdateJSONMeta provides a mock function with given fields: ctx, username, JSONMeta 553 func (_m *AccountKeeper) UpdateJSONMeta(ctx types.Context, username linotypes.AccountKey, JSONMeta string) types.Error { 554 ret := _m.Called(ctx, username, JSONMeta) 555 556 var r0 types.Error 557 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey, string) types.Error); ok { 558 r0 = rf(ctx, username, JSONMeta) 559 } else { 560 if ret.Get(0) != nil { 561 r0 = ret.Get(0).(types.Error) 562 } 563 } 564 565 return r0 566 }