diff --git a/autonomi/README.md b/autonomi/README.md index 465ddc707c..2603768aea 100644 --- a/autonomi/README.md +++ b/autonomi/README.md @@ -23,7 +23,7 @@ autonomi = { path = "../autonomi", version = "0.1.0" } 2. Run a local EVM node: ```sh -cargo run --bin evm_testnet -- --royalties-wallet +cargo run --bin evm_testnet ``` Take note of the console output for the next step (`RPC URL`, `Payment token address` & `Chunk payments address`). @@ -57,9 +57,9 @@ cargo run --bin=safenode-manager --features=local-discovery -- local run --build payment tokens on the network (in this case Arbitrum One): ```sh -$ EVM_NETWORK=arbitrum-one PRIVATE_KEY= cargo test --package=autonomi --features=local +$ EVM_NETWORK=arbitrum-one EVM_PRIVATE_KEY= cargo test --package=autonomi --features=local # Or with logs -$ RUST_LOG=autonomi EVM_NETWORK=arbitrum-one PRIVATE_KEY= cargo test --package=autonomi --features=local -- --nocapture +$ RUST_LOG=autonomi EVM_NETWORK=arbitrum-one EVM_PRIVATE_KEY= cargo test --package=autonomi --features=local -- --nocapture ``` ## Faucet (local) @@ -92,7 +92,7 @@ Alternatively, you can provide the wallet address that should own all the gas an startup command using the `--genesis-wallet` flag: ```sh -cargo run --bin evm_testnet -- --royalties-wallet --genesis-wallet +cargo run --bin evm_testnet -- --genesis-wallet ``` ```shell diff --git a/autonomi/tests/common/mod.rs b/autonomi/tests/common/mod.rs index 3f62f45328..21dc3b8a98 100644 --- a/autonomi/tests/common/mod.rs +++ b/autonomi/tests/common/mod.rs @@ -182,7 +182,7 @@ pub fn evm_wallet_from_env_or_default(network: evmlib::Network) -> evmlib::walle const DEFAULT_WALLET_PRIVATE_KEY: &str = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"; - let private_key = env::var("PRIVATE_KEY").unwrap_or(DEFAULT_WALLET_PRIVATE_KEY.to_string()); + let private_key = env::var("EVM_PRIVATE_KEY").unwrap_or(DEFAULT_WALLET_PRIVATE_KEY.to_string()); evmlib::wallet::Wallet::new_from_private_key(network, &private_key) .expect("Invalid private key") diff --git a/evm_testnet/README.md b/evm_testnet/README.md index 3eab9ed3d5..c6b2b20820 100644 --- a/evm_testnet/README.md +++ b/evm_testnet/README.md @@ -9,7 +9,7 @@ Tool to run a local Ethereum node that automatically deploys all Autonomi smart ### Usage ```bash -cargo run --bin evm_testnet -- --royalties-wallet --genesis-wallet +cargo run --bin evm_testnet -- --genesis-wallet ``` Example output: diff --git a/evm_testnet/src/main.rs b/evm_testnet/src/main.rs index 09f38821e5..8cef9ceb98 100644 --- a/evm_testnet/src/main.rs +++ b/evm_testnet/src/main.rs @@ -16,9 +16,6 @@ use std::str::FromStr; #[derive(Debug, Parser)] #[clap(version, author, verbatim_doc_comment)] struct Args { - /// Address that will receive the chunk payments royalties. - #[clap(long, short)] - royalties_wallet: Address, /// Wallet that will hold ~all gas funds and payment tokens. #[clap(long, short)] genesis_wallet: Option
, @@ -27,11 +24,11 @@ struct Args { #[tokio::main] async fn main() { let args = Args::parse(); - start_node(args.genesis_wallet, args.royalties_wallet).await; + start_node(args.genesis_wallet).await; } -async fn start_node(genesis_wallet: Option
, royalties_wallet: Address) { - let testnet = Testnet::new(royalties_wallet).await; +async fn start_node(genesis_wallet: Option
) { + let testnet = Testnet::new().await; println!("*************************"); println!("* Ethereum node started *"); diff --git a/evmlib/artifacts/ChunkPayments.json b/evmlib/artifacts/ChunkPayments.json index 000c56318d..5b96ec5e9a 100644 --- a/evmlib/artifacts/ChunkPayments.json +++ b/evmlib/artifacts/ChunkPayments.json @@ -9,11 +9,6 @@ "internalType": "address", "name": "_tokenAddress", "type": "address" - }, - { - "internalType": "address", - "name": "_foundationWallet", - "type": "address" } ], "stateMutability": "nonpayable", @@ -57,19 +52,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "ROYALTIES_WALLET", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -101,8 +83,8 @@ "type": "function" } ], - "bytecode": "0x60c060405234801561001057600080fd5b5060405161075b38038061075b83398101604081905261002f91610130565b6001600160a01b0382166100965760405162461bcd60e51b8152602060048201526024808201527f546f6b656e20616464726573732063616e6e6f74206265207a65726f206164646044820152637265737360e01b60648201526084015b60405180910390fd5b6001600160a01b0381166100fd5760405162461bcd60e51b815260206004820152602860248201527f466f756e646174696f6e2077616c6c65742063616e6e6f74206265207a65726f604482015267206164647265737360c01b606482015260840161008d565b6001600160a01b039182166080521660a052610163565b80516001600160a01b038116811461012b57600080fd5b919050565b6000806040838503121561014357600080fd5b61014c83610114565b915061015a60208401610114565b90509250929050565b60805160a0516105b96101a2600039600081816060015261018401526000818160a3015281816101cf015281816102d101526103d101526105b96000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806305aa488a146100465780631c317b341461005b5780635c0d32861461009e575b600080fd5b610059610054366004610444565b6100c5565b005b6100827f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b6100827f000000000000000000000000000000000000000000000000000000000000000081565b6000805b8281101561017d57368484838181106100e4576100e46104b9565b90506060020190506000600a82602001356100ff91906104cf565b905061010b81856104f1565b93506101283361011e6020850185610518565b84602001356101ae565b60408201356020830180359061013e9085610518565b6001600160a01b03167fa6df5ca64d2adbcdd26949b97238efc4e97dc7e5d23012ea53f92a24f005f95860405160405180910390a450506001016100c9565b506101a9337f0000000000000000000000000000000000000000000000000000000000000000836101ae565b505050565b6040516370a0823160e01b81526001600160a01b03848116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015610218573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023c9190610548565b101561029a5760405162461bcd60e51b815260206004820152602260248201527f57616c6c657420646f6573206e6f74206861766520656e6f75676820746f6b656044820152616e7360f01b60648201526084015b60405180910390fd5b6001600160a01b03831630146103a357604051636eb1769f60e11b81526001600160a01b03848116600483015230602483015282917f00000000000000000000000000000000000000000000000000000000000000009091169063dd62ed3e90604401602060405180830381865afa15801561031a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033e9190610548565b10156103a35760405162461bcd60e51b815260206004820152602e60248201527f436f6e7472616374206973206e6f7420616c6c6f77656420746f207370656e6460448201526d20656e6f75676820746f6b656e7360901b6064820152608401610291565b6040516323b872dd60e01b81526001600160a01b0384811660048301528381166024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af115801561041a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043e9190610561565b50505050565b6000806020838503121561045757600080fd5b823567ffffffffffffffff8082111561046f57600080fd5b818501915085601f83011261048357600080fd5b81358181111561049257600080fd5b8660206060830285010111156104a757600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b6000826104ec57634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561051257634e487b7160e01b600052601160045260246000fd5b92915050565b60006020828403121561052a57600080fd5b81356001600160a01b038116811461054157600080fd5b9392505050565b60006020828403121561055a57600080fd5b5051919050565b60006020828403121561057357600080fd5b8151801515811461054157600080fdfea264697066735822122094c63e1f2c74507a86a2259c9b1cb5a11238724ae1164198b92142b5386eda6164736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806305aa488a146100465780631c317b341461005b5780635c0d32861461009e575b600080fd5b610059610054366004610444565b6100c5565b005b6100827f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b6100827f000000000000000000000000000000000000000000000000000000000000000081565b6000805b8281101561017d57368484838181106100e4576100e46104b9565b90506060020190506000600a82602001356100ff91906104cf565b905061010b81856104f1565b93506101283361011e6020850185610518565b84602001356101ae565b60408201356020830180359061013e9085610518565b6001600160a01b03167fa6df5ca64d2adbcdd26949b97238efc4e97dc7e5d23012ea53f92a24f005f95860405160405180910390a450506001016100c9565b506101a9337f0000000000000000000000000000000000000000000000000000000000000000836101ae565b505050565b6040516370a0823160e01b81526001600160a01b03848116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015610218573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023c9190610548565b101561029a5760405162461bcd60e51b815260206004820152602260248201527f57616c6c657420646f6573206e6f74206861766520656e6f75676820746f6b656044820152616e7360f01b60648201526084015b60405180910390fd5b6001600160a01b03831630146103a357604051636eb1769f60e11b81526001600160a01b03848116600483015230602483015282917f00000000000000000000000000000000000000000000000000000000000000009091169063dd62ed3e90604401602060405180830381865afa15801561031a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033e9190610548565b10156103a35760405162461bcd60e51b815260206004820152602e60248201527f436f6e7472616374206973206e6f7420616c6c6f77656420746f207370656e6460448201526d20656e6f75676820746f6b656e7360901b6064820152608401610291565b6040516323b872dd60e01b81526001600160a01b0384811660048301528381166024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af115801561041a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043e9190610561565b50505050565b6000806020838503121561045757600080fd5b823567ffffffffffffffff8082111561046f57600080fd5b818501915085601f83011261048357600080fd5b81358181111561049257600080fd5b8660206060830285010111156104a757600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b6000826104ec57634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561051257634e487b7160e01b600052601160045260246000fd5b92915050565b60006020828403121561052a57600080fd5b81356001600160a01b038116811461054157600080fd5b9392505050565b60006020828403121561055a57600080fd5b5051919050565b60006020828403121561057357600080fd5b8151801515811461054157600080fdfea264697066735822122094c63e1f2c74507a86a2259c9b1cb5a11238724ae1164198b92142b5386eda6164736f6c63430008180033", + "bytecode": "0x60a060405234801561001057600080fd5b506040516105f73803806105f783398101604081905261002f916100a6565b6001600160a01b0381166100955760405162461bcd60e51b8152602060048201526024808201527f546f6b656e20616464726573732063616e6e6f74206265207a65726f206164646044820152637265737360e01b606482015260840160405180910390fd5b6001600160a01b03166080526100d6565b6000602082840312156100b857600080fd5b81516001600160a01b03811681146100cf57600080fd5b9392505050565b6080516104f26101056000396000818160550152818161015101528181610253015261035301526104f26000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806305aa488a1461003b5780635c0d328614610050575b600080fd5b61004e6100493660046103c6565b610093565b005b6100777f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b60005b8181101561012b57368383838181106100b1576100b161043b565b6060029190910191506100d79050336100cd6020840184610451565b8360200135610130565b6040810135602082018035906100ed9084610451565b6001600160a01b03167fa6df5ca64d2adbcdd26949b97238efc4e97dc7e5d23012ea53f92a24f005f95860405160405180910390a450600101610096565b505050565b6040516370a0823160e01b81526001600160a01b03848116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561019a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101be9190610481565b101561021c5760405162461bcd60e51b815260206004820152602260248201527f57616c6c657420646f6573206e6f74206861766520656e6f75676820746f6b656044820152616e7360f01b60648201526084015b60405180910390fd5b6001600160a01b038316301461032557604051636eb1769f60e11b81526001600160a01b03848116600483015230602483015282917f00000000000000000000000000000000000000000000000000000000000000009091169063dd62ed3e90604401602060405180830381865afa15801561029c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c09190610481565b10156103255760405162461bcd60e51b815260206004820152602e60248201527f436f6e7472616374206973206e6f7420616c6c6f77656420746f207370656e6460448201526d20656e6f75676820746f6b656e7360901b6064820152608401610213565b6040516323b872dd60e01b81526001600160a01b0384811660048301528381166024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af115801561039c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c0919061049a565b50505050565b600080602083850312156103d957600080fd5b823567ffffffffffffffff808211156103f157600080fd5b818501915085601f83011261040557600080fd5b81358181111561041457600080fd5b86602060608302850101111561042957600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561046357600080fd5b81356001600160a01b038116811461047a57600080fd5b9392505050565b60006020828403121561049357600080fd5b5051919050565b6000602082840312156104ac57600080fd5b8151801515811461047a57600080fdfea2646970667358221220f36a68bc214963ac01148fda122f884402375e68563223e639f0b88bf6a1aaf664736f6c63430008180033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806305aa488a1461003b5780635c0d328614610050575b600080fd5b61004e6100493660046103c6565b610093565b005b6100777f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b60005b8181101561012b57368383838181106100b1576100b161043b565b6060029190910191506100d79050336100cd6020840184610451565b8360200135610130565b6040810135602082018035906100ed9084610451565b6001600160a01b03167fa6df5ca64d2adbcdd26949b97238efc4e97dc7e5d23012ea53f92a24f005f95860405160405180910390a450600101610096565b505050565b6040516370a0823160e01b81526001600160a01b03848116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561019a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101be9190610481565b101561021c5760405162461bcd60e51b815260206004820152602260248201527f57616c6c657420646f6573206e6f74206861766520656e6f75676820746f6b656044820152616e7360f01b60648201526084015b60405180910390fd5b6001600160a01b038316301461032557604051636eb1769f60e11b81526001600160a01b03848116600483015230602483015282917f00000000000000000000000000000000000000000000000000000000000000009091169063dd62ed3e90604401602060405180830381865afa15801561029c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c09190610481565b10156103255760405162461bcd60e51b815260206004820152602e60248201527f436f6e7472616374206973206e6f7420616c6c6f77656420746f207370656e6460448201526d20656e6f75676820746f6b656e7360901b6064820152608401610213565b6040516323b872dd60e01b81526001600160a01b0384811660048301528381166024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af115801561039c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c0919061049a565b50505050565b600080602083850312156103d957600080fd5b823567ffffffffffffffff808211156103f157600080fd5b818501915085601f83011261040557600080fd5b81358181111561041457600080fd5b86602060608302850101111561042957600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561046357600080fd5b81356001600160a01b038116811461047a57600080fd5b9392505050565b60006020828403121561049357600080fd5b5051919050565b6000602082840312156104ac57600080fd5b8151801515811461047a57600080fdfea2646970667358221220f36a68bc214963ac01148fda122f884402375e68563223e639f0b88bf6a1aaf664736f6c63430008180033", "linkReferences": {}, "deployedLinkReferences": {} } \ No newline at end of file diff --git a/evmlib/src/contract/chunk_payments/mod.rs b/evmlib/src/contract/chunk_payments/mod.rs index fb310ba5a1..9a8378c4bd 100644 --- a/evmlib/src/contract/chunk_payments/mod.rs +++ b/evmlib/src/contract/chunk_payments/mod.rs @@ -37,15 +37,10 @@ where /// Deploys the ChunkPayments smart contract to the network of the provider. /// ONLY DO THIS IF YOU KNOW WHAT YOU ARE DOING! - pub async fn deploy( - provider: P, - payment_token_address: Address, - royalties_wallet: Address, - ) -> Self { - let contract = - ChunkPaymentsContract::deploy(provider, payment_token_address, royalties_wallet) - .await - .expect("Could not deploy contract"); + pub async fn deploy(provider: P, payment_token_address: Address) -> Self { + let contract = ChunkPaymentsContract::deploy(provider, payment_token_address) + .await + .expect("Could not deploy contract"); ChunkPayments { contract } } diff --git a/evmlib/src/lib.rs b/evmlib/src/lib.rs index b3995ebe72..cd853bbb96 100644 --- a/evmlib/src/lib.rs +++ b/evmlib/src/lib.rs @@ -25,7 +25,7 @@ const ARBITRUM_ONE_PAYMENT_TOKEN_ADDRESS: Address = // Should be updated when the smart contract changes! const ARBITRUM_ONE_CHUNK_PAYMENTS_ADDRESS: Address = - address!("F15BfEA73b6a551C5c2e66026e4eB3b69c1F602c"); + address!("708353783756C62818aCdbce914d90E0245F7319"); #[derive(Clone, Debug, PartialEq)] pub struct CustomNetwork { diff --git a/evmlib/src/testnet.rs b/evmlib/src/testnet.rs index 5a19ea8d85..015ee035c1 100644 --- a/evmlib/src/testnet.rs +++ b/evmlib/src/testnet.rs @@ -18,16 +18,12 @@ pub struct Testnet { impl Testnet { /// Starts an Anvil node and automatically deploys the network token and chunk payments smart contracts. - pub async fn new(royalties_wallet: Address) -> Self { + pub async fn new() -> Self { let anvil = start_node(); let network_token = deploy_network_token_contract(&anvil).await; - let chunk_payments = deploy_chunk_payments_contract( - &anvil, - *network_token.contract.address(), - royalties_wallet, - ) - .await; + let chunk_payments = + deploy_chunk_payments_contract(&anvil, *network_token.contract.address()).await; Testnet { anvil, @@ -96,7 +92,6 @@ pub async fn deploy_network_token_contract( pub async fn deploy_chunk_payments_contract( anvil: &AnvilInstance, token_address: Address, - royalties_wallet: Address, ) -> ChunkPayments< Http, FillProvider< @@ -119,5 +114,5 @@ pub async fn deploy_chunk_payments_contract( .on_http(rpc_url); // Deploy the contract. - ChunkPayments::deploy(provider, token_address, royalties_wallet).await + ChunkPayments::deploy(provider, token_address).await } diff --git a/evmlib/src/transaction.rs b/evmlib/src/transaction.rs index 87798ba1d3..b74c268450 100644 --- a/evmlib/src/transaction.rs +++ b/evmlib/src/transaction.rs @@ -121,7 +121,6 @@ pub async fn verify_chunk_payment( if let Ok(event) = ChunkPaymentEvent::try_from(log) { // Check if the event matches what we expect. - // The smart contract handles royalties, so we don't have to check that. if event.quote_hash == quote_hash && event.reward_address == reward_addr && event.amount >= amount diff --git a/evmlib/src/utils.rs b/evmlib/src/utils.rs index 08378e875d..3346eb789e 100644 --- a/evmlib/src/utils.rs +++ b/evmlib/src/utils.rs @@ -1,11 +1,6 @@ -use crate::common::{Address, Amount, Hash}; +use crate::common::{Address, Hash}; use rand::Rng; -/// Returns the amount of royalties expected for a certain transfer amount. -pub fn calculate_royalties_from_amount(amount: Amount) -> Amount { - amount / Amount::from(10) -} - /// Generate a random Address. pub fn dummy_address() -> Address { Address::new(rand::rngs::OsRng.gen()) diff --git a/evmlib/src/wallet.rs b/evmlib/src/wallet.rs index 69eb0d55b9..69c9644240 100644 --- a/evmlib/src/wallet.rs +++ b/evmlib/src/wallet.rs @@ -4,7 +4,6 @@ use crate::common::{Address, QuoteHash, QuotePayment, TxHash, U256}; use crate::contract::chunk_payments::{ChunkPayments, MAX_TRANSFERS_PER_TRANSACTION}; use crate::contract::network_token::NetworkToken; use crate::contract::{chunk_payments, network_token}; -use crate::utils::calculate_royalties_from_amount; use crate::Network; use alloy::network::{Ethereum, EthereumWallet, NetworkWallet, TransactionBuilder}; use alloy::providers::fillers::{ @@ -228,10 +227,6 @@ pub async fn pay_for_quotes>( ) -> Result, PayForQuotesError> { let payments: Vec<_> = payments.into_iter().collect(); let total_amount = payments.iter().map(|(_, _, amount)| amount).sum(); - let royalties = calculate_royalties_from_amount(total_amount); - - // 2 * royalties to have a small buffer for different rounding in the smart contract. - let total_amount_with_royalties = total_amount + (U256::from(2) * royalties); let mut tx_hashes_by_quote = BTreeMap::new(); @@ -240,7 +235,7 @@ pub async fn pay_for_quotes>( wallet.clone(), network, *network.chunk_payments_address(), - total_amount_with_royalties, + total_amount, ) .await .map_err(|err| PayForQuotesError(Error::from(err), tx_hashes_by_quote.clone()))?; @@ -291,7 +286,7 @@ mod tests { #[tokio::test] async fn test_transfer_gas_tokens() { - let testnet = Testnet::new(dummy_address()).await; + let testnet = Testnet::new().await; let network = testnet.to_network(); let wallet = Wallet::new_from_private_key(network.clone(), &testnet.default_wallet_private_key()) diff --git a/evmlib/tests/chunk_payments.rs b/evmlib/tests/chunk_payments.rs index 1b0a283245..244cceab43 100644 --- a/evmlib/tests/chunk_payments.rs +++ b/evmlib/tests/chunk_payments.rs @@ -1,7 +1,6 @@ mod common; use crate::common::quote::random_quote_payment; -use crate::common::ROYALTIES_WALLET; use alloy::network::{Ethereum, EthereumWallet}; use alloy::node_bindings::AnvilInstance; use alloy::primitives::utils::parse_ether; @@ -44,8 +43,7 @@ async fn setup() -> ( let network_token = deploy_network_token_contract(&anvil).await; let chunk_payments = - deploy_chunk_payments_contract(&anvil, *network_token.contract.address(), ROYALTIES_WALLET) - .await; + deploy_chunk_payments_contract(&anvil, *network_token.contract.address()).await; (anvil, network_token, chunk_payments) } diff --git a/evmlib/tests/common/mod.rs b/evmlib/tests/common/mod.rs index 48fab70355..9e1a6d4369 100644 --- a/evmlib/tests/common/mod.rs +++ b/evmlib/tests/common/mod.rs @@ -1,6 +1 @@ -use alloy::primitives::{address, Address}; - pub mod quote; - -#[allow(dead_code)] -pub const ROYALTIES_WALLET: Address = address!("385e7887E5b41750E3679Da787B943EC42f37d75"); diff --git a/evmlib/tests/wallet.rs b/evmlib/tests/wallet.rs index a212170040..97531859b6 100644 --- a/evmlib/tests/wallet.rs +++ b/evmlib/tests/wallet.rs @@ -1,7 +1,6 @@ mod common; use crate::common::quote::random_quote_payment; -use crate::common::ROYALTIES_WALLET; use alloy::network::EthereumWallet; use alloy::node_bindings::AnvilInstance; use alloy::primitives::utils::parse_ether; @@ -22,8 +21,7 @@ async fn local_testnet() -> (AnvilInstance, Network, EthereumWallet) { let rpc_url = anvil.endpoint().parse().unwrap(); let network_token = deploy_network_token_contract(&anvil).await; let payment_token_address = *network_token.contract.address(); - let chunk_payments = - deploy_chunk_payments_contract(&anvil, payment_token_address, ROYALTIES_WALLET).await; + let chunk_payments = deploy_chunk_payments_contract(&anvil, payment_token_address).await; ( anvil,