Documentation ¶
Index ¶
- Constants
- type ErrorResponse
- type Gnosis
- func (g *Gnosis) CreateSafeMultisigTx(data *NewMultisigTx) error
- func (g *Gnosis) GetSafe() (*ResponseSafe, error)
- func (g *Gnosis) GetSafeMultisigTx(safeTxHash string) (*MultisigTx, error)
- func (g *Gnosis) GetSafeMultisigTxByNonce(nonce int64) (*MultisigTxs, error)
- func (g *Gnosis) GetSafeMultisigTxs() (*MultisigTxs, error)
- func (g *Gnosis) ImportPrivateKey(pk string) (*Gnosis, error)
- func (g *Gnosis) SignMintTx(tokenAddress string, recipientAddress string, amount *big.Int) ([]byte, []byte, error)
- type MultisigTx
- type MultisigTxConfirmation
- type MultisigTxs
- type NewMultisigTx
- type ResponseMultisigTxs
- type ResponseSafe
Constants ¶
View Source
const ( GNOSIS_API_MAINNET = "https://safe-transaction-mainnet.safe.global/api/v1/" GNOSIS_API_GOERLI = "https://safe-transaction-goerli.safe.global/api/v1/" GNOSIS_API_ARBITRUM = "https://safe-transaction-arbitrum.safe.global/api/v1/" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
NonFieldErrors []string `json:"nonFieldErrors"`
}
type Gnosis ¶
type Gnosis struct { API string ChainId int SafeAddress string BridgeAddress string PrivateKey *ecdsa.PrivateKey PublicKey common.Address }
func (*Gnosis) CreateSafeMultisigTx ¶
func (g *Gnosis) CreateSafeMultisigTx(data *NewMultisigTx) error
CreateSafeMultisigTx submits multisig tx to gnosis safe API
func (*Gnosis) GetSafe ¶
func (g *Gnosis) GetSafe() (*ResponseSafe, error)
GetSafe gets safe info and current nonce
func (*Gnosis) GetSafeMultisigTx ¶
func (g *Gnosis) GetSafeMultisigTx(safeTxHash string) (*MultisigTx, error)
GetSafeMultisigTx gets multisig tx from gnosis safe API
func (*Gnosis) GetSafeMultisigTxByNonce ¶
func (g *Gnosis) GetSafeMultisigTxByNonce(nonce int64) (*MultisigTxs, error)
GetSafeMultisigTx gets multisig tx from gnosis safe API
func (*Gnosis) GetSafeMultisigTxs ¶
func (g *Gnosis) GetSafeMultisigTxs() (*MultisigTxs, error)
GetSafeMultisigTxs gets multisig txs from gnosis safe API
func (*Gnosis) ImportPrivateKey ¶
ImportPrivateKey imports private key and generates corresponding public key
type MultisigTx ¶
type MultisigTx struct { Safe string `json:"safe"` To string `json:"to"` Value int64 `json:"value,string"` Data string `json:"data"` Operation int64 `json:"operation"` GasToken string `json:"gasToken"` SafeTxGas int64 `json:"safeTxGas"` BaseGas int64 `json:"baseGas"` GasPrice int64 `json:"gasPrice,string"` RefundReceiver string `json:"refundReceiver"` Nonce int64 `json:"nonce"` ExecutionDate *time.Time `json:"executionDate"` SubmissionDate *time.Time `json:"submissionDate"` Modified *time.Time `json:"modified"` SafeTxHash string `json:"safeTxHash"` IsExecuted bool `json:"isExecuted"` ConfirmationsRequired int64 `json:"confirmationsRequired"` Confirmations []*MultisigTxConfirmation `json:"confirmations"` }
type MultisigTxConfirmation ¶
type MultisigTxs ¶
type MultisigTxs struct {
Results []*MultisigTx `json:"results"`
}
type NewMultisigTx ¶
type NewMultisigTx struct { Safe string `json:"safe"` To string `json:"to"` Value int64 `json:"value"` Data string `json:"data"` Operation int64 `json:"operation"` GasToken string `json:"gasToken"` SafeTxGas int64 `json:"safeTxGas"` BaseGas int64 `json:"baseGas"` GasPrice int64 `json:"gasPrice"` RefundReceiver string `json:"refundReceiver"` Nonce int64 `json:"nonce"` ContractTransactionHash string `json:"contractTransactionHash"` Sender string `json:"sender"` Signature string `json:"signature"` Origin *string `json:"origin"` }
type ResponseMultisigTxs ¶
type ResponseMultisigTxs struct { Count int64 `json:"count"` Results []*MultisigTx `json:"results"` }
type ResponseSafe ¶
type ResponseSafe struct { Address string `json:"address"` Nonce int64 `json:"nonce"` Threshold int64 `json:"threshold"` Owners []string `json:"owners"` MasterCopy string `json:"masterCopy"` Modules []string `json:"modules"` FallbackHandler string `json:"fallbackHandler"` Guard string `json:"guard"` Version string `json:"version"` }
Click to show internal directories.
Click to hide internal directories.