Documentation
¶
Index ¶
Constants ¶
View Source
const ( // The address used to deploy the contract becomes the owner // We use the first address in the HD wallet that ganache creates with the seed in the docker-compose OwnerPrivateKey = "0xca3f21d12dbd7a6a301a70414c40c555761dfce4b3f84cb8ce5f9760a783e3f0" ContractAddr = "0xc4680463046E64b10Da390d9049D24b8EC43AaAB" )
View Source
const (
GanacheNetworkAddr = "ws://127.0.0.1:8545"
)
Variables ¶
View Source
var ( OwnerTransactor *bind.TransactOpts DecimalToInt = decimal.New(1, 18) // can also call decimals() on the contract to get the exponent (18) UsdkABI abi.ABI )
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct { Type ActivityType `json:"type"` Asset string `json:"asset"` Amount decimal.Decimal `json:"amount"` DestinationAddress string `json:"destinationAddress,omitempty"` ID uint64 `json:"id"` ChainTxID string `json:"chainId,omitempty"` // the id on the blockchain Status Status `json:"status"` // CREATED|COMPLETED CreatedAt time.Time `json:"createdAt"` CompeletedAt *time.Time `json:"compeletedAt,omitempty"` }
type ActivityType ¶
type ActivityType string
const ( TypeDeposit ActivityType = "DEPOSIT" TypeWithdrawal ActivityType = "WITHDRAWAL" )
type EthClient ¶
type EthClient interface { ethereum.ChainStateReader bind.ContractBackend }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) CreateWithdrawal ¶
func (s *Server) CreateWithdrawal(req *Withdrawal) (*Activity, error)
Click to show internal directories.
Click to hide internal directories.