Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
Update caller address
Browse files Browse the repository at this point in the history
  • Loading branch information
boundless-forest committed Jun 1, 2021
1 parent 229514c commit 15fb6f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions frame/evm/precompile/contracts/transfer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ std = [

crates-std = [
"codec/std",
"evm/std",
"ethabi/std",
"ethereum-types/std",
"evm/std",
"ripemd160/std",
"sha3/std",
]

darwinia-std = [
"ethabi/std",
"darwinia-evm/std",
"darwinia-support/std",
"dp-evm/std",
Expand Down
5 changes: 2 additions & 3 deletions frame/evm/precompile/contracts/transfer/src/kton.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ use sha3::Digest;

const TRANSFER_AND_CALL_ACTION: &[u8] = b"transfer_and_call(address,uint256)";
const WITHDRAW_ACTION: &[u8] = b"withdraw(bytes32,uint256)";
// const KTON_PRECOMPILE: &str = "0000000000000000000000000000000000000016";
const KTON_PRECOMPILE: &str = "0000000000000000000000000000000000000015";
const CALLER_PRECOMPILE: &str = "0000000000000000000000000000000000000015";

pub enum Kton<T: frame_system::Config> {
/// Transfer from substrate account to wkton contract
Expand Down Expand Up @@ -65,7 +64,7 @@ impl<T: frame_system::Config + dvm_ethereum::Config> Kton<T> {
call_data.value,
)?;
// Call WKTON wrapped contract deposit
let precompile_address = H160::from_str(KTON_PRECOMPILE).unwrap_or_default();
let precompile_address = H160::from_str(CALLER_PRECOMPILE).unwrap_or_default();
let raw_input = make_call_data(context.caller, call_data.value)?;
if let Ok(call_res) = T::Runner::call(
precompile_address,
Expand Down

0 comments on commit 15fb6f7

Please sign in to comment.