Skip to content

Commit

Permalink
Store contract code ledger entries
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Jan 21, 2023
1 parent f4ba5a3 commit d0f8c98
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ func getRelevantLedgerKeyFromData(data xdr.LedgerEntryData) (xdr.LedgerKey, bool
if err := key.SetContractData(data.ContractData.ContractId, data.ContractData.Val); err != nil {
panic(err)
}
case xdr.LedgerEntryTypeContractCode:
if err := key.SetContractCode(data.ContractCode.Hash); err != nil {
panic(err)
}
default:
// we don't care about any other entry types for now
return xdr.LedgerKey{}, false
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ require (
github.com/spf13/cast v0.0.0-20150508191742-4d07383ffe94 // indirect
github.com/spf13/jwalterweatherman v0.0.0-20141219030609-3d60171a6431 // indirect
github.com/spf13/pflag v0.0.0-20161005214240-4bd69631f475 // indirect
github.com/stellar/go v0.0.0-20230119185507-a054386500f2
github.com/stellar/go v0.0.0-20230120150719-164910adff87
github.com/stellar/go-xdr v0.0.0-20211103144802-8017fc4bdfee // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/xanzy/ssh-agent v0.3.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ github.com/spf13/pflag v0.0.0-20161005214240-4bd69631f475 h1:RtZIgreTwcayPTOw7G5
github.com/spf13/pflag v0.0.0-20161005214240-4bd69631f475/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/viper v0.0.0-20150621231900-db7ff930a189 h1:fvB1AFbBd6SfI9Rd0ooAJp8uLkZDbZaLFHi7ZnNP6uI=
github.com/spf13/viper v0.0.0-20150621231900-db7ff930a189/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM=
github.com/stellar/go v0.0.0-20230119185507-a054386500f2 h1:BQ/FHVfSMyw593Q/2UQdeMZy1wbN4qG2HZRPvq+za4A=
github.com/stellar/go v0.0.0-20230119185507-a054386500f2/go.mod h1:QXwuKmYVvqQZlByv0EeNb0Rgog9AP+eMmARcdt3h2rI=
github.com/stellar/go v0.0.0-20230120150719-164910adff87 h1:G9TC6GyEn+sISTg5hxrcw/CD2NOKyWslvdBfnZMH1Z4=
github.com/stellar/go v0.0.0-20230120150719-164910adff87/go.mod h1:QXwuKmYVvqQZlByv0EeNb0Rgog9AP+eMmARcdt3h2rI=
github.com/stellar/go-xdr v0.0.0-20211103144802-8017fc4bdfee h1:fbVs0xmXpBvVS4GBeiRmAE3Le70ofAqFMch1GTiq/e8=
github.com/stellar/go-xdr v0.0.0-20211103144802-8017fc4bdfee/go.mod h1:yoxyU/M8nl9LKeWIoBrbDPQ7Cy+4jxRcWcOayZ4BMps=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down

0 comments on commit d0f8c98

Please sign in to comment.