I want to use a smart contract (called A SC) to call b smart contract (called B SC) setter method.
B SC setter method accept a address, like:
@Subroutine(TealType.none)
def set_worth(current_address: Expr, new_worth):
return Seq(
App.localPut(current_address, local_worth, new_worth),
)
A SC use
InnerTxnBuilder.SetFields({
TxnField.type_enum: TxnType.ApplicationCall,
TxnField.application_id: App.globalGet(global_core_contract_id),
TxnField.on_completion: OnComplete.NoOp,
TxnField.application_args: [Bytes("set_worth"),
Txn.sender(),
Itob(current_worth.value() + div_ceil(current_worth.value(), Int(10)))
],
}),
I trying goal app call
from one address to set another address local status, but not success.
exception is:
logic eval error: logic eval error: invalid Account reference
my question is:
- can i call A SC to set another address local status which is stored in B SC?
- please give me some advice , If it can’t ,