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

Add Confidential Transfers Module #1980

Open
wants to merge 75 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
b667e02
ciphertext example type
dssei Oct 16, 2024
e6dab7b
fix linting errors
dssei Oct 16, 2024
4bd729e
commit generated code
dssei Oct 16, 2024
aad5138
codec + some validation + routing
dssei Oct 16, 2024
6797664
adding zk related objects
dssei Oct 17, 2024
592beb2
tests
dssei Oct 17, 2024
b33ad17
remove challenge from ciphertext validity proof
dssei Oct 17, 2024
a565c04
revert params.pb.go
dssei Oct 17, 2024
3333a06
Fix test to use correct result object for proofs. Add range proofs
dssei Oct 29, 2024
46aac3c
Add decryption test
dssei Oct 29, 2024
085deb9
RemainingBalanceEqualityProof
dssei Oct 29, 2024
675c39e
TransferAmountLoEqualityProof & TransferAmountHiEqualityProof tests
dssei Oct 29, 2024
3e15326
fix formatting
dssei Oct 29, 2024
8a73f57
add missing validations
dssei Oct 29, 2024
7f7550f
auditors
dssei Oct 30, 2024
a792340
add marshalling/unmarshalling of the messages
dssei Oct 30, 2024
81265bc
go mod tidy
dssei Oct 30, 2024
bcdb017
fix linting issues
dssei Oct 30, 2024
fd16a60
add more tests
dssei Oct 30, 2024
0775f98
tests for zk.go
dssei Oct 30, 2024
1b07386
more tests
dssei Oct 30, 2024
ee14d68
Scaffolding (#1916)
mj850 Nov 1, 2024
6129d89
CT types - Apply balance close account (#1919)
dssei Nov 4, 2024
71ad41a
Add Deposit and InitializeAccount types (#1921)
mj850 Nov 5, 2024
92bbcf5
Genesis draft (#1924)
dssei Nov 7, 2024
77c7fb4
Ct queries (#1927)
dssei Nov 12, 2024
094bf82
Add msg_server methods (#1923)
mj850 Nov 13, 2024
26a9971
basic cli and first draft command for ct module (#1929)
dssei Nov 14, 2024
6c66a70
Add confidential transfer queries to seid (#1931)
mj850 Nov 15, 2024
a7d5cc5
Update confidential transfers swagger/openAPI spec (#1937)
dssei Nov 18, 2024
c51f80d
Add other confidential tx methods to seid (#1933)
mj850 Nov 19, 2024
a45b042
Ct ACL mappings (#1947)
dssei Nov 19, 2024
435c029
Add query decrypted tx method to confidential transfers client (#1950)
mj850 Nov 21, 2024
9a565b8
Add Integration tests for CT Module (#1958)
mj850 Nov 26, 2024
fcfa23b
add ct to load test framework (#1959)
dssei Dec 3, 2024
193a429
Use BigInt in CT Module (#1966)
mj850 Dec 3, 2024
8f1b057
Manually consume gas for expensive txes and add params (#1972)
mj850 Dec 6, 2024
cb36ad7
refactor ct cli to use SDK coin format (#1977)
dssei Dec 6, 2024
03f7e49
Use updated CachedRangeVerifier (#1975)
mj850 Dec 6, 2024
2147df3
params revert
mj850 Dec 7, 2024
a04736a
fix deps
mj850 Dec 7, 2024
7f04330
Merge branch 'main' of github.com:sei-protocol/sei-chain into feature…
dssei Dec 9, 2024
49203d9
rollback evm params
dssei Dec 9, 2024
e5953b7
change pendingBalanceLo in decryptable account object
dssei Dec 6, 2024
06ab705
Bump coinbase crypto lib version (#1985)
dssei Dec 10, 2024
b18cbc9
Increase test coverage (#1986)
dssei Dec 11, 2024
2a61565
Merge branch 'main' into feature/ct_module
dssei Dec 11, 2024
2a81859
increase test time-out
dssei Dec 11, 2024
dccadcc
tests for VerifyAuditorProof
dssei Dec 11, 2024
3ea3b67
manual merge with main
dssei Dec 11, 2024
5ff5ab3
MsgInitializeAccount tests
dssei Dec 12, 2024
5e292e3
MsgTransfer#FromProto invalid inputs tests
dssei Dec 12, 2024
dd546bc
Merge branch 'main' of github.com:sei-protocol/sei-chain into feature…
dssei Dec 12, 2024
1f75a8e
- tests for transfer msg decrypt
dssei Dec 12, 2024
616733e
- tests for InitializeAccount invalid fields
dssei Dec 12, 2024
5073bd0
- tests for MsgInitializeAccount_Decrypt
dssei Dec 12, 2024
c1d2146
- tests for MsgApplyPendingBalance
dssei Dec 12, 2024
88dd53d
- tests for MsgWithdraw
dssei Dec 13, 2024
2b6bea0
- route and type message tests
dssei Dec 13, 2024
0999e20
Use Signed Message for Key Devrivation (#1981)
mj850 Dec 13, 2024
e19c16c
Consume gas before verifying range proof (#1987)
mj850 Dec 13, 2024
ff2acb6
Merge branch 'main' into feature/ct_module
dssei Dec 13, 2024
e188015
- fix tests
dssei Dec 13, 2024
e4233ec
- few more tests
dssei Dec 13, 2024
7fa9de1
Ct transfer precompile (#1994)
dssei Dec 19, 2024
108b09f
Transfer with auditors precompile (#1997)
dssei Dec 20, 2024
ec80923
Ct init account precompile (#2017)
dssei Jan 6, 2025
417b4a4
Support Sei addresses in transfer precompiles (#2021)
dssei Jan 6, 2025
7a462fe
Ct deposit precompile (#2023)
dssei Jan 8, 2025
c398a7a
Use caller instead of from address (#2030)
dssei Jan 13, 2025
636ae87
Add ApplyPendingBalance, Withdraw and CloseAccount to ConfidentialTra…
mj850 Jan 15, 2025
f39d303
Ct Account query precompile (#2038)
dssei Jan 15, 2025
6bb5ffa
Fix account not found error code (#2041)
dssei Jan 17, 2025
b1b9047
Ct EVM transactions decryption (#2046)
dssei Jan 27, 2025
6e44b42
update artifacts ver
mj850 Feb 19, 2025
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
Prev Previous commit
Next Next commit
Add ApplyPendingBalance, Withdraw and CloseAccount to ConfidentialTra…
…nsfers Precompile (#2033)

* apply precompile

* add withdraw precompile as well

* update with queries

* update precompiles for sender

* close account and integration tests

* lint
  • Loading branch information
mj850 authored Jan 15, 2025
commit 636ae87ce26d4b7b2f31fe3b1e9cbf3510c4d67f
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,80 @@
verifiers:
# Verify that the apply pending balance was unsuccessful
- type: eval
expr: APPLY_PENDING_BALANCE_CODE != 0
expr: APPLY_PENDING_BALANCE_CODE != 0

- name: Test applying pending balances on confidential token account via precompile
inputs:
# Setup test account
- cmd: printf "12345678\n" | seid keys add ctprapply
- cmd: printf "12345678\n" | seid keys show -a admin
env: ADMIN_ADDR
- cmd: printf "12345678\n" | seid keys show -a ctprapply
env: TEST_PRECOMPILE_ADDR
- cmd: printf "12345678\n" | seid tx bank send $ADMIN_ADDR $TEST_PRECOMPILE_ADDR 10sei -b block --fees 2000usei --chain-id sei -y --output json | jq -r ".code"
- cmd: printf "12345678\n" | seid tx bank send $ADMIN_ADDR $TEST_PRECOMPILE_ADDR 20000uatom -b block --fees 2000usei --chain-id sei -y --output json | jq -r ".code"

# Initialize confidential token account for denom uatom for ctprapply
- cmd: printf "12345678\n" | seid tx ct init-account uatom --from ctprapply --fees 4000usei --chain-id sei -b block -y --output json | jq -r ".code"
env: INIT_ACCOUNT_CODE

# Deposit to the confidential token account
- cmd: printf "12345678\n" | seid tx ct deposit 10000uatom --from ctprapply --fees 4000usei --chain-id sei -b block -y --output json | jq -r ".code"
env: DEPOSIT_CODE

# Query the initial account state
- cmd: printf "12345678\n" | seid q ct account uatom $TEST_PRECOMPILE_ADDR --decryptor ctprapply --output json
env: INITIAL_ACCOUNT_STATE
- cmd: echo $INITIAL_ACCOUNT_STATE | jq -r ".combined_pending_balance"
env: INITIAL_PENDING_BALANCE
- cmd: echo $(( $(echo $INITIAL_ACCOUNT_STATE | jq -r ".decryptable_available_balance") )) # Convert to integer
env: INITIAL_AVAILABLE_BALANCE

# Apply Pending Balances on the confidential token account via precompile
- cmd: |
printf "12345678\n" | seid tx evm call-contract --from ctprapply --fees=40000usei --gas=2000000 0x0000000000000000000000000000000000001010 -b block "$(printf "12345678\n" | seid q evm ct-apply-pending-balance-payload precompiles/confidentialtransfers/abi.json $TEST_PRECOMPILE_ADDR uatom)" | sed "s/.*: //"
env: TX_HASH
- cmd: sleep 2
# Query the Cosmos tx hash
- cmd: |
curl --location --request GET "localhost:8545/" --header "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"sei_getCosmosTx\",\"params\":[\"$TX_HASH\"],\"id\":788}" | jq -r ".result"
env: COSMOS_TX_HASH

# Query the Cosmos tx result
- cmd: seid q tx $COSMOS_TX_HASH --output json | jq -r ".code"
env: APPLY_PENDING_BALANCE_CODE

# Query the account to verify the new account state
- cmd: printf "12345678\n" | seid q ct account uatom $TEST_PRECOMPILE_ADDR --decryptor ctprapply --output json
env: FINAL_ACCOUNT_STATE
- cmd: echo $FINAL_ACCOUNT_STATE | jq -r ".combined_pending_balance"
env: FINAL_PENDING_BALANCE
- cmd: echo $FINAL_ACCOUNT_STATE | jq -r ".pending_balance_credit_counter"
env: FINAL_PENDING_BALANCE_COUNTER
- cmd: echo $FINAL_ACCOUNT_STATE | jq -r ".decryptable_available_balance"
env: FINAL_AVAILABLE_BALANCE

verifiers:
# Verify that the account exists after the instruction is executed.
- type: eval
expr: INIT_ACCOUNT_CODE == 0 or INIT_ACCOUNT_CODE == 38

# Verify that the deposit was successful
- type: eval
expr: DEPOSIT_CODE == 0

# Verify that the deposit was successful
- type: eval
expr: APPLY_PENDING_BALANCE_CODE == 0

# Verify that the pending balance is now 0.
- type: eval
expr: FINAL_PENDING_BALANCE == 0

# Verify that the pending balance counter is 0
- type: eval
expr: FINAL_PENDING_BALANCE_COUNTER == 0

# Verify that the available balance is the sum of the initial pending balance and initial available balance
- type: eval
expr: INITIAL_AVAILABLE_BALANCE + INITIAL_PENDING_BALANCE == FINAL_AVAILABLE_BALANCE
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,44 @@
- type: eval
expr: WITHDRAW_CODE == 0

# Verify that closing the account was successful
- type: eval
expr: CLOSE_ACCOUNT_CODE == 0

- name: Test closing confidential token account via precompile
inputs:
# Setup test account
- cmd: printf "12345678\n" | seid keys add ctprclose
- cmd: printf "12345678\n" | seid keys show -a admin
env: ADMIN_ADDR
- cmd: printf "12345678\n" | seid keys show -a ctprclose
env: TEST_PRECOMPILE_ADDR
- cmd: printf "12345678\n" | seid tx bank send $ADMIN_ADDR $TEST_PRECOMPILE_ADDR 10sei -b block --fees 2000usei --chain-id sei -y --output json | jq -r ".code"
- cmd: printf "12345678\n" | seid tx bank send $ADMIN_ADDR $TEST_PRECOMPILE_ADDR 20000uatom -b block --fees 2000usei --chain-id sei -y --output json | jq -r ".code"

# Initialize confidential token account for denom uatom for ctprclose
- cmd: printf "12345678\n" | seid tx ct init-account uatom --from ctprclose --fees 4000usei --chain-id sei -b block -y --output json | jq -r ".code"
env: INIT_ACCOUNT_CODE

# Close the confidential token account via precompile
- cmd: |
printf "12345678\n" | seid tx evm call-contract --from ctprclose --fees=40000usei --gas=2000000 0x0000000000000000000000000000000000001010 -b block "$(printf "12345678\n" | seid q evm ct-close-account-payload precompiles/confidentialtransfers/abi.json $TEST_PRECOMPILE_ADDR uatom)" | sed "s/.*: //"
env: TX_HASH
- cmd: sleep 2
# Query the Cosmos tx hash
- cmd: |
curl --location --request GET "localhost:8545/" --header "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"sei_getCosmosTx\",\"params\":[\"$TX_HASH\"],\"id\":788}" | jq -r ".result"
env: COSMOS_TX_HASH

# Query the Cosmos tx result
- cmd: seid q tx $COSMOS_TX_HASH --output json | jq -r ".code"
env: CLOSE_ACCOUNT_CODE

verifiers:
# Verify that the account exists after the instruction is executed.
- type: eval
expr: INIT_ACCOUNT_CODE == 0 or INIT_ACCOUNT_CODE == 38

# Verify that closing the account was successful
- type: eval
expr: CLOSE_ACCOUNT_CODE == 0
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,82 @@
verifiers:
# Verify that the withdraw was unsuccessful due to uninitialized account
- type: eval
expr: WITHDRAW_CODE != 0
expr: WITHDRAW_CODE != 0

- name: Test withdrawing on confidential token account via precompile
inputs:
# Setup test account
- cmd: printf "12345678\n" | seid keys add ctprwithdraw
- cmd: printf "12345678\n" | seid keys show -a admin
env: ADMIN_ADDR
- cmd: printf "12345678\n" | seid keys show -a ctprwithdraw
env: TEST_PRECOMPILE_ADDR
- cmd: printf "12345678\n" | seid tx bank send $ADMIN_ADDR $TEST_PRECOMPILE_ADDR 10sei -b block --fees 2000usei --chain-id sei -y --output json | jq -r ".code"
- cmd: printf "12345678\n" | seid tx bank send $ADMIN_ADDR $TEST_PRECOMPILE_ADDR 20000uatom -b block --fees 2000usei --chain-id sei -y --output json | jq -r ".code"

- cmd: echo 10000
env: WITHDRAW_AMOUNT

# Initialize confidential token account for denom uatom for ctprwithdraw
- cmd: printf "12345678\n" | seid tx ct init-account uatom --from ctprwithdraw --fees 4000usei --chain-id sei -b block -y --output json | jq -r ".code"
env: INIT_ACCOUNT_CODE

# Deposit to the confidential token account
- cmd: printf "12345678\n" | seid tx ct deposit ${WITHDRAW_AMOUNT}uatom --from ctprwithdraw --fees 4000usei --chain-id sei -b block -y --output json | jq -r ".code"
env: DEPOSIT_CODE

- cmd: printf "12345678\n" | seid tx ct apply-pending-balance uatom --from ctprwithdraw --fees 4000usei --chain-id sei -b block -y --output json | jq -r ".code"
env: APPLY_PENDING_BALANCE_CODE

# Query the initial account state
- cmd: printf "12345678\n" | seid q ct account uatom $TEST_PRECOMPILE_ADDR --decryptor ctprwithdraw --output json
env: INITIAL_ACCOUNT_STATE
- cmd: echo $INITIAL_ACCOUNT_STATE | jq -r ".combined_pending_balance"
env: INITIAL_PENDING_BALANCE
- cmd: echo $(( $(echo $INITIAL_ACCOUNT_STATE | jq -r ".decryptable_available_balance") )) # Convert to integer
env: INITIAL_AVAILABLE_BALANCE

# Withdraw from the confidential token account via precompile
- cmd: |
printf "12345678\n" | seid tx evm call-contract --from ctprwithdraw --fees=40000usei --gas=2000000 0x0000000000000000000000000000000000001010 -b block "$(printf "12345678\n" | seid q evm ct-withdraw-payload precompiles/confidentialtransfers/abi.json $TEST_PRECOMPILE_ADDR ${WITHDRAW_AMOUNT}uatom)" | sed "s/.*: //"
env: TX_HASH
- cmd: sleep 2
# Query the Cosmos tx hash
- cmd: |
curl --location --request GET "localhost:8545/" --header "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"sei_getCosmosTx\",\"params\":[\"$TX_HASH\"],\"id\":788}" | jq -r ".result"
env: COSMOS_TX_HASH

# Query the Cosmos tx result
- cmd: seid q tx $COSMOS_TX_HASH --output json | jq -r ".code"
env: WITHDRAW_CODE

# Query the account to verify the new account state
- cmd: printf "12345678\n" | seid q ct account uatom $TEST_PRECOMPILE_ADDR --decryptor ctprwithdraw --output json
env: FINAL_ACCOUNT_STATE
- cmd: echo $FINAL_ACCOUNT_STATE | jq -r ".combined_pending_balance"
env: FINAL_PENDING_BALANCE
- cmd: echo $FINAL_ACCOUNT_STATE | jq -r ".pending_balance_credit_counter"
env: FINAL_PENDING_BALANCE_COUNTER
- cmd: echo $FINAL_ACCOUNT_STATE | jq -r ".decryptable_available_balance"
env: FINAL_AVAILABLE_BALANCE

verifiers:
# Verify that the account exists after the instruction is executed.
- type: eval
expr: INIT_ACCOUNT_CODE == 0 or INIT_ACCOUNT_CODE == 38

# Verify that the deposit was successful
- type: eval
expr: DEPOSIT_CODE == 0

# Verify that the apply balances operation was successful
- type: eval
expr: APPLY_PENDING_BALANCE_CODE == 0

# Verify that the withdraw was successful
- type: eval
expr: WITHDRAW_CODE == 0

# Verify that the available balance is the difference between the initial pending balance and withdraw amount
- type: eval
expr: INITIAL_AVAILABLE_BALANCE - WITHDRAW_AMOUNT == FINAL_AVAILABLE_BALANCE
3 changes: 3 additions & 0 deletions precompiles/common/expected_keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ type ChannelKeeper interface {
}

type ConfidentialTransfersKeeper interface {
ApplyPendingBalance(context.Context, *cttypes.MsgApplyPendingBalance) (*cttypes.MsgApplyPendingBalanceResponse, error)
Deposit(context.Context, *cttypes.MsgDeposit) (*cttypes.MsgDepositResponse, error)
InitializeAccount(context.Context, *cttypes.MsgInitializeAccount) (*cttypes.MsgInitializeAccountResponse, error)
Transfer(goCtx context.Context, req *cttypes.MsgTransfer) (*cttypes.MsgTransferResponse, error)
Withdraw(goCtx context.Context, req *cttypes.MsgWithdraw) (*cttypes.MsgWithdrawResponse, error)
CloseAccount(goCtx context.Context, req *cttypes.MsgCloseAccount) (*cttypes.MsgCloseAccountResponse, error)
}
22 changes: 22 additions & 0 deletions precompiles/confidentialtransfers/CT.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ interface ICT {
bytes toAmountLo,
bytes toAmountHi,
bytes remainingBalance,
string decryptableBalance,
bytes proofs
) external returns (bool success);

Expand All @@ -38,6 +39,7 @@ interface ICT {
bytes toAmountLo,
bytes toAmountHi,
bytes remainingBalance,
string decryptableBalance,
bytes proofs,
Auditor[] auditors
) external returns (bool success);
Expand All @@ -57,4 +59,24 @@ interface ICT {
string denom,
uint64 amount
) external returns (bool success);

function applyPendingBalance(
string denom,
string decryptableBalance,
uint32 pendingBalanceCreditCounter,
bytes availableBalance,
) external returns (bool success);

function withdraw(
string denom,
uint256 amount,
string decryptableBalance,
bytes remainingBalanceCommitment,
bytes proofs
) external returns (bool success);

function closeAccount(
string denom,
bytes proofs
) external returns (bool success);
}
2 changes: 1 addition & 1 deletion precompiles/confidentialtransfers/abi.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"inputs":[{"internalType":"string","name":"toAddress","type":"string"},{"internalType":"string","name":"denom","type":"string"},{"internalType":"bytes","name":"fromAmountLo","type":"bytes"},{"internalType":"bytes","name":"fromAmountHi","type":"bytes"},{"internalType":"bytes","name":"toAmountLo","type":"bytes"},{"internalType":"bytes","name":"toAmountHi","type":"bytes"},{"internalType":"bytes","name":"remainingBalance","type":"bytes"},{"internalType":"string","name":"decryptableAvailableBalance","type":"string"},{"internalType":"bytes","name":"proofs","type":"bytes"}],"name":"transfer","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"toAddress","type":"string"},{"internalType":"string","name":"denom","type":"string"},{"internalType":"bytes","name":"fromAmountLo","type":"bytes"},{"internalType":"bytes","name":"fromAmountHi","type":"bytes"},{"internalType":"bytes","name":"toAmountLo","type":"bytes"},{"internalType":"bytes","name":"toAmountHi","type":"bytes"},{"internalType":"bytes","name":"remainingBalance","type":"bytes"},{"internalType":"string","name":"decryptableAvailableBalance","type":"string"},{"internalType":"bytes","name":"proofs","type":"bytes"},{"internalType":"struct Auditor[]","name":"auditors","type":"tuple[]","components":[{"internalType":"string","name":"auditorAddress","type":"string"},{"internalType":"bytes","name":"encryptedTransferAmountLo","type":"bytes"},{"internalType":"bytes","name":"encryptedTransferAmountHi","type":"bytes"},{"internalType":"bytes","name":"transferAmountLoValidityProof","type":"bytes"},{"internalType":"bytes","name":"transferAmountHiValidityProof","type":"bytes"},{"internalType":"bytes","name":"transferAmountLoEqualityProof","type":"bytes"},{"internalType":"bytes","name":"transferAmountHiEqualityProof","type":"bytes"}]}],"name":"transferWithAuditors","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"fromAddress","type":"string"},{"internalType":"string","name":"denom","type":"string"},{"internalType":"bytes","name":"publicKey","type":"bytes"},{"internalType":"string","name":"decryptableBalance","type":"string"},{"internalType":"bytes","name":"pendingBalanceLo","type":"bytes"},{"internalType":"bytes","name":"pendingBalanceHi","type":"bytes"},{"internalType":"bytes","name":"availableBalance","type":"bytes"},{"internalType":"bytes","name":"proofs","type":"bytes"}],"name":"initializeAccount","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"denom","type":"string"},{"internalType":"uint64","name":"amount","type":"uint64"}],"name":"deposit","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
[{"inputs":[{"internalType":"string","name":"fromAddress","type":"string"},{"internalType":"string","name":"denom","type":"string"},{"internalType":"bytes","name":"publicKey","type":"bytes"},{"internalType":"string","name":"decryptableBalance","type":"string"},{"internalType":"bytes","name":"pendingBalanceLo","type":"bytes"},{"internalType":"bytes","name":"pendingBalanceHi","type":"bytes"},{"internalType":"bytes","name":"availableBalance","type":"bytes"},{"internalType":"bytes","name":"proofs","type":"bytes"}],"name":"initializeAccount","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"toAddress","type":"string"},{"internalType":"string","name":"denom","type":"string"},{"internalType":"bytes","name":"fromAmountLo","type":"bytes"},{"internalType":"bytes","name":"fromAmountHi","type":"bytes"},{"internalType":"bytes","name":"toAmountLo","type":"bytes"},{"internalType":"bytes","name":"toAmountHi","type":"bytes"},{"internalType":"bytes","name":"remainingBalance","type":"bytes"},{"internalType":"string","name":"decryptableBalance","type":"string"},{"internalType":"bytes","name":"proofs","type":"bytes"}],"name":"transfer","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"toAddress","type":"string"},{"internalType":"string","name":"denom","type":"string"},{"internalType":"bytes","name":"fromAmountLo","type":"bytes"},{"internalType":"bytes","name":"fromAmountHi","type":"bytes"},{"internalType":"bytes","name":"toAmountLo","type":"bytes"},{"internalType":"bytes","name":"toAmountHi","type":"bytes"},{"internalType":"bytes","name":"remainingBalance","type":"bytes"},{"internalType":"string","name":"decryptableBalance","type":"string"},{"internalType":"bytes","name":"proofs","type":"bytes"},{"components":[{"internalType":"string","name":"auditorAddress","type":"string"},{"internalType":"bytes","name":"encryptedTransferAmountLo","type":"bytes"},{"internalType":"bytes","name":"encryptedTransferAmountHi","type":"bytes"},{"internalType":"bytes","name":"transferAmountLoValidityProof","type":"bytes"},{"internalType":"bytes","name":"transferAmountHiValidityProof","type":"bytes"},{"internalType":"bytes","name":"transferAmountLoEqualityProof","type":"bytes"},{"internalType":"bytes","name":"transferAmountHiEqualityProof","type":"bytes"}],"internalType":"struct ICT.Auditor[]","name":"auditors","type":"tuple[]"}],"name":"transferWithAuditors","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"denom","type":"string"},{"internalType":"uint64","name":"amount","type":"uint64"}],"name":"deposit","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"denom","type":"string"},{"internalType":"string","name":"decryptableBalance","type":"string"},{"internalType":"uint32","name":"pendingBalanceCreditCounter","type":"uint32"},{"internalType":"bytes","name":"availableBalance","type":"bytes"}],"name":"applyPendingBalance","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"denom","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"string","name":"decryptableBalance","type":"string"},{"internalType":"bytes","name":"remainingBalanceCommitment","type":"bytes"},{"internalType":"bytes","name":"proofs","type":"bytes"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"denom","type":"string"},{"internalType":"bytes","name":"proofs","type":"bytes"}],"name":"closeAccount","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Loading