Documentation ¶
Index ¶
- func INSCONSTRUCTOR_New(ref insolar.Reference, data []byte) ([]byte, []byte, error)
- func INSMETHOD_Accept(object []byte, data []byte) ([]byte, []byte, error)
- func INSMETHOD_GetBalance(object []byte, data []byte) ([]byte, []byte, error)
- func INSMETHOD_GetCode(object []byte, data []byte) ([]byte, []byte, error)
- func INSMETHOD_GetPrototype(object []byte, data []byte) ([]byte, []byte, error)
- func INSMETHOD_IncreaseBalance(object []byte, data []byte) ([]byte, []byte, error)
- func INSMETHOD_RollBack(object []byte, data []byte) ([]byte, []byte, error)
- func INSMETHOD_Transfer(object []byte, data []byte) ([]byte, []byte, error)
- func INSMETHOD_TransferToDeposit(object []byte, data []byte) ([]byte, []byte, error)
- func INSMETHOD_TransferToMember(object []byte, data []byte) ([]byte, []byte, error)
- func INS_META_INFO() []map[string]string
- func Initialize() insolar.ContractWrapper
- type Account
- func (a *Account) Accept(arg appfoundation.SagaAcceptInfo) error
- func (a *Account) GetBalance() (string, error)
- func (a *Account) IncreaseBalance(amountStr string) error
- func (a *Account) RollBack(amountStr string) error
- func (a *Account) Transfer(rootDomainRef insolar.Reference, amountStr string, toMember *insolar.Reference, ...) (interface{}, error)
- func (a *Account) TransferToDeposit(amountStr string, toDeposit insolar.Reference, fromMember insolar.Reference, ...) error
- func (a *Account) TransferToMember(amountStr string, toMember insolar.Reference, fromMember insolar.Reference, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func INSCONSTRUCTOR_New ¶
func INSMETHOD_GetBalance ¶
func INSMETHOD_GetPrototype ¶
func INSMETHOD_RollBack ¶
func INSMETHOD_Transfer ¶
func INS_META_INFO ¶
func Initialize ¶
func Initialize() insolar.ContractWrapper
Types ¶
type Account ¶
type Account struct { foundation.BaseContract Balance string }
func (*Account) Accept ¶
func (a *Account) Accept(arg appfoundation.SagaAcceptInfo) error
Accept accepts transfer to balance.
func (*Account) GetBalance ¶
GetBalance gets total balance. ins:immutable
func (*Account) IncreaseBalance ¶
IncreaseBalance increases the current balance by the amount.
func (*Account) Transfer ¶
func (a *Account) Transfer( rootDomainRef insolar.Reference, amountStr string, toMember *insolar.Reference, fromMember insolar.Reference, request insolar.Reference, ) (interface{}, error)
Transfer transfers money to given member.
Click to show internal directories.
Click to hide internal directories.