Skip to content

Commit

Permalink
feat: add ada-preprod profile as default (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
agaffney authored Jul 17, 2024
1 parent 8e02572 commit 57360a5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ var globalConfig = &Config{
State: StateConfig{
Directory: "./.state",
},
Profile: "cardano-preprod-testing",
Profile: "ada-preprod",
}

func Load(configFile string) (*Config, error) {
Expand Down
9 changes: 9 additions & 0 deletions internal/config/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,13 @@ var Profiles = map[string]Profile{
InterceptSlot: 50844079,
InterceptHash: "81325118471fddb00a20327572b371aee7cce13b846a18500d011b9cefd2a34c",
},
"ada-preprod": Profile{
Network: "preprod",
Tld: "ada",
PolicyId: "32c89cdb9c73b904ae0fd230770ee082d6e5fe090b20eaa08ee70dd3",
ScriptAddress: "addr_test1xzqg5fr7v4ee3p2xehpnm44ad5hu485jnsn4f78566evl7qrdufu8hy0xgpxma2wyt4mtcwgt0td0rtx5ku0vxll3yns632tph",
// The intercept slot/hash correspond to the block before the first TX on the above address
InterceptSlot: 65308876,
InterceptHash: "435703531e57bfe9b4d309e7360efc43e04d06531c9393530c57bebf029ec634",
},
}
3 changes: 3 additions & 0 deletions internal/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ func (s *State) UpdateDomain(
}
domainRecordsSplit := strings.Split(string(domainRecordsVal), ",")
for _, tmpRecordKey := range domainRecordsSplit {
if tmpRecordKey == "" {
continue
}
if !slices.Contains(recordKeys, tmpRecordKey) {
if err := txn.Delete([]byte(tmpRecordKey)); err != nil {
return err
Expand Down

0 comments on commit 57360a5

Please sign in to comment.