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

modify bitcoin env #84

Merged
merged 20 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 0 additions & 4 deletions .env.bitcoin
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ BITCOIN_BRIDGE_GAS_LIMIT=23333
BITCOIN_DESTINATION=tb1qfhhxljfajcppfhwa09uxwty5dz4xwfptnqmvtv
BITCOIN_ENABLE_COMMITTER=false
BITCOIN_ENABLE_INDEXER=false
BITCOIN_EVM_CONTRACT_ADDRESS=0x3c950C4D15311dB39F85441316983b3845396C6e
BITCOIN_EVM_DEPOSIT=0x01bee1bfa4116bd0440a1108ef6cb6a2f6eb9b611d8f53260aec20d39e84ee89
BITCOIN_EVM_ENABLE_LISTENER=false
BITCOIN_EVM_RPC_HOST=http://127.0.0.1
BITCOIN_EVM_RPC_PORT=8123
BITCOIN_EVM_START_HEIGHT=0
BITCOIN_EVM_WITHDRAW=0xda335c6ae73006d1145bdcf9a98bc76d789b653b13fe6200e6fc4c5dd54add86
BITCOIN_INDEXER_LISTEN_ADDRESS=tb1qgm39cu009lyvq93afx47pp4h9wxq5x92lxxgnz
BITCOIN_NETWORK_NAME=testnet
Expand Down
4 changes: 0 additions & 4 deletions bitcoin/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ func TestConfigEnv(t *testing.T) {
os.Setenv("BITCOIN_BRIDGE_AA_SCA_REGISTRY", "0xB457BF68D71a17Fa5030269Fb895e29e6cD2DF23")
os.Setenv("BITCOIN_BRIDGE_AA_KERNEL_FACTORY", "0xB457BF68D71a17Fa5030269Fb895e29e6cD2DF24")
os.Setenv("BITCOIN_EVM_ENABLE_LISTENER", "false")
os.Setenv("BITCOIN_EVM_RPC_HOST", "http://127.0.0.1")
os.Setenv("BITCOIN_EVM_RPC_PORT", "8123")
os.Setenv("BITCOIN_EVM_CONTRACT_ADDRESS", "0x3c950C4D15311dB39F85441316983b3845396C6d")
os.Setenv("BITCOIN_EVM_START_HEIGHT", "0")
os.Setenv("BITCOIN_EVM_DEPOSIT", "0x01bee1bfa4116bd0440a1108ef6cb6a2f6eb9b611d8f53260aec20d39e84ee88")
os.Setenv("BITCOIN_EVM_WITHDRAW", "0xda335c6ae73006d1145bdcf9a98bc76d789b653b13fe6200e6fc4c5dd54add85")

Expand Down
91 changes: 57 additions & 34 deletions bitcoin/testdata/abi.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,4 @@
[
{
"inputs": [],
"name": "AccessControlBadConfirmation",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "bytes32",
"name": "neededRole",
"type": "bytes32"
}
],
"name": "AccessControlUnauthorizedAccount",
"type": "error"
},
{
"inputs": [],
"name": "InvalidInitialization",
"type": "error"
},
{
"inputs": [],
"name": "NotInitializing",
"type": "error"
},
{
"anonymous": false,
"inputs": [
Expand Down Expand Up @@ -60,9 +29,9 @@
"inputs": [
{
"indexed": false,
"internalType": "uint64",
"internalType": "uint8",
"name": "version",
"type": "uint64"
"type": "uint8"
}
],
"name": "Initialized",
Expand Down Expand Up @@ -212,6 +181,29 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "deposit_uuid",
"type": "bytes32"
},
{
"internalType": "address",
"name": "b2_to_address",
"type": "address"
},
{
"internalType": "uint256",
"name": "btc_amount",
"type": "uint256"
}
],
"name": "depositV2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
Expand Down Expand Up @@ -289,7 +281,7 @@
},
{
"internalType": "address",
"name": "callerConfirmation",
"name": "account",
"type": "address"
}
],
Expand Down Expand Up @@ -335,6 +327,19 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
Expand All @@ -348,6 +353,24 @@
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "withdraw_uuid",
"type": "bytes32"
},
{
"internalType": "string",
"name": "btc_address",
"type": "string"
}
],
"name": "withdrawV2",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
Expand Down
Loading