Skip to content

Commit

Permalink
fix: attach 1 yocto to comply near security standards, refers to near…
Browse files Browse the repository at this point in the history
  • Loading branch information
futuretech6 committed Nov 7, 2022
1 parent 1176c88 commit eb7a1b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/inconsistency/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl Contract {
self.balance -= amount.0;

ext_ft_core::ext(self.token_id.clone())
.with_attached_deposit(0)
.with_attached_deposit(1)
.with_static_gas(GAS_FOR_FT_TRANSFER_CALL)
.ft_transfer(self.depositor.clone(), amount, None)
.then(
Expand All @@ -55,7 +55,7 @@ impl Contract {
self.balance -= amount.0;

ext_ft_core::ext(self.token_id.clone())
.with_attached_deposit(0)
.with_attached_deposit(1)
.with_static_gas(GAS_FOR_FT_TRANSFER)
.ft_transfer_call(self.depositor.clone(), amount, None, "".to_string())
.then(
Expand Down
2 changes: 1 addition & 1 deletion examples/reentrancy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl VictimContract {
assert!(self.balance >= amount.into(), "insufficient balance");

ext_ft_core::ext(self.token_id.clone())
.with_attached_deposit(0)
.with_attached_deposit(1)
.with_static_gas(GAS_FOR_FT_TRANSFER_CALL)
.ft_transfer_call(self.depositor.clone(), amount, None, "".to_string())
.then(
Expand Down
2 changes: 1 addition & 1 deletion examples/transfer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl Contract {
self.balance -= amount.0;

ext_ft_core::ext(self.token_id.clone())
.with_attached_deposit(0)
.with_attached_deposit(1)
.with_static_gas(GAS_FOR_FT_TRANSFER)
.ft_transfer(self.depositor.clone(), amount, None)
.then(
Expand Down

0 comments on commit eb7a1b1

Please sign in to comment.