Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add contract to repo #113

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/cli/cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
var deployContractCmd = &cobra.Command{
Use: "deploy",
Aliases: []string{"deploy-contract"},
Short: "Deploy the AlgoDID storage smart contract",
Short: "Deploy the DIDAlgoStorage smart contract",
Example: "algoid deploy [wallet-name] [network]",
RunE: runDeployContractCmd,
}
Expand Down
2 changes: 1 addition & 1 deletion client/cli/cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func getStorageAppID(network string) (uint, error) {
}

// Get network client instance.
func getAlgoClient() (*internal.AlgoDIDClient, error) {
func getAlgoClient() (*internal.DIDAlgoStorageClient, error) {
conf := new(internal.ClientSettings)
if err := viper.UnmarshalKey("network", &conf); err != nil {
return nil, err
Expand Down
10 changes: 5 additions & 5 deletions client/internal/contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
// https://developer.algorand.org/docs/get-details/encoding/

// StorageContracts contains the pre-compiled smart contracts to
// support AlgoDID's on-chain storage.
// support DIDAlgoStorage's on-chain storage.
var StorageContracts fs.FS

//go:embed contracts
Expand All @@ -28,7 +28,7 @@ func init() {
StorageContracts, _ = fs.Sub(dist, "contracts")

// load approval program
approvalFile, err := StorageContracts.Open("AlgoDID.approval.teal")
approvalFile, err := StorageContracts.Open("DIDAlgoStorage.approval.teal")
if err != nil {
panic(err)
}
Expand All @@ -39,7 +39,7 @@ func init() {
_ = approvalFile.Close()

// load clear program
clearFile, err := StorageContracts.Open("AlgoDID.clear.teal")
clearFile, err := StorageContracts.Open("DIDAlgoStorage.clear.teal")
if err != nil {
panic(err)
}
Expand All @@ -50,9 +50,9 @@ func init() {
_ = clearFile.Close()
}

// LoadContract loads the AlgoDID smart contract ABI from JSON file.
// LoadContract loads the DIDAlgoStorage smart contract ABI from JSON file.
func LoadContract() *abi.Contract {
abiFile, _ := StorageContracts.Open("AlgoDID.abi.json")
abiFile, _ := StorageContracts.Open("DIDAlgoStorage.arc4.json")
abiContents, _ := io.ReadAll(abiFile)
contract := &abi.Contract{}
_ = json.Unmarshal(abiContents, contract)
Expand Down
2 changes: 0 additions & 2 deletions client/internal/contracts/AlgoDID.clear.teal

This file was deleted.

223 changes: 0 additions & 223 deletions client/internal/contracts/AlgoDID.json

This file was deleted.

Loading
Loading