Calling function on ERC20 contract through staticcall gives wrong result

I’ve made two functions to interact with a local ERC20 token. Here they are: pragma solidity ^0.5.0; contract GardenTestContract { function getBalanceOf(address _address) public view returns (bool, uint, uint, address) { address sender = msg.sender; (bool _success, bytes memory data) = _address.staticcall(abi.encode(bytes4(keccak256(‘balanceOf(address)’)), (yaya))); (uint amount) = abi.decode(data, (uint)); return (_success, data.length, amount, sender); } function…

Help signing a P2WSH Multisig

I’m trying to construct a transaction in regtest mode that spends from a P2WSH 2-of-2 multisig. Here is the funding transaction for 5 btc. It also contains a change output for 5 btc. 020000000001013314dcdc95c9aee89b7b0324ff2b472d73561d29cbd0cb58b37009b7193573700100000017160014a41c072b586d97105728775b124a88041e43afd2ffffffff020065cd1d00000000220020f9b7fbe4a3a7a621a19e03ef53d91a6391da83615826cbafa3062d3b39adfd380065cd1d00000000160014331039b508a3ad5633c045b24d94489adbaba0a00247304402204538711966348202e3d91352c7e5b2b0a4a7dab503946bc90ce912fd26f407ca02201e4334064a150227acc24095a6685505ef568c8e1e8a4e7053aa389c395ddf26012103993a782afaa894a4ea296210a5e72d46924898e9df91a74e32435c52b044fb3700000000 This is the transaction I am trying to spend from the escrow: 0200000000010135fff0ef75190ac3ead75b46713fb63da6bf642b4e064856d5778a3e21615f300000000000ffffffff010084d717000000001600141a6053fa355499bad556165474ca9661fd517c2b040047304402207be65e2f6d5fd8f7fdb421b65bdd53a1d0c9656e6fd7a8b9bef4954b08bc4250022066156cc85b84a783a7431cafa20f6e92272a2d28a484dd2becc259fea69b687501483045022100b608f0955ec89d0e3ff5e40ca36fb141425ddf0c8ab3880f45c44ca90155fd5702206606bbde73f5bea1fbb5da07fc17445ea5a1018efcad79fcda058180e203dd220147522103c2f21de0f430251d8e3987fbe89ff51f3d6f3a48b234b84b60ddb9f24d587cf52103e0948a03f50377290847d27c93d383b8ab7e2d0bc065e96e0e1136b315388b5452ae00000000 bitcoin-cli is giving me this error message when…

Truffle. Test .call() args . Error: invalid string value (…) at PromiEvent

I have a js truffle test: it(“should add an exam to the exams list”, async () => { // This should test the complete functionality let hash_test = “fB03aA5E2E71De1470ae2”; let instance = await Exam.deployed(); let hash = instance.addExam.call({from: accounts[0], hash: hash_test}); assert.equal(hash.valueOf(), hash_test, “Not returning the correct address”) }) And I have an addExam function…