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
Use caller instead of from address (#2030)
* - add sol init account

* - precompile + basic tests

* deposit precompile

* refactor test

* use caller instead of from address

* add amount field comment

* few tweaks

* roll back init-account changes

* remove unintended changes

* remove unintended changes - 2

* use caller in transfer

* init account precompile integration test

* deposit precompile integration test

* transfer precompile integration test

* self review
  • Loading branch information
dssei authored Jan 13, 2025
commit c398a7af961945e1608affc4b941d07d90eed112
82 changes: 82 additions & 0 deletions integration_test/confidential_transfers_module/deposit_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,85 @@
# Verify that the deposit was unsuccessful
- type: eval
expr: DEPOSIT_CODE == 18

- name: Test depositing to confidential token account via precompile
inputs:
# Setup test account
- cmd: printf "12345678\n" | seid keys add ctprdeposit
- cmd: printf "12345678\n" | seid keys show -a admin
env: ADMIN_ADDR
- cmd: printf "12345678\n" | seid keys show -a ctprdeposit
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 ctprdeposit
- cmd: printf "12345678\n" | seid tx ct init-account uatom --from ctprdeposit --fees 4000usei --chain-id sei -b block -y --output json | jq -r ".code"
env: INIT_ACCOUNT_CODE

# Query the initial account state
- cmd: printf "12345678\n" | seid q ct account uatom $TEST_PRECOMPILE_ADDR --decryptor ctprdeposit --output json
env: INITIAL_ACCOUNT_STATE
- cmd: echo $INITIAL_ACCOUNT_STATE | jq -r ".combined_pending_balance"
env: INITIAL_PENDING_BALANCE
- cmd: echo $INITIAL_ACCOUNT_STATE | jq -r ".pending_balance_credit_counter"
env: INITIAL_PENDING_BALANCE_COUNTER
- cmd: echo $INITIAL_ACCOUNT_STATE | jq -r ".decryptable_available_balance"
env: INITIAL_AVAILABLE_BALANCE

# Query the initial bank balance
- cmd: seid q bank balances $TEST_PRECOMPILE_ADDR --denom uatom --output json | jq -r ".amount"
env: INITIAL_BANK_BALANCE

# Deposit to the confidential token account via precompile
- cmd: |
printf "12345678\n" | seid tx evm call-contract --from ctprdeposit --fees=40000usei --gas=2000000 0x0000000000000000000000000000000000001010 -b block "$(printf "12345678\n" | seid q evm payload precompiles/confidentialtransfers/abi.json deposit uatom 2500)" | 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: DEPOSIT_CODE

# Query the account to verify the new account state
- cmd: printf "12345678\n" | seid q ct account uatom $TEST_PRECOMPILE_ADDR --decryptor ctprdeposit --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

# Query the bank balance after deposit
- cmd: seid q bank balances $TEST_PRECOMPILE_ADDR --denom uatom --output json | jq -r ".amount"
env: FINAL_BANK_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 pending balance increased by the deposit amount
- type: eval
expr: FINAL_PENDING_BALANCE - INITIAL_PENDING_BALANCE == 2500

# Verify that the pending balance counter increased by 1
- type: eval
expr: FINAL_PENDING_BALANCE_COUNTER - INITIAL_PENDING_BALANCE_COUNTER == 1

# Verify that the available balance is untouched by this operation
- type: eval
expr: INITIAL_AVAILABLE_BALANCE == FINAL_AVAILABLE_BALANCE

# Verify that the bank balance decreased by the deposit amount
- type: eval
expr: INITIAL_BANK_BALANCE - FINAL_BANK_BALANCE == 2500
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,40 @@
verifiers:
# Verify that the account initialization was unsuccessful
- type: eval
expr: INIT_ACCOUNT_CODE == 18
expr: INIT_ACCOUNT_CODE == 18

- name: Test initializing confidential token account via precompile
inputs:
# Setup test account
- cmd: printf "12345678\n" | seid keys add ctpr
- cmd: printf "12345678\n" | seid keys show -a admin
env: ADMIN_ADDR
- cmd: printf "12345678\n" | seid keys show -a ctpr
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

- cmd: |
printf "12345678\n" | seid tx evm call-contract --from ctpr --fees=40000usei --gas=2000000 0x0000000000000000000000000000000000001010 -b block "$(printf "12345678\n" | seid q evm ct-init-account-payload precompiles/confidentialtransfers/abi.json "${TEST_PRECOMPILE_ADDR}" usei)" | 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: COSMOS_TX_RESULT

# Query the account to verify it was set up
- cmd: seid q ct account usei $TEST_PRECOMPILE_ADDR --output json | jq -r ".pending_balance_credit_counter"
env: ACCOUNT_PENDING_BALANCE_COUNTER

verifiers:
# Verify that the account initialization was successful
- type: eval
expr: COSMOS_TX_RESULT == 0

# Verify that the account exists
- type: eval
expr: ACCOUNT_PENDING_BALANCE_COUNTER == 0
121 changes: 120 additions & 1 deletion integration_test/confidential_transfers_module/transfer_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,123 @@

# Verify that the transfer was unsuccessful due to uninitialized account
- type: eval
expr: TRANSFER_CODE != 0
expr: TRANSFER_CODE != 0

- name: Test transferring from confidential token account via precompile
inputs:
# Setup test accounts
- cmd: printf "12345678\n" | seid keys add ctprsender
- cmd: printf "12345678\n" | seid keys add ctprrecipient
- cmd: printf "12345678\n" | seid keys show -a admin
env: ADMIN_ADDR
- cmd: printf "12345678\n" | seid keys show -a ctprsender
env: PRECOMPILE_SENDER_ADDR
- cmd: printf "12345678\n" | seid keys show -a ctprrecipient
env: PRECOMPILE_RECIPIENT_ADDR
- cmd: printf "12345678\n" | seid tx bank send $ADMIN_ADDR $PRECOMPILE_SENDER_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 $PRECOMPILE_SENDER_ADDR 100000000uatom -b block --fees 2000usei --chain-id sei -y --output json | jq -r ".code"
- cmd: printf "12345678\n" | seid tx bank send $ADMIN_ADDR $PRECOMPILE_RECIPIENT_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 $PRECOMPILE_RECIPIENT_ADDR 100000000uatom -b block --fees 2000usei --chain-id sei -y --output json | jq -r ".code"

# Set the transfer amount
- cmd: echo 500000
env: TRANSFER_AMOUNT

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

# Deposit to the sender confidential token account and apply the pending balance
- cmd: printf "12345678\n" | seid tx ct deposit ${TRANSFER_AMOUNT}uatom --from ctprsender --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 ctprsender --fees 4000usei --chain-id sei -b block -y --output json | jq -r ".code"
env: APPLY_PENDING_BALANCE_CODE

# Query the sender initial account state
- cmd: printf "12345678\n" | seid q ct account uatom $PRECOMPILE_SENDER_ADDR --decryptor ctprsender --output json
env: INITIAL_SENDER_ACCOUNT_STATE
- cmd: echo $INITIAL_SENDER_ACCOUNT_STATE | jq -r ".combined_pending_balance"
env: INITIAL_SENDER_PENDING_BALANCE
- cmd: echo $(( $(echo $INITIAL_SENDER_ACCOUNT_STATE | jq -r ".decryptable_available_balance") )) # Convert to integer
env: INITIAL_SENDER_AVAILABLE_BALANCE

# Query the recipient initial account state
- cmd: printf "12345678\n" | seid q ct account uatom $PRECOMPILE_RECIPIENT_ADDR --decryptor ctprrecipient --output json
env: INITIAL_RECIPIENT_ACCOUNT_STATE
- cmd: echo $INITIAL_RECIPIENT_ACCOUNT_STATE | jq -r ".combined_pending_balance"
env: INITIAL_RECIPIENT_PENDING_BALANCE
- cmd: echo $INITIAL_RECIPIENT_ACCOUNT_STATE | jq -r ".pending_balance_credit_counter"
env: INITIAL_RECIPIENT_PENDING_COUNTER
- cmd: echo $(( $(echo $INITIAL_RECIPIENT_ACCOUNT_STATE | jq -r ".decryptable_available_balance") )) # Convert to integer
env: INITIAL_RECIPIENT_AVAILABLE_BALANCE

# Transfer from the confidential token account via precompile
- cmd: |
printf "12345678\n" | seid tx evm call-contract --from ctprsender --fees=40000usei --gas=2000000 0x0000000000000000000000000000000000001010 -b block "$(printf "12345678\n" | seid q evm ct-transfer-payload precompiles/confidentialtransfers/abi.json ${PRECOMPILE_SENDER_ADDR} ${PRECOMPILE_RECIPIENT_ADDR} ${TRANSFER_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: TRANSFER_CODE

# Query the sender account to verify the new account state
- cmd: printf "12345678\n" | seid q ct account uatom $PRECOMPILE_SENDER_ADDR --decryptor ctprsender --output json
env: FINAL_SENDER_ACCOUNT_STATE
- cmd: echo $FINAL_SENDER_ACCOUNT_STATE | jq -r ".combined_pending_balance"
env: FINAL_SENDER_PENDING_BALANCE
- cmd: echo $(( $(echo $FINAL_SENDER_ACCOUNT_STATE | jq -r ".decryptable_available_balance") )) # Convert to integer
env: FINAL_SENDER_AVAILABLE_BALANCE

# Query the recipient account to verify the new account state
- cmd: printf "12345678\n" | seid q ct account uatom $PRECOMPILE_RECIPIENT_ADDR --decryptor ctprrecipient --output json
env: FINAL_RECIPIENT_ACCOUNT_STATE
- cmd: echo $FINAL_RECIPIENT_ACCOUNT_STATE | jq -r ".combined_pending_balance"
env: FINAL_RECIPIENT_PENDING_BALANCE
- cmd: echo $FINAL_RECIPIENT_ACCOUNT_STATE | jq -r ".pending_balance_credit_counter"
env: FINAL_RECIPIENT_PENDING_COUNTER
- cmd: echo $(( $(echo $FINAL_RECIPIENT_ACCOUNT_STATE | jq -r ".decryptable_available_balance") )) # Convert to integer
env: FINAL_RECIPIENT_AVAILABLE_BALANCE

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

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

# Verify that the apply pending balance was successful
- type: eval
expr: APPLY_PENDING_BALANCE_CODE == 0

# Verify that the transfer was successful
- type: eval
expr: TRANSFER_CODE == 0

# Verify that the sender available balance decreased by the transfer amount
- type: eval
expr: INITIAL_SENDER_AVAILABLE_BALANCE - FINAL_SENDER_AVAILABLE_BALANCE == TRANSFER_AMOUNT

# Verify that the sender pending balance was left untouched
- type: eval
expr: INITIAL_SENDER_PENDING_BALANCE == FINAL_SENDER_PENDING_BALANCE

# Verify that the recipient available balance was untouched by the transfer
- type: eval
expr: FINAL_RECIPIENT_AVAILABLE_BALANCE - INITIAL_RECIPIENT_AVAILABLE_BALANCE == 0

# Verify that the recipients pending balance was increased by the transfer amount
- type: eval
expr: INITIAL_RECIPIENT_PENDING_BALANCE + TRANSFER_AMOUNT == FINAL_RECIPIENT_PENDING_BALANCE
- type: eval
expr: INITIAL_RECIPIENT_PENDING_COUNTER + 1 == FINAL_RECIPIENT_PENDING_COUNTER
4 changes: 1 addition & 3 deletions precompiles/confidentialtransfers/CT.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ interface ICT {
) external returns (bool success);

function transfer(
string fromAddress,
string toAddress,
string denom,
bytes fromAmountLo,
Expand All @@ -32,7 +31,6 @@ interface ICT {
) external returns (bool success);

function transferWithAuditors(
string fromAddress,
string toAddress,
string denom,
bytes fromAmountLo,
Expand All @@ -54,8 +52,8 @@ interface ICT {
bytes transferAmountHiEqualityProof;
}

// for usei denom amount should be treated as 6 decimal instead of 19 decimal
function deposit(
string fromAddress,
string denom,
uint64 amount
) external returns (bool success);
Expand Down
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":"fromAddress","type":"string"},{"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":"fromAddress","type":"string"},{"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":"fromAddress","type":"string"},{"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":"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"}]
Loading