Skip to content
Closed
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
6 changes: 3 additions & 3 deletions example_code/applications/english_auction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ license = "MIT OR Apache-2.0"
keywords = ["arbitrum", "ethereum", "stylus", "alloy"]

[dependencies]
alloy-primitives = "=0.7.6"
alloy-sol-types = "=0.7.6"
alloy-primitives = "=0.8.20"
alloy-sol-types = "=0.8.20"
mini-alloc = "0.4.2"
stylus-sdk = "0.6.0"
stylus-sdk = "0.9.0"
hex = "0.4.3"

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions example_code/applications/english_auction/Cargo.toml.bak
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ license = "MIT OR Apache-2.0"
keywords = ["arbitrum", "ethereum", "stylus", "alloy"]

[dependencies]
alloy-primitives = "=0.7.6"
alloy-sol-types = "=0.7.6"
alloy-primitives = "=0.8.20"
alloy-sol-types = "=0.8.20"
mini-alloc = "0.4.2"
stylus-sdk = "0.6.0"
stylus-sdk = "0.9.0"
hex = "0.4.3"

[dev-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions example_code/applications/english_auction/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl EnglishAuction {
// Set the end time of the auction to 7 days from now.
self.end_at.set(U256::from(block::timestamp() + 7 * Self::ONE_DAY));
// Log the start event.
evm::log(Start {});
stylus_core::log(self.vm(),Start {});
Ok(())
},
// If the transfer fails, return an error.
Expand Down Expand Up @@ -204,7 +204,7 @@ impl EnglishAuction {
self.highest_bid.set(msg::value());

// Update the bid of the current bidder.
evm::log(Bid {
stylus_core::log(self.vm(),Bid {
sender: msg::sender(),
amount: msg::value(),
});
Expand All @@ -221,7 +221,7 @@ impl EnglishAuction {
let _ = transfer_eth(msg::sender(), bal);

// Log the withdraw event.
evm::log(Withdraw {
stylus_core::log(self.vm(),Withdraw {
bidder: msg::sender(),
amount: bal,
});
Expand Down Expand Up @@ -271,7 +271,7 @@ impl EnglishAuction {
}

// Log the end event.
evm::log(End {
stylus_core::log(self.vm(),End {
winner: highest_bidder,
amount: highest_bid,
});
Expand Down
6 changes: 3 additions & 3 deletions example_code/applications/erc20/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ license = "MIT OR Apache-2.0"
keywords = ["arbitrum", "ethereum", "stylus", "alloy"]

[dependencies]
alloy-primitives = "=0.7.6"
alloy-sol-types = "=0.7.6"
alloy-primitives = "=0.8.20"
alloy-sol-types = "=0.8.20"
mini-alloc = "0.4.2"
stylus-sdk = "0.6.0"
stylus-sdk = "0.9.0"
hex = "0.4.3"

[dev-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions example_code/applications/erc20/src/erc20.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl<T: Erc20Params> Erc20<T> {
to_balance.set(new_to_balance);

// Emitting the transfer event
evm::log(Transfer { from, to, value });
stylus_core::log(self.vm(),Transfer { from, to, value });
Ok(())
}

Expand All @@ -105,7 +105,7 @@ impl<T: Erc20Params> Erc20<T> {
self.total_supply.set(self.total_supply.get() + value);

// Emitting the transfer event
evm::log(Transfer {
stylus_core::log(self.vm(),Transfer {
from: Address::ZERO,
to: address,
value,
Expand All @@ -132,7 +132,7 @@ impl<T: Erc20Params> Erc20<T> {
self.total_supply.set(self.total_supply.get() - value);

// Emitting the transfer event
evm::log(Transfer {
stylus_core::log(self.vm(),Transfer {
from: address,
to: Address::ZERO,
value,
Expand Down Expand Up @@ -210,7 +210,7 @@ impl<T: Erc20Params> Erc20<T> {
/// Approves the spenditure of `value` tokens of msg::sender() to `spender`
pub fn approve(&mut self, spender: Address, value: U256) -> bool {
self.allowances.setter(msg::sender()).insert(spender, value);
evm::log(Approval {
stylus_core::log(self.vm(),Approval {
owner: msg::sender(),
spender,
value,
Expand Down
6 changes: 3 additions & 3 deletions example_code/applications/erc721/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ license = "MIT OR Apache-2.0"
keywords = ["arbitrum", "ethereum", "stylus", "alloy"]

[dependencies]
alloy-primitives = "=0.7.6"
alloy-sol-types = "=0.7.6"
alloy-primitives = "=0.8.20"
alloy-sol-types = "=0.8.20"
mini-alloc = "0.4.2"
stylus-sdk = "0.6.0"
stylus-sdk = "0.9.0"
hex = "0.4.3"

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions example_code/applications/erc721/src/erc721.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ impl<T: Erc721Params> Erc721<T> {
// cleaning app the approved mapping for this token
self.token_approvals.delete(token_id);

evm::log(Transfer { from, to, token_id });
stylus_core::log(self.vm(),Transfer { from, to, token_id });
Ok(())
}

Expand Down Expand Up @@ -307,7 +307,7 @@ impl<T: Erc721Params> Erc721<T> {
}
self.token_approvals.insert(token_id, approved);

evm::log(Approval {
stylus_core::log(self.vm(),Approval {
approved,
owner,
token_id,
Expand All @@ -322,7 +322,7 @@ impl<T: Erc721Params> Erc721<T> {
.setter(owner)
.insert(operator, approved);

evm::log(ApprovalForAll {
stylus_core::log(self.vm(),ApprovalForAll {
owner,
operator,
approved,
Expand Down
8 changes: 4 additions & 4 deletions example_code/applications/multi_call/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ keywords = ["arbitrum", "ethereum", "stylus", "alloy"]
description = "Stylus multi call example"

[dependencies]
alloy-primitives = "=0.7.6"
alloy-sol-types = "=0.7.6"
alloy-primitives = "=0.8.20"
alloy-sol-types = "=0.8.20"
mini-alloc = "0.4.2"
stylus-sdk = "0.6.0"
stylus-sdk = "0.9.0"
hex = "0.4.3"

[dev-dependencies]
Expand All @@ -33,4 +33,4 @@ codegen-units = 1
strip = true
lto = true
panic = "abort"
opt-level = "s"
opt-level = "s"
8 changes: 4 additions & 4 deletions example_code/applications/multi_sig/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ version = "0.1.0"
edition = "2021"

[dependencies]
alloy-primitives = "=0.7.6"
alloy-sol-types = "=0.7.6"
alloy-primitives = "=0.8.20"
alloy-sol-types = "=0.8.20"
mini-alloc = "0.4.2"
stylus-sdk = "0.6.0"
stylus-sdk = "0.9.0"
hex = "0.4.3"

[features]
Expand All @@ -21,4 +21,4 @@ codegen-units = 1
strip = true
lto = true
panic = "abort"
opt-level = "s"
opt-level = "s"
10 changes: 5 additions & 5 deletions example_code/applications/multi_sig/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl MultiSig {
pub fn deposit(&mut self) {
let sender = msg::sender();
let amount = msg::value();
evm::log(
stylus_core::log(self.vm(),
Deposit{
sender: sender,
amount: amount,
Expand All @@ -113,7 +113,7 @@ impl MultiSig {
new_tx.num_confirmations.set(U256::from(0));

// Emit the `SubmitTransaction` event.
evm::log(SubmitTransaction {
stylus_core::log(self.vm(),SubmitTransaction {
owner: msg::sender(),
txIndex: tx_index,
to: to,
Expand Down Expand Up @@ -191,7 +191,7 @@ impl MultiSig {
match call(Call::new_in(self).value(entry_value), entry_to, &entry_data) {
// If the transaction is successful, emit the `ExecuteTransaction` event.
Ok(_) => {
evm::log(ExecuteTransaction {
stylus_core::log(self.vm(),ExecuteTransaction {
owner: msg::sender(),
txIndex: U256::from(tx_index),
});
Expand Down Expand Up @@ -239,7 +239,7 @@ impl MultiSig {
confirmed_by_address.set(true);

// Emit the `ConfirmTransaction` event.
evm::log(ConfirmTransaction {
stylus_core::log(self.vm(),ConfirmTransaction {
owner: msg::sender(),
txIndex: U256::from(tx_index),
});
Expand Down Expand Up @@ -277,7 +277,7 @@ impl MultiSig {
confirmed_by_address.set(false);

// Emit the `RevokeConfirmation` event.
evm::log(RevokeConfirmation {
stylus_core::log(self.vm(),RevokeConfirmation {
owner: msg::sender(),
txIndex: U256::from(tx_index),
});
Expand Down
2 changes: 1 addition & 1 deletion example_code/applications/time_lock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
alloy-primitives = "0.7.5"
alloy-sol-types = "0.7.5"
mini-alloc = "0.4.2"
stylus-sdk = "0.6.0"
stylus-sdk = "0.9.0"
hex = "0.4.3"
sha3 = "0.10.8"

Expand Down
6 changes: 3 additions & 3 deletions example_code/applications/time_lock/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl TimeLock {
let mut queue_id = self.queued.setter(tx_id);
queue_id.set(true);
// Log the Queue event
evm::log(Queue {
stylus_core::log(self.vm(),Queue {
txId: tx_id.into(),
target,
value: value,
Expand Down Expand Up @@ -227,7 +227,7 @@ impl TimeLock {
match call(Call::new_in(self).value(value), target, &calldata) {
// Log the transaction execution if successful
Ok(_) => {
evm::log(Execute {
stylus_core::log(self.vm(),Execute {
txId: tx_id.into(),
target,
value: value,
Expand Down Expand Up @@ -269,7 +269,7 @@ impl TimeLock {
queue_id.set(false);

// Log the transaction cancellation
evm::log(Cancel {
stylus_core::log(self.vm(),Cancel {
txId: tx_id.into(),
});

Expand Down
6 changes: 3 additions & 3 deletions example_code/applications/vending_machine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ license = "MIT OR Apache-2.0"
keywords = ["arbitrum", "ethereum", "stylus", "alloy"]

[dependencies]
alloy-primitives = "=0.7.6"
alloy-sol-types = "=0.7.6"
alloy-primitives = "=0.8.20"
alloy-sol-types = "=0.8.20"
mini-alloc = "0.4.2"
stylus-sdk = "0.6.0"
stylus-sdk = "0.9.0"
hex = "0.4.3"

[dev-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions example_code/basic_examples/abi_decode/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ license = "MIT OR Apache-2.0"
keywords = ["arbitrum", "ethereum", "stylus", "alloy"]

[dependencies]
alloy-primitives = "=0.7.6"
alloy-sol-types = "=0.7.6"
alloy-primitives = "=0.8.20"
alloy-sol-types = "=0.8.20"
mini-alloc = "0.4.2"
stylus-sdk = "0.6.0"
stylus-sdk = "0.9.0"
hex = "0.4.3"

[dev-dependencies]
Expand All @@ -28,4 +28,4 @@ codegen-units = 1
strip = true
lto = true
panic = "abort"
opt-level = "s"
opt-level = "s"
8 changes: 4 additions & 4 deletions example_code/basic_examples/abi_encode/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ license = "MIT OR Apache-2.0"
keywords = ["arbitrum", "ethereum", "stylus", "alloy"]

[dependencies]
alloy-primitives = "=0.7.6"
alloy-sol-types = "=0.7.6"
alloy-primitives = "=0.8.20"
alloy-sol-types = "=0.8.20"
mini-alloc = "0.4.2"
stylus-sdk = "0.6.0"
stylus-sdk = "0.9.0"
hex = "0.4.3"
sha3 = "0.10"

Expand All @@ -29,4 +29,4 @@ codegen-units = 1
strip = true
lto = true
panic = "abort"
opt-level = "s"
opt-level = "s"
6 changes: 3 additions & 3 deletions example_code/basic_examples/arrays/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ edition = "2021"
description = "Stylus arrays example"

[dependencies]
alloy-primitives = "=0.7.6"
alloy-sol-types = "=0.7.6"
alloy-primitives = "=0.8.20"
alloy-sol-types = "=0.8.20"
mini-alloc = "0.4.2"
stylus-sdk = "0.6.0"
stylus-sdk = "0.9.0"
hex = "0.4.3"
dotenv = "0.15.0"

Expand Down
4 changes: 2 additions & 2 deletions example_code/basic_examples/call/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version = "0.1.7"
edition = "2021"

[dependencies]
alloy-primitives = "=0.7.6"
alloy-sol-types = "=0.7.6"
alloy-primitives = "=0.8.20"
alloy-sol-types = "=0.8.20"
stylus-sdk = { version = "0.6.0", features = ["reentrant"] }
hex = "0.4.3"

Expand Down
6 changes: 3 additions & 3 deletions example_code/basic_examples/constants/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ license = "MIT OR Apache-2.0"
keywords = ["arbitrum", "ethereum", "stylus", "alloy"]

[dependencies]
alloy-primitives = "=0.7.6"
alloy-sol-types = "=0.7.6"
alloy-primitives = "=0.8.20"
alloy-sol-types = "=0.8.20"
mini-alloc = "0.4.2"
stylus-sdk = "0.6.0"
stylus-sdk = "0.9.0"
hex = "0.4.3"

[dev-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions example_code/basic_examples/delegate_call/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ license = "MIT OR Apache-2.0"
keywords = ["arbitrum", "ethereum", "stylus", "alloy"]

[dependencies]
alloy-primitives = "=0.7.6"
alloy-sol-types = "=0.7.6"
alloy-primitives = "=0.8.20"
alloy-sol-types = "=0.8.20"
mini-alloc = "0.4.2"
stylus-sdk = "0.6.0"
stylus-sdk = "0.9.0"
hex = "0.4.3"
sha3 = "0.10"

Expand All @@ -29,4 +29,4 @@ codegen-units = 1
strip = true
lto = true
panic = "abort"
opt-level = "s"
opt-level = "s"
Loading