Skip to content

Commit

Permalink
feat:multi asset deposit cellar functions (#240)
Browse files Browse the repository at this point in the history
* Add alternative asset protos to Cellar 2.5 API

* Add CellarWithMultiAssetDeposit abi bindings

* Update multi asset ABI to fixed version

* Git ignore DS_Store files

* Fmt

* Handlers for multi asset commit functions

* Update test certs

* Fix comment in proto
  • Loading branch information
cbrit authored Jan 26, 2024
1 parent 2c8e05f commit 38c6c3f
Show file tree
Hide file tree
Showing 24 changed files with 6,226 additions and 446 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
target
**/*.rs.bk
expanded.rs
Expand Down
23 changes: 11 additions & 12 deletions integration_tests/tls/client/test_client.crt
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICTjCCAdOgAwIBAgIUHYInHlXtDU99l6ZCL94z+Y6wDfEwCgYIKoZIzj0EAwMw
MIICOjCCAb+gAwIBAgIUHYInHlXtDU99l6ZCL94z+Y6wDfIwCgYIKoZIzj0EAwMw
RTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGElu
dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMjAxMDUwNzIwNDVaFw0yNDAxMDUw
NzIwNDVaMFkxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYD
VQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxEjAQBgNVBAMMCWxvY2FsaG9z
dDB2MBAGByqGSM49AgEGBSuBBAAiA2IABBMeRNpHRztZEFwbUg4XfZwaF+qHFGwU
GqX2FFZP7kqbhXXsVZEvTyTCR5BP7rlaGbNlClrqfxTfHevnFN7b7p7wj34ieIc8
oVwJnUarewP7n+FcpW+VFr0VI6MLLE8rw6NwMG4wHQYDVR0OBBYEFM+2bMCT7tOF
c3tuyRPwB3dFfYIwMB8GA1UdIwQYMBaAFJPJNQsdP2E0ADZaDh0K25O4iGJdMAkG
A1UdEwQCMAAwFAYDVR0RBA0wC4IJbG9jYWxob3N0MAsGA1UdDwQEAwIE8DAKBggq
hkjOPQQDAwNpADBmAjEAjf8WRKs9hPKLLBKOWkUzYvzt98tgYSrvFD4EWskouRS4
/FU0psQcFj3zw/M78OdJAjEA8Zq5iP2MSU21vgJFFq8dfKCh8joQShR5eQ6TF0sC
y6/np5w9/suxM2F25xk3FRDV
dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDAxMTgxODA5MzBaFw0yNjAxMTcx
ODA5MzBaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYD
VQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwdjAQBgcqhkjOPQIBBgUrgQQA
IgNiAASZ6/ZOgSkYGv95w22JI9VOc/n4Pp58dX/HGayUaXp3RRfrmOWZqNMGE0mw
X7IxZFIyAlMF/yVO1CpBa+QYAxBSCSFtk4Xfm+oRbm50tVglOHqmBJ2FUZFdjGQZ
nXUop1SjcDBuMB0GA1UdDgQWBBQmWBjkhrEyz/G9BEeJ9R0lOWYXCzAfBgNVHSME
GDAWgBRp967wEXqKYc3wtnElJiSdbaOi8jAJBgNVHRMEAjAAMBQGA1UdEQQNMAuC
CWxvY2FsaG9zdDALBgNVHQ8EBAMCBPAwCgYIKoZIzj0EAwMDaQAwZgIxALzu6mM6
cavgPRxTsQbRa2upztXzZJPqvGvaGD22qRuW4Fp4X64vsT+41P/RBPxgvAIxAN8m
6enKw36GyK3qfKfuYfo9/zQXwA+xwz6Yg8AmkhyJBkDb3IA+AFkVd2KPZvEErA==
-----END CERTIFICATE-----
20 changes: 10 additions & 10 deletions integration_tests/tls/client/test_client_ca.crt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICGzCCAaKgAwIBAgIUVYhZ4+pC7vQAf5FC6pssLk/eq5YwCgYIKoZI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VHSME
GDAWgBRp967wEXqKYc3wtnElJiSdbaOi8jAPBgNVHRMBAf8EBTADAQH/MAoGCCqG
SM49BAMDA2kAMGYCMQCn7q6XvamJK8PHTN5yHVqU1f8h0qVaVFCGbv6rQ7O3BI32
0Wjq7NIgKnnqart1b5kCMQCNNRi3uLWjUZevRjdHv5bSqUNLqDWamWAimphsW1Fr
mDdaPrS91JopAbmpG0Dh1pI=
-----END CERTIFICATE-----
2 changes: 1 addition & 1 deletion integration_tests/tls/client/test_client_ca.srl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1D82271E55ED0D4F7D97A6422FDE33F98EB00DF1
1D82271E55ED0D4F7D97A6422FDE33F98EB00DF2
8 changes: 4 additions & 4 deletions integration_tests/tls/client/test_client_ca_key_non-pkcs8.pem
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDDSNJ9TULBnhwiLGJwCtiG+R62qg65/g2XpO3Dl6o3ePuyrLVRPRZuY
klZszxKPfNSgBwYFK4EEACKhZANiAAQ3jwZd0Xe9w55UyAxRuc4F2u/LDdo7ykCZ
BO34neXpLR4GRRpx5VjFdHcXWjvM9j3DnWjptb1fe7TIKSSJRmW1skWkpktOthIP
hfga9jBhU4WRUDloKk1tRuiIe8rRSlQ=
MIGkAgEBBDCVrkY6b+9pzy5itS9c9eJXwX3JnKmdUvRB0EtjgxF8675zcgTtPkoH
nWlat0j6rZagBwYFK4EEACKhZANiAATkD5XphfA3heNQqBXLx2287f9u5TzTy/CA
gMw28L5rhdMSQu4TXwMp7R25uvxeALhQP9V0JUp6k2NtAhi+qgy0rfs2TkaIZAec
4oUZhuGzp1wl4AxEfaQBsHBgANaNdBQ=
-----END EC PRIVATE KEY-----
8 changes: 4 additions & 4 deletions integration_tests/tls/client/test_client_ca_key_pkcs8.pem
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-----BEGIN PRIVATE KEY-----
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDDSNJ9TULBnhwiLGJwC
tiG+R62qg65/g2XpO3Dl6o3ePuyrLVRPRZuYklZszxKPfNShZANiAAQ3jwZd0Xe9
w55UyAxRuc4F2u/LDdo7ykCZBO34neXpLR4GRRpx5VjFdHcXWjvM9j3DnWjptb1f
e7TIKSSJRmW1skWkpktOthIPhfga9jBhU4WRUDloKk1tRuiIe8rRSlQ=
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDCVrkY6b+9pzy5itS9c
9eJXwX3JnKmdUvRB0EtjgxF8675zcgTtPkoHnWlat0j6rZahZANiAATkD5XphfA3
heNQqBXLx2287f9u5TzTy/CAgMw28L5rhdMSQu4TXwMp7R25uvxeALhQP9V0JUp6
k2NtAhi+qgy0rfs2TkaIZAec4oUZhuGzp1wl4AxEfaQBsHBgANaNdBQ=
-----END PRIVATE KEY-----
8 changes: 4 additions & 4 deletions integration_tests/tls/client/test_client_key_non-pkcs8.pem
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDCHaVrGiqE73xC+nuzTz4VJy4N3zvnDR4VC/q25lDby/pcUG4wSOHVy
SXHAaO4nMD2gBwYFK4EEACKhZANiAAQTHkTaR0c7WRBcG1IOF32cGhfqhxRsFBql
9hRWT+5Km4V17FWRL08kwkeQT+65WhmzZQpa6n8U3x3r5xTe2+6e8I9+IniHPKFc
CZ1Gq3sD+5/hXKVvlRa9FSOjCyxPK8M=
MIGkAgEBBDAwx3jOUp14rizeC/T2aJeUM0VRXvou1a9/MlfrT+4CEpoBkXe21CJU
wkjElX+WPiOgBwYFK4EEACKhZANiAASZ6/ZOgSkYGv95w22JI9VOc/n4Pp58dX/H
GayUaXp3RRfrmOWZqNMGE0mwX7IxZFIyAlMF/yVO1CpBa+QYAxBSCSFtk4Xfm+oR
bm50tVglOHqmBJ2FUZFdjGQZnXUop1Q=
-----END EC PRIVATE KEY-----
8 changes: 4 additions & 4 deletions integration_tests/tls/client/test_client_key_pkcs8.pem
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-----BEGIN PRIVATE KEY-----
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDCHaVrGiqE73xC+nuzT
z4VJy4N3zvnDR4VC/q25lDby/pcUG4wSOHVySXHAaO4nMD2hZANiAAQTHkTaR0c7
WRBcG1IOF32cGhfqhxRsFBql9hRWT+5Km4V17FWRL08kwkeQT+65WhmzZQpa6n8U
3x3r5xTe2+6e8I9+IniHPKFcCZ1Gq3sD+5/hXKVvlRa9FSOjCyxPK8M=
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDAwx3jOUp14rizeC/T2
aJeUM0VRXvou1a9/MlfrT+4CEpoBkXe21CJUwkjElX+WPiOhZANiAASZ6/ZOgSkY
Gv95w22JI9VOc/n4Pp58dX/HGayUaXp3RRfrmOWZqNMGE0mwX7IxZFIyAlMF/yVO
1CpBa+QYAxBSCSFtk4Xfm+oRbm50tVglOHqmBJ2FUZFdjGQZnXUop1Q=
-----END PRIVATE KEY-----
20 changes: 10 additions & 10 deletions integration_tests/tls/server/test_server.crt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
-----BEGIN CERTIFICATE-----
MIICTDCCAdOgAwIBAgIULiHn5Yo9yHfRhJz7c7mOjTB9rOUwCgYIKoZIzj0EAwMw
MIICTDCCAdOgAwIBAgIULiHn5Yo9yHfRhJz7c7mOjTB9rOYwCgYIKoZIzj0EAwMw
RTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGElu
dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMjAxMDUwNzIwNDVaFw0yNDAxMDUw
NzIwNDVaMFkxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYD
dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0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 deletions integration_tests/tls/server/test_server_ca.crt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICHTCCAaKgAwIBAgIUTYD5x0zSg1rOztoJK8OEgWDl+yYwCgYIKoZIzj0EAwMw
MIICHTCCAaKgAwIBAgIUQquDlEPDmgOf/HpU2EDZdT93F0cwCgYIKoZIzj0EAwMw
RTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGElu
dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMjAxMDUwNzIwMjlaFw0yNDAxMDUw
NzIwMjlaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYD
dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDAxMTgxODA5MDdaFw0yNjAxMTcx
ODA5MDdaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYD
VQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwdjAQBgcqhkjOPQIBBgUrgQQA
IgNiAATi4OkAJaqyWwS1F6mBCBftwF/K02Zl07pg2C/WJxZEaGI/cRVTELt4Qsy2
7SiGcJLIIsTQXfdNkyRue20/J/SpUDPMVbWNCozC2bS4DWd1n9uHlSMT4h7gZqxf
SkkkecCjUzBRMB0GA1UdDgQWBBSngShmDy8kt2azMqFGD1ObYaXT0DAfBgNVHSME
GDAWgBSngShmDy8kt2azMqFGD1ObYaXT0DAPBgNVHRMBAf8EBTADAQH/MAoGCCqG
SM49BAMDA2kAMGYCMQCel/W4B/LB75j0WHEHrKSoED17D4w+OrXlK6wnpVRSyOmZ
A0B4pBO4uh3ldwCZnBACMQC0whN1TI8a9Ku90nfvZ+D2kKMg/p39SmCDadQJNzwc
kp4YI2VJp0zYzt/xLiBRbZc=
IgNiAAShbzd/vZBW88hEy++CteTeIVBb4J1PPznzMkmJygJgD+fLuCwHSs7I7dkS
MMJDNWqv1jyCRq7QsYmgAoLT0G3Bw9RtJ+doFUboLlqlwWNqQUIhQiggDs3wmHw6
6Wrz2/WjUzBRMB0GA1UdDgQWBBS0H57pWOJ7hIToI8ylyp0ailAqLzAfBgNVHSME
GDAWgBS0H57pWOJ7hIToI8ylyp0ailAqLzAPBgNVHRMBAf8EBTADAQH/MAoGCCqG
SM49BAMDA2kAMGYCMQDycXAd93gqCc7CesmbINU1lCAVFXcawMgqfXV+57NwOGVs
oG53OYm3eoTtPxgGFxoCMQCJyBIgEVweRhsZrziD5+VZS+fqP7BWR5c6KN3qWIon
jGw8aAp/I2nhiP2y9HOVpFY=
-----END CERTIFICATE-----
2 changes: 1 addition & 1 deletion integration_tests/tls/server/test_server_ca.srl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2E21E7E58A3DC877D1849CFB73B98E8D307DACE5
2E21E7E58A3DC877D1849CFB73B98E8D307DACE6
8 changes: 4 additions & 4 deletions integration_tests/tls/server/test_server_ca_key_non-pkcs8.pem
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDCINLgOt9An518Pe/sciHH5GoBAlJ4iwljb5Ai1II1H+8/mwSeTPiIU
nzvrJGlS4mqgBwYFK4EEACKhZANiAATi4OkAJaqyWwS1F6mBCBftwF/K02Zl07pg
2C/WJxZEaGI/cRVTELt4Qsy27SiGcJLIIsTQXfdNkyRue20/J/SpUDPMVbWNCozC
2bS4DWd1n9uHlSMT4h7gZqxfSkkkecA=
MIGkAgEBBDAZp6mx8iODwIwaYK4BWN0rtmHcVa8gF/3OxdpcQZLUM4iGZPPqcYoQ
1YGUcKOm6RugBwYFK4EEACKhZANiAAShbzd/vZBW88hEy++CteTeIVBb4J1PPznz
MkmJygJgD+fLuCwHSs7I7dkSMMJDNWqv1jyCRq7QsYmgAoLT0G3Bw9RtJ+doFUbo
LlqlwWNqQUIhQiggDs3wmHw66Wrz2/U=
-----END EC PRIVATE KEY-----
8 changes: 4 additions & 4 deletions integration_tests/tls/server/test_server_ca_key_pkcs8.pem
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-----BEGIN PRIVATE KEY-----
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDCINLgOt9An518Pe/sc
iHH5GoBAlJ4iwljb5Ai1II1H+8/mwSeTPiIUnzvrJGlS4mqhZANiAATi4OkAJaqy
WwS1F6mBCBftwF/K02Zl07pg2C/WJxZEaGI/cRVTELt4Qsy27SiGcJLIIsTQXfdN
kyRue20/J/SpUDPMVbWNCozC2bS4DWd1n9uHlSMT4h7gZqxfSkkkecA=
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDAZp6mx8iODwIwaYK4B
WN0rtmHcVa8gF/3OxdpcQZLUM4iGZPPqcYoQ1YGUcKOm6RuhZANiAAShbzd/vZBW
88hEy++CteTeIVBb4J1PPznzMkmJygJgD+fLuCwHSs7I7dkSMMJDNWqv1jyCRq7Q
sYmgAoLT0G3Bw9RtJ+doFUboLlqlwWNqQUIhQiggDs3wmHw66Wrz2/U=
-----END PRIVATE KEY-----
8 changes: 4 additions & 4 deletions integration_tests/tls/server/test_server_key_non-pkcs8.pem
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDBJbcF9c2ijMxx2nc6naCJgVHfaqzmcGaDMyi5ua/o817xpAgf19YUb
ajTxc7zv5qSgBwYFK4EEACKhZANiAAQXZukT6dVTk8zz4ozwLbzSoS4xLbTNUGHK
Sl4Eq/1ZGnWAZR7yAQSZiSYN9IMlzMnRFq1NXt/Yppjfp+g1bCtIlL29L9vqM3YZ
JhaeLQ0RT2cVJCJkTY7vBGP/unyU0qk=
MIGkAgEBBDDpsU2rom9qjycHlD/I6GqcYMsuW+6Pgf42YDGuRIOxJF7dA+67zaY9
NRgqoW3op9ugBwYFK4EEACKhZANiAASFcEod8eiwTXafD5WhoAf/bZa1Rb3RbQpR
p6pUmt+QBZ9Z3oJzy+fX+RinadA/FWWTrTaCLWeHcBFJlXVldu/nVKvrAJziMnAe
PU65ljaaSooulKzMJmVGFQFvf/Xp6RQ=
-----END EC PRIVATE KEY-----
8 changes: 4 additions & 4 deletions integration_tests/tls/server/test_server_key_pkcs8.pem
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-----BEGIN PRIVATE KEY-----
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDBJbcF9c2ijMxx2nc6n
aCJgVHfaqzmcGaDMyi5ua/o817xpAgf19YUbajTxc7zv5qShZANiAAQXZukT6dVT
k8zz4ozwLbzSoS4xLbTNUGHKSl4Eq/1ZGnWAZR7yAQSZiSYN9IMlzMnRFq1NXt/Y
ppjfp+g1bCtIlL29L9vqM3YZJhaeLQ0RT2cVJCJkTY7vBGP/unyU0qk=
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDDpsU2rom9qjycHlD/I
6GqcYMsuW+6Pgf42YDGuRIOxJF7dA+67zaY9NRgqoW3op9uhZANiAASFcEod8eiw
TXafD5WhoAf/bZa1Rb3RbQpRp6pUmt+QBZ9Z3oJzy+fX+RinadA/FWWTrTaCLWeH
cBFJlXVldu/nVKvrAJziMnAePU65ljaaSooulKzMJmVGFQFvf/Xp6RQ=
-----END PRIVATE KEY-----
28 changes: 28 additions & 0 deletions proto/cellar_v2.proto
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ message CellarV2_5 {
CachePriceRouter cache_price_router = 19;
// Represents function `forcePositionOut(uint32 index, uint32 positionId, bool inDebtArray)`
ForcePositionOut force_position_out = 20;
// Represents function `setAlternativeAssetData(ERC20 _alternativeAsset, uint32 _alternativeHoldingPosition, uint32 _alternativeAssetFee)`
SetAlternativeAssetData set_alternative_asset_data = 21;
// Represents function `setDropAlternativeAssetData(ERC20 _alternativeAsset)`
DropAlternativeAssetData drop_alternative_asset_data = 22;
}
}

Expand Down Expand Up @@ -680,6 +684,30 @@ message CellarV2_5 {
// Whether to switch positions in the debt array, or the credit array.
bool in_debt_array = 3;
}

/*
* Allows the strategist to add, or update an existing alternative asset deposit.
*
* Represents function `setAlternativeAssetData(ERC20 _alternativeAsset, uint32 _alternativeHoldingPosition, uint32 _alternativeAssetFee)`
*/
message SetAlternativeAssetData {
// The address of the alternative asset
string alternative_asset = 1;
// The holding position to direct alternative asset deposits to
uint32 alternative_holding_position = 2;
// The fee to charge for depositing this alternative asset
uint32 alternative_asset_fee = 3;
}

/*
* Allows the strategist to stop an alternative asset from being deposited.
*
* Represents function `dropAlternativeAssetData(ERC20 _alternativeAsset)`
*/
message DropAlternativeAssetData {
// The address of the alternative asset
string alternative_asset = 1;
}
}

// Represents a call to adaptor an. The cellar must be authorized to call the target adaptor.
Expand Down
30 changes: 30 additions & 0 deletions steward/src/cellars/cellar_v2_5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ use ethers::{
};
use steward_abi::{
cellar_v2_5::{AdaptorCall as AbiAdaptorCall, *},
cellar_with_multi_asset_deposit_v1::{
CellarWithMultiAssetDepositV1Calls, DropAlternativeAssetDataCall,
SetAlternativeAssetDataCall,
},
cellar_with_share_lock_period_v1::{CellarWithShareLockPeriodV1Calls, SetShareLockPeriodCall},
};
use steward_proto::steward::{
Expand Down Expand Up @@ -315,6 +319,32 @@ pub fn get_encoded_function(call: FunctionCall, cellar_id: String) -> Result<Vec

Ok(CellarV2_5Calls::ForcePositionOut(call).encode())
}
Function::SetAlternativeAssetData(params) => {
log_cellar_call(
CELLAR_NAME,
&SetAlternativeAssetDataCall::function_name(),
&cellar_id,
);
let call = SetAlternativeAssetDataCall {
alternative_asset: sp_call_parse_address(params.alternative_asset)?,
alternative_holding_position: params.alternative_holding_position,
alternative_asset_fee: params.alternative_asset_fee,
};

Ok(CellarWithMultiAssetDepositV1Calls::SetAlternativeAssetData(call).encode())
}
Function::DropAlternativeAssetData(params) => {
log_cellar_call(
CELLAR_NAME,
&DropAlternativeAssetDataCall::function_name(),
&cellar_id,
);
let call = DropAlternativeAssetDataCall {
alternative_asset: sp_call_parse_address(params.alternative_asset)?,
};

Ok(CellarWithMultiAssetDepositV1Calls::DropAlternativeAssetData(call).encode())
}
}
}

Expand Down
Loading

0 comments on commit 38c6c3f

Please sign in to comment.