Can't pass immutable reference Clock #9103
dragunov0x
started this conversation in
General
Replies: 1 comment 1 reply
-
|
Any suggestion ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Dear team, I use clock to get timestamp, at the entry function like this:
/// Emit event with current time.
public entry fun get_time(clock: & Clock, _ctx: &mut TxContext) {
event::emit(TimeEvent { timestamp_ms: clock::timestamp_ms(clock) });
}
then I call move:
sui client call --gas-budget 1000 --package $PACKAGE --module "test_clock" --function "get_time"
got error:
Failed to execute transaction TransactionDigest(51iBXwELJHPZrUJBVArARH81CRuZJBUbdV1hXiGbAs7F) with error RpcError(Call(Custom(ErrorObject { code: ServerError(-32000), message: "Transaction has non recoverable errors from at least 1/3 of validators: [(TransactionInputObjectsErrors { errors: [ImmutableParameterExpectedError] }, [k#a57d8fdb22e41fb997965638e457b75ff225524366b9b669732ca2e95eb59bc83fb3d1e69ffbabe765a7c570340c120d1102dc1d5061408279af9fd122c7c7aa6f2fb1a0d5e23863bf09b32f52436477db6c043cd2330830321685d810fc32bb, k#8f00ecad8642577957fa533d6a47aa81ccee0dac3745f9b40a2465220b73e681053e5198b57ec29cc999b81b70f4749b13dd4f2140cf991daced03d71ee86802cb627149d06d800032c42e2f565d036f204b04b1be1d4b12d604e77cc0b95449], 5000)].", data: None })))
Beta Was this translation helpful? Give feedback.
All reactions