git.delta.rocks / unique-network / refs/commits / d254843023e3

difftreelog

test fix attribute imports

Yaroslav Bolyukin2022-08-25parent: #78becc5.patch.diff
in: master

1 file changed

modifiedcrates/evm-coder/tests/random.rsdiffbeforeafterboth
before · crates/evm-coder/tests/random.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617#![allow(dead_code)] // This test only checks that macros is not panicking1819use evm_coder::{ToLog, execution::Result, solidity_interface, types::*};20use evm_coder_macros::{solidity, weight};2122struct Impls;2324#[solidity_interface(name = OurInterface)]25impl Impls {26	fn fn_a(&self, _input: uint256) -> Result<bool> {27		unreachable!()28	}29}3031#[solidity_interface(name = OurInterface1)]32impl Impls {33	fn fn_b(&self, _input: uint128) -> Result<uint32> {34		unreachable!()35	}36}3738#[derive(ToLog)]39enum OurEvents {40	Event1 {41		field1: uint32,42	},43	Event2 {44		field1: uint32,45		#[indexed]46		field2: uint32,47	},48}4950#[solidity_interface(51	name = OurInterface2,52	is(OurInterface),53	inline_is(OurInterface1),54	events(OurEvents)55)]56impl Impls {57	#[solidity(rename_selector = "fnK")]58	fn fn_c(&self, _input: uint32) -> Result<uint8> {59		unreachable!()60	}61	fn fn_d(&self, _value: uint32) -> Result<uint32> {62		unreachable!()63	}6465	fn caller_sensitive(&self, _caller: caller) -> Result<uint8> {66		unreachable!()67	}68	fn payable(&mut self, _value: value) -> Result<uint8> {69		unreachable!()70	}7172	#[weight(*_weight)]73	fn with_weight(&self, _weight: uint64) -> Result<void> {74		unreachable!()75	}7677	/// Doccoment example78	fn with_doc(&self) -> Result<void> {79		unreachable!()80	}81}8283#[solidity_interface(84	name = ValidSelector,85	expect_selector = 0x00000000,86)]87impl Impls {}
after · crates/evm-coder/tests/random.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617#![allow(dead_code)] // This test only checks that macros is not panicking1819use evm_coder::{ToLog, execution::Result, solidity_interface, types::*, solidity, weight};2021struct Impls;2223#[solidity_interface(name = OurInterface)]24impl Impls {25	fn fn_a(&self, _input: uint256) -> Result<bool> {26		unreachable!()27	}28}2930#[solidity_interface(name = OurInterface1)]31impl Impls {32	fn fn_b(&self, _input: uint128) -> Result<uint32> {33		unreachable!()34	}35}3637#[derive(ToLog)]38enum OurEvents {39	Event1 {40		field1: uint32,41	},42	Event2 {43		field1: uint32,44		#[indexed]45		field2: uint32,46	},47}4849#[solidity_interface(50	name = OurInterface2,51	is(OurInterface),52	inline_is(OurInterface1),53	events(OurEvents)54)]55impl Impls {56	#[solidity(rename_selector = "fnK")]57	fn fn_c(&self, _input: uint32) -> Result<uint8> {58		unreachable!()59	}60	fn fn_d(&self, _value: uint32) -> Result<uint32> {61		unreachable!()62	}6364	fn caller_sensitive(&self, _caller: caller) -> Result<uint8> {65		unreachable!()66	}67	fn payable(&mut self, _value: value) -> Result<uint8> {68		unreachable!()69	}7071	#[weight(*_weight)]72	fn with_weight(&self, _weight: uint64) -> Result<void> {73		unreachable!()74	}7576	/// Doccoment example77	fn with_doc(&self) -> Result<void> {78		unreachable!()79	}80}8182#[solidity_interface(83	name = ValidSelector,84	expect_selector = 0x00000000,85)]86impl Impls {}