All URIs are relative to https://your_deployment.multibaas.com/api/v0
Method | HTTP request | Description |
---|---|---|
CallContractFunction | Post /chains/{chain}/addresses/{address-or-label}/contracts/{contract}/methods/{method} | Call a contract function |
CreateContract | Post /contracts/{contract} | Create a contract |
CreateContracts | Post /contracts | Create multiple contracts |
DeleteContract | Delete /contracts/{contract} | Delete a contract |
DeleteContractVersion | Delete /contracts/{contract}/{version} | Delete a contract version |
DeployContract | Post /contracts/{contract}/deploy | Deploy a contract |
DeployContractVersion | Post /contracts/{contract}/{version}/deploy | Deploy a contract version |
GetContract | Get /contracts/{contract} | Get a contract |
GetContractVersion | Get /contracts/{contract}/{version} | Get a contract version |
GetContractVersions | Get /contracts/{contract}/all | Get all contract versions |
GetEventMonitorStatus | Get /chains/{chain}/addresses/{address-or-label}/contracts/{contract}/status | Get event monitor status |
GetEventTypeConversions | Get /contracts/{contract}/{version}/events/{event} | Get event type conversions |
GetFunctionTypeConversions | Get /contracts/{contract}/{version}/methods/{method} | Get function type conversions |
LinkAddressContract | Post /chains/{chain}/addresses/{address-or-label}/contracts | Link address and contract |
ListContractVersions | Get /contracts/{contract}/versions | List all contract versions |
ListContracts | Get /contracts | List contracts |
SetEventTypeConversions | Post /contracts/{contract}/{version}/events/{event} | Set event type conversions |
SetFunctionTypeConversions | Post /contracts/{contract}/{version}/methods/{method} | Set function type conversions |
UnlinkAddressContract | Delete /chains/{chain}/addresses/{address-or-label}/contracts/{contract} | Unlink address and contract |
CallContractFunction200Response CallContractFunction(ctx, chain, addressOrLabel, contract, method).PostMethodArgs(postMethodArgs).Execute()
Call a contract function
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
chain := openapiclient.ChainName("ethereum") // ChainName | The blockchain chain label.
addressOrLabel := "addressOrLabel_example" // string | An address or the label of an address.
contract := "contract_example" // string |
method := "method_example" // string | Contract function.
postMethodArgs := *openapiclient.NewPostMethodArgs() // PostMethodArgs |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.CallContractFunction(context.Background(), chain, addressOrLabel, contract, method).PostMethodArgs(postMethodArgs).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.CallContractFunction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CallContractFunction`: CallContractFunction200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.CallContractFunction`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chain | ChainName | The blockchain chain label. | |
addressOrLabel | string | An address or the label of an address. | |
contract | string | ||
method | string | Contract function. |
Other parameters are passed through a pointer to a apiCallContractFunctionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
postMethodArgs | PostMethodArgs | |
CallContractFunction200Response
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetContract200Response CreateContract(ctx, contract).BaseContract(baseContract).Execute()
Create a contract
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
contract := "contract_example" // string |
baseContract := *openapiclient.NewBaseContract("Label_example", "ContractName_example", "Version_example", "RawAbi_example", "UserDoc_example", "DeveloperDoc_example") // BaseContract |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.CreateContract(context.Background(), contract).BaseContract(baseContract).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.CreateContract``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateContract`: GetContract200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.CreateContract`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
contract | string |
Other parameters are passed through a pointer to a apiCreateContractRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
baseContract | BaseContract | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BaseResponse CreateContracts(ctx).BaseContract(baseContract).Execute()
Create multiple contracts
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
baseContract := []openapiclient.BaseContract{*openapiclient.NewBaseContract("Label_example", "ContractName_example", "Version_example", "RawAbi_example", "UserDoc_example", "DeveloperDoc_example")} // []BaseContract |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.CreateContracts(context.Background()).BaseContract(baseContract).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.CreateContracts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateContracts`: BaseResponse
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.CreateContracts`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateContractsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
baseContract | []BaseContract |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BaseResponse DeleteContract(ctx, contract).Execute()
Delete a contract
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
contract := "contract_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.DeleteContract(context.Background(), contract).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.DeleteContract``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteContract`: BaseResponse
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.DeleteContract`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
contract | string |
Other parameters are passed through a pointer to a apiDeleteContractRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BaseResponse DeleteContractVersion(ctx, contract, version).Execute()
Delete a contract version
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
contract := "contract_example" // string |
version := "version_example" // string | Contract Version.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.DeleteContractVersion(context.Background(), contract, version).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.DeleteContractVersion``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteContractVersion`: BaseResponse
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.DeleteContractVersion`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
contract | string | ||
version | string | Contract Version. |
Other parameters are passed through a pointer to a apiDeleteContractVersionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeployContract200Response DeployContract(ctx, contract).PostMethodArgs(postMethodArgs).Execute()
Deploy a contract
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
contract := "contract_example" // string |
postMethodArgs := *openapiclient.NewPostMethodArgs() // PostMethodArgs |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.DeployContract(context.Background(), contract).PostMethodArgs(postMethodArgs).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.DeployContract``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeployContract`: DeployContract200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.DeployContract`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
contract | string |
Other parameters are passed through a pointer to a apiDeployContractRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
postMethodArgs | PostMethodArgs | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeployContract200Response DeployContractVersion(ctx, contract, version).PostMethodArgs(postMethodArgs).Execute()
Deploy a contract version
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
contract := "contract_example" // string |
version := "version_example" // string | Contract Version.
postMethodArgs := *openapiclient.NewPostMethodArgs() // PostMethodArgs |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.DeployContractVersion(context.Background(), contract, version).PostMethodArgs(postMethodArgs).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.DeployContractVersion``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeployContractVersion`: DeployContract200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.DeployContractVersion`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
contract | string | ||
version | string | Contract Version. |
Other parameters are passed through a pointer to a apiDeployContractVersionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
postMethodArgs | PostMethodArgs | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetContract200Response GetContract(ctx, contract).Execute()
Get a contract
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
contract := "contract_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.GetContract(context.Background(), contract).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.GetContract``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetContract`: GetContract200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.GetContract`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
contract | string |
Other parameters are passed through a pointer to a apiGetContractRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetContract200Response GetContractVersion(ctx, contract, version).Execute()
Get a contract version
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
contract := "contract_example" // string |
version := "version_example" // string | Contract Version.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.GetContractVersion(context.Background(), contract, version).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.GetContractVersion``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetContractVersion`: GetContract200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.GetContractVersion`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
contract | string | ||
version | string | Contract Version. |
Other parameters are passed through a pointer to a apiGetContractVersionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetContractVersions200Response GetContractVersions(ctx, contract).Execute()
Get all contract versions
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
contract := "contract_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.GetContractVersions(context.Background(), contract).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.GetContractVersions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetContractVersions`: GetContractVersions200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.GetContractVersions`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
contract | string |
Other parameters are passed through a pointer to a apiGetContractVersionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
GetContractVersions200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetEventMonitorStatus200Response GetEventMonitorStatus(ctx, chain, addressOrLabel, contract).Execute()
Get event monitor status
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
chain := openapiclient.ChainName("ethereum") // ChainName | The blockchain chain label.
addressOrLabel := "addressOrLabel_example" // string | An address or the label of an address.
contract := "contract_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.GetEventMonitorStatus(context.Background(), chain, addressOrLabel, contract).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.GetEventMonitorStatus``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetEventMonitorStatus`: GetEventMonitorStatus200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.GetEventMonitorStatus`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chain | ChainName | The blockchain chain label. | |
addressOrLabel | string | An address or the label of an address. | |
contract | string |
Other parameters are passed through a pointer to a apiGetEventMonitorStatusRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
GetEventMonitorStatus200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetEventTypeConversions200Response GetEventTypeConversions(ctx, contract, version, event).Execute()
Get event type conversions
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
contract := "contract_example" // string |
version := "version_example" // string | Contract Version.
event := "event_example" // string | Contract Event.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.GetEventTypeConversions(context.Background(), contract, version, event).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.GetEventTypeConversions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetEventTypeConversions`: GetEventTypeConversions200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.GetEventTypeConversions`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
contract | string | ||
version | string | Contract Version. | |
event | string | Contract Event. |
Other parameters are passed through a pointer to a apiGetEventTypeConversionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
GetEventTypeConversions200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetFunctionTypeConversions200Response GetFunctionTypeConversions(ctx, contract, version, method).Execute()
Get function type conversions
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
contract := "contract_example" // string |
version := "version_example" // string | Contract Version.
method := "method_example" // string | Contract function.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.GetFunctionTypeConversions(context.Background(), contract, version, method).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.GetFunctionTypeConversions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetFunctionTypeConversions`: GetFunctionTypeConversions200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.GetFunctionTypeConversions`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
contract | string | ||
version | string | Contract Version. | |
method | string | Contract function. |
Other parameters are passed through a pointer to a apiGetFunctionTypeConversionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
GetFunctionTypeConversions200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SetAddress201Response LinkAddressContract(ctx, chain, addressOrLabel).LinkAddressContractRequest(linkAddressContractRequest).Execute()
Link address and contract
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
chain := openapiclient.ChainName("ethereum") // ChainName | The blockchain chain label.
addressOrLabel := "addressOrLabel_example" // string | An address or the label of an address.
linkAddressContractRequest := *openapiclient.NewLinkAddressContractRequest("Label_example") // LinkAddressContractRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.LinkAddressContract(context.Background(), chain, addressOrLabel).LinkAddressContractRequest(linkAddressContractRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.LinkAddressContract``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `LinkAddressContract`: SetAddress201Response
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.LinkAddressContract`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chain | ChainName | The blockchain chain label. | |
addressOrLabel | string | An address or the label of an address. |
Other parameters are passed through a pointer to a apiLinkAddressContractRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
linkAddressContractRequest | LinkAddressContractRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListContractVersions200Response ListContractVersions(ctx, contract).Execute()
List all contract versions
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
contract := "contract_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.ListContractVersions(context.Background(), contract).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.ListContractVersions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListContractVersions`: ListContractVersions200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.ListContractVersions`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
contract | string |
Other parameters are passed through a pointer to a apiListContractVersionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
ListContractVersions200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListContracts200Response ListContracts(ctx).Execute()
List contracts
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.ListContracts(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.ListContracts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListContracts`: ListContracts200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.ListContracts`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListContractsRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BaseResponse SetEventTypeConversions(ctx, contract, version, event).ContractEventOptions(contractEventOptions).Execute()
Set event type conversions
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
contract := "contract_example" // string |
version := "version_example" // string | Contract Version.
event := "event_example" // string | Contract Event.
contractEventOptions := *openapiclient.NewContractEventOptions([]openapiclient.ContractParameter{*openapiclient.NewContractParameter("TODO")}) // ContractEventOptions |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.SetEventTypeConversions(context.Background(), contract, version, event).ContractEventOptions(contractEventOptions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.SetEventTypeConversions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SetEventTypeConversions`: BaseResponse
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.SetEventTypeConversions`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
contract | string | ||
version | string | Contract Version. | |
event | string | Contract Event. |
Other parameters are passed through a pointer to a apiSetEventTypeConversionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
contractEventOptions | ContractEventOptions | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BaseResponse SetFunctionTypeConversions(ctx, contract, version, method).ContractMethodOptions(contractMethodOptions).Execute()
Set function type conversions
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
contract := "contract_example" // string |
version := "version_example" // string | Contract Version.
method := "method_example" // string | Contract function.
contractMethodOptions := *openapiclient.NewContractMethodOptions([]openapiclient.ContractParameter{*openapiclient.NewContractParameter("TODO")}) // ContractMethodOptions |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.SetFunctionTypeConversions(context.Background(), contract, version, method).ContractMethodOptions(contractMethodOptions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.SetFunctionTypeConversions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SetFunctionTypeConversions`: BaseResponse
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.SetFunctionTypeConversions`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
contract | string | ||
version | string | Contract Version. | |
method | string | Contract function. |
Other parameters are passed through a pointer to a apiSetFunctionTypeConversionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
contractMethodOptions | ContractMethodOptions | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SetAddress201Response UnlinkAddressContract(ctx, chain, addressOrLabel, contract).Execute()
Unlink address and contract
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/curvegrid/multibaas-sdk-go"
)
func main() {
chain := openapiclient.ChainName("ethereum") // ChainName | The blockchain chain label.
addressOrLabel := "addressOrLabel_example" // string | An address or the label of an address.
contract := "contract_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsAPI.UnlinkAddressContract(context.Background(), chain, addressOrLabel, contract).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsAPI.UnlinkAddressContract``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UnlinkAddressContract`: SetAddress201Response
fmt.Fprintf(os.Stdout, "Response from `ContractsAPI.UnlinkAddressContract`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
chain | ChainName | The blockchain chain label. | |
addressOrLabel | string | An address or the label of an address. | |
contract | string |
Other parameters are passed through a pointer to a apiUnlinkAddressContractRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]