aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/chequebook/api.go
diff options
context:
space:
mode:
authorKiel barry <kiel.j.barry@gmail.com>2018-05-01 07:05:24 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-02-07 19:15:14 +0800
commit53b823afc8c24337290ba2e7889c2dde496e9272 (patch)
treeb028a49127e2a2b57b55fd6e38aa69068e7c0e5b /contracts/chequebook/api.go
parent6f714ed73e7d0e5824920f3ae9e919026d6186e0 (diff)
downloadgo-tangerine-53b823afc8c24337290ba2e7889c2dde496e9272.tar
go-tangerine-53b823afc8c24337290ba2e7889c2dde496e9272.tar.gz
go-tangerine-53b823afc8c24337290ba2e7889c2dde496e9272.tar.bz2
go-tangerine-53b823afc8c24337290ba2e7889c2dde496e9272.tar.lz
go-tangerine-53b823afc8c24337290ba2e7889c2dde496e9272.tar.xz
go-tangerine-53b823afc8c24337290ba2e7889c2dde496e9272.tar.zst
go-tangerine-53b823afc8c24337290ba2e7889c2dde496e9272.zip
contracts/*: golint updates for this or self warning
Diffstat (limited to 'contracts/chequebook/api.go')
-rw-r--r--contracts/chequebook/api.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/contracts/chequebook/api.go b/contracts/chequebook/api.go
index b2b2365f3..fb7080308 100644
--- a/contracts/chequebook/api.go
+++ b/contracts/chequebook/api.go
@@ -27,40 +27,40 @@ const Version = "1.0"
var errNoChequebook = errors.New("no chequebook")
-type Api struct {
+type API struct {
chequebookf func() *Chequebook
}
-func NewApi(ch func() *Chequebook) *Api {
- return &Api{ch}
+func NewAPI(ch func() *Chequebook) *API {
+ return &API{ch}
}
-func (self *Api) Balance() (string, error) {
- ch := self.chequebookf()
+func (a *API) Balance() (string, error) {
+ ch := a.chequebookf()
if ch == nil {
return "", errNoChequebook
}
return ch.Balance().String(), nil
}
-func (self *Api) Issue(beneficiary common.Address, amount *big.Int) (cheque *Cheque, err error) {
- ch := self.chequebookf()
+func (a *API) Issue(beneficiary common.Address, amount *big.Int) (cheque *Cheque, err error) {
+ ch := a.chequebookf()
if ch == nil {
return nil, errNoChequebook
}
return ch.Issue(beneficiary, amount)
}
-func (self *Api) Cash(cheque *Cheque) (txhash string, err error) {
- ch := self.chequebookf()
+func (a *API) Cash(cheque *Cheque) (txhash string, err error) {
+ ch := a.chequebookf()
if ch == nil {
return "", errNoChequebook
}
return ch.Cash(cheque)
}
-func (self *Api) Deposit(amount *big.Int) (txhash string, err error) {
- ch := self.chequebookf()
+func (a *API) Deposit(amount *big.Int) (txhash string, err error) {
+ ch := a.chequebookf()
if ch == nil {
return "", errNoChequebook
}