@@ -66,9 +66,9 @@ script {
6666 use 0x1::Event;
6767 use {{sender}}::Math;
6868
69- fun main(_account : &signer, a: u64, b: u64) {
69+ fun main(account : &signer, a: u64, b: u64) {
7070 let c = Math::add(a, b);
71- Event::emit<u64>(c);
71+ Event::emit<u64>(account, c);
7272 }
7373}
7474`
@@ -78,9 +78,9 @@ script {
7878 use 0x1::Event;
7979 use 0x1::Coins;
8080
81- fun main(_account : &signer) {
81+ fun main(account : &signer) {
8282 let price = Coins::get_price<Coins::ETH, Coins::USDT>();
83- Event::emit<u128>(price);
83+ Event::emit<u128>(account, price);
8484 }
8585}
8686`
@@ -96,7 +96,7 @@ script {
9696 let a = Account::withdraw_from_sender<XFI::T>(account, 523);
9797 let b = Account::withdraw_from_sender<Coins::BTC>(account, 1);
9898
99- Event::emit<u64>(10);
99+ Event::emit<u64>(account, 10);
100100
101101 assert(c == 1000, 122);
102102 Account::deposit_to_sender(account, a);
@@ -972,13 +972,13 @@ func TestVMKeeper_EventTypeSerialization(t *testing.T) {
972972 field_VT: VT
973973 }
974974
975- public fun NewFooEvent<T, VT>(arg_T: T, arg_VT: VT): FooEvent<T, VT> {
975+ public fun NewFooEvent<T, VT>(account: &signer, arg_T: T, arg_VT: VT): FooEvent<T, VT> {
976976 let fooEvent = FooEvent<T, VT> {
977977 field_T: arg_T,
978978 field_VT: arg_VT
979979 };
980980
981- 0x1::Event::emit<bool>(true);
981+ 0x1::Event::emit<bool>(account, true);
982982
983983 fooEvent
984984 }
@@ -988,18 +988,18 @@ func TestVMKeeper_EventTypeSerialization(t *testing.T) {
988988 script {
989989 use %s::Foo;
990990
991- fun main(_account : &signer) {
991+ fun main(account : &signer) {
992992 // Event with single tag
993- 0x1::Event::emit<u8>(128);
993+ 0x1::Event::emit<u8>(account, 128);
994994
995995 // Event with single vector
996- 0x1::Event::emit<vector<u8>>(x"0102");
996+ 0x1::Event::emit<vector<u8>>(account, x"0102");
997997
998998 // Two events:
999999 // 1. Module: single tag
10001000 // 2. Script: generic struct with tag, vector
1001- let fooEvent = Foo::NewFooEvent<u64, vector<u8>>(1000, x"0102");
1002- 0x1::Event::emit<Foo::FooEvent<u64, vector<u8>>>(fooEvent);
1001+ let fooEvent = Foo::NewFooEvent<u64, vector<u8>>(account, 1000, x"0102");
1002+ 0x1::Event::emit<Foo::FooEvent<u64, vector<u8>>>(account, fooEvent);
10031003 }
10041004 }
10051005 `
@@ -1086,7 +1086,7 @@ func TestVMKeeper_EventTypeSerializationGas(t *testing.T) {
10861086 value: T
10871087 }
10881088
1089- public fun test() {
1089+ public fun test(account: &signer ) {
10901090 let a = A {
10911091 value: 10
10921092 };
@@ -1103,7 +1103,7 @@ func TestVMKeeper_EventTypeSerializationGas(t *testing.T) {
11031103 value: c
11041104 };
11051105
1106- 0x1::Event::emit<D<C<B<A>>>>(d);
1106+ 0x1::Event::emit<D<C<B<A>>>>(account, d);
11071107 }
11081108
11091109 }
@@ -1112,8 +1112,8 @@ func TestVMKeeper_EventTypeSerializationGas(t *testing.T) {
11121112 script {
11131113 use %s::GasEvent;
11141114
1115- fun main() {
1116- GasEvent::test();
1115+ fun main(account: &signer ) {
1116+ GasEvent::test(account );
11171117 }
11181118 }
11191119 `
@@ -1209,7 +1209,7 @@ func TestVMKeeper_EventTypeSerializationOutOfGas(t *testing.T) {
12091209 value: T
12101210 }
12111211
1212- public fun test() {
1212+ public fun test(account: &signer ) {
12131213 let a = A {
12141214 value: 10
12151215 };
@@ -1234,7 +1234,7 @@ func TestVMKeeper_EventTypeSerializationOutOfGas(t *testing.T) {
12341234 value: v
12351235 };
12361236
1237- 0x1::Event::emit<M<V<Z<C<B<A>>>>>>(m);
1237+ 0x1::Event::emit<M<V<Z<C<B<A>>>>>>(account, m);
12381238 }
12391239
12401240 }
@@ -1243,8 +1243,8 @@ func TestVMKeeper_EventTypeSerializationOutOfGas(t *testing.T) {
12431243 script {
12441244 use %s::OutOfGasEvent;
12451245
1246- fun main() {
1247- OutOfGasEvent::test();
1246+ fun main(account: &signer ) {
1247+ OutOfGasEvent::test(account );
12481248 }
12491249 }
12501250 `
0 commit comments