Skip to content

Commit

Permalink
rename wallet_v5r1 to v5_beta
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-tron committed May 30, 2024
1 parent 9a3d578 commit cda9f96
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions abi/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const (
WalletV3R2
WalletV4R1
WalletV4R2
WalletV5R1
WalletV5Beta
WhalesPool
)

Expand Down Expand Up @@ -179,8 +179,8 @@ func (c ContractInterface) String() string {
return "wallet_v4r1"
case WalletV4R2:
return "wallet_v4r2"
case WalletV5R1:
return "wallet_v5r1"
case WalletV5Beta:
return "wallet_v5_beta"
case WhalesPool:
return "whales_pool"
default:
Expand Down Expand Up @@ -300,8 +300,8 @@ func ContractInterfaceFromString(s string) ContractInterface {
return WalletV4R1
case "wallet_v4r2":
return WalletV4R2
case "wallet_v5r1":
return WalletV5R1
case "wallet_v5_beta":
return WalletV5Beta
case "whales_pool":
return WhalesPool
default:
Expand Down Expand Up @@ -780,7 +780,7 @@ func (c ContractInterface) recursiveImplements(other ContractInterface) bool {
return Wallet.Implements(other)
case WalletV4R2:
return Wallet.Implements(other)
case WalletV5R1:
case WalletV5Beta:
return Wallet.Implements(other)
}
return false
Expand Down Expand Up @@ -935,13 +935,13 @@ var knownContracts = map[ton.Bits256]knownContractDescription{
},
},
ton.MustParseHash("e4cf3b2f4c6d6a61ea0f2b5447d266785b26af3637db2deee6bcd1aa826f3412"): {
contractInterfaces: []ContractInterface{WalletV5R1},
contractInterfaces: []ContractInterface{WalletV5Beta},
getMethods: []InvokeFn{
Seqno,
},
},
ton.MustParseHash("f3d7ca53493deedac28b381986a849403cbac3d2c584779af081065af0ac4b93"): {
contractInterfaces: []ContractInterface{WalletV5R1},
contractInterfaces: []ContractInterface{WalletV5Beta},
getMethods: []InvokeFn{
Seqno,
},
Expand Down
2 changes: 1 addition & 1 deletion abi/schemas/wallets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<error code="39">Plugin not found</error>
<error code="80">Not enough ton</error>
</interface>
<interface name="wallet_v5r1" inherits="wallet">
<interface name="wallet_v5_beta" inherits="wallet">
<code_hash>f3d7ca53493deedac28b381986a849403cbac3d2c584779af081065af0ac4b93</code_hash> <!-- with library -->
<code_hash>e4cf3b2f4c6d6a61ea0f2b5447d266785b26af3637db2deee6bcd1aa826f3412</code_hash> <!-- without library -->
<get_method name="seqno"/>
Expand Down
4 changes: 2 additions & 2 deletions tonconnect/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func NewTonConnect(executor abi.Executor, secret string, opts ...Option) (*Serve
var knownHashes = make(map[string]wallet.Version)

func init() {
for i := wallet.Version(0); i <= wallet.V5R1; i++ {
for i := wallet.Version(0); i <= wallet.V5Beta; i++ {
ver := wallet.GetCodeHashByVer(i)
knownHashes[hex.EncodeToString(ver[:])] = i
}
Expand Down Expand Up @@ -357,7 +357,7 @@ func ParseStateInit(stateInit string) ([]byte, error) {
return nil, err
}
pubKey = data.PublicKey
case wallet.V5R1:
case wallet.V5Beta:
var data wallet.DataV5
err = tlb.Unmarshal(&state.Data.Value.Value, &data)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion wallet/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func decodeHighloadV2Message(body *SignedMsgBody) (*HighloadV2Message, error) {
// ExtractRawMessages extracts a list of RawMessages from an external message.
func ExtractRawMessages(ver Version, msg *boc.Cell) ([]RawMessage, error) {
switch ver {
case V5R1:
case V5Beta:
v5, err := DecodeMessageV5(msg)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion wallet/messages_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestExtractRawMessages(t *testing.T) {
{
name: "v5",
boc: "te6ccgECCAEAAZ4AAfGIAehvqHPiQ2Ru+zkowjJx/7oJbqEYRnlCOuPe5+2gm24WA5tLO3f////oAAAAAAADMYd8kAAAAAEHzN670eqqNU3yWGkX1dOynyAbT7DN4cFDpE0r+nInTomGrifjPTaZvG3YxYzTHpLoNesGc9s5Q0tHlLNcFNQeAQIKDsPIbQMCAwIKDsPIbQMEBQCpaAHob6hz4kNkbvs5KMIycf+6CW6hGEZ5Qjrj3uftoJtuFwAbM0yWoWMN5aT+uK8qrHCkGgxpOEKbDu0Tui2Fbyh0iAy3GwAAAAAAAAAAAAAAAAAAQAIKDsPIbQMGBwCpaAHob6hz4kNkbvs5KMIycf+6CW6hGEZ5Qjrj3uftoJtuFwAbM0yWoWMN5aT+uK8qrHCkGgxpOEKbDu0Tui2Fbyh0iAx6EgAAAAAAAAAAAAAAAAAAQAAAAKloAehvqHPiQ2Ru+zkowjJx/7oJbqEYRnlCOuPe5+2gm24XABszTJahYw3lpP64ryqscKQaDGk4QpsO7RO6LYVvKHSIDD0JAAAAAAAAAAAAAAAAAABA",
ver: V5R1,
ver: V5Beta,
want: []RawMessage{
{
Message: mustFromHex("te6ccgEBAQEAVwAAqWgB6G+oc+JDZG77OSjCMnH/ugluoRhGeUI6497n7aCbbhcAGzNMlqFjDeWk/rivKqxwpBoMaThCmw7tE7othW8odIgMtxsAAAAAAAAAAAAAAAAAAEA="),
Expand Down
4 changes: 2 additions & 2 deletions wallet/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const (
V3R2
V4R1
V4R2
V5R1
V5Beta
HighLoadV1R1
HighLoadV1R2
HighLoadV2
Expand Down Expand Up @@ -54,7 +54,7 @@ var codes = map[Version]string{
V3R2: "te6cckEBAQEAcQAA3v8AIN0gggFMl7ohggEznLqxn3Gw7UTQ0x/THzHXC//jBOCk8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVBC9ba0=",
V4R1: "te6cckECFQEAAvUAART/APSkE/S88sgLAQI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V1R1: "te6ccgEBBgEAhgABFP8A9KQT9KDyyAsBAgEgAgMCAUgEBQC88oMI1xgg0x/TH9Mf+CMTu/Jj7UTQ0x/TH9P/0VEyuvKhUUS68qIE+QFUEFX5EPKj9ATR+AB/jhghgBD0eG+hb6EgmALTB9QwAfsAkTLiAbPmWwGkyMsfyx/L/8ntVAAE0DAAEaCZL9qJoa4WPw==",
HighLoadV1R2: "te6ccgEBCAEAmQABFP8A9KQT9LzyyAsBAgEgAgMCAUgEBQC88oMI1xgg0x/TH9Mf+CMTu/Jj7UTQ0x/TH9P/0VEyuvKhUUS68qIE+QFUEFX5EPKj9ATR+AB/jhghgBD0eG+hb6EgmALTB9QwAfsAkTLiAbPmWwGkyMsfyx/L/8ntVAAE0DACAUgGBwAXuznO1E0NM/MdcL/4ABG4yX7UTQ1wsfg=",
HighLoadV2: "te6ccgEBCQEA5QABFP8A9KQT9LzyyAsBAgEgAgcCAUgDBAAE0DACASAFBgAXvZznaiaGmvmOuF/8AEG+X5dqJoaY+Y6Z/p/5j6AmipEEAgegc30JjJLb/JXdHxQB6vKDCNcYINMf0z/4I6ofUyC58mPtRNDTH9M/0//0BNFTYIBA9A5voTHyYFFzuvKiB/kBVBCH+RDyowL0BNH4AH+OFiGAEPR4b6UgmALTB9QwAfsAkTLiAbPmW4MlochANIBA9EOK5jEByMsfE8s/y//0AMntVAgANCCAQPSWb6VsEiCUMFMDud4gkzM2AZJsIeKz",
Expand Down
2 changes: 1 addition & 1 deletion wallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func newWallet(key ed25519.PublicKey, version Version, options Options) (wallet,
return newWalletV3(version, key, options), nil
case V4R1, V4R2:
return newWalletV4(version, key, options), nil
case V5R1:
case V5Beta:
return newWalletV5(version, key, options), nil
case HighLoadV2R2:
return newWalletHighloadV2(version, key, options), nil
Expand Down

0 comments on commit cda9f96

Please sign in to comment.