Skip to main content
Post Closed as "Duplicate" by Don, Phillip Hamnett - EOS42, tmm
deleted 104 characters in body
Source Link
"account_name": "buyer",
  "permissions": [{
      "perm_name": "active",
      "parent": "owner",
      "required_auth": {
        "threshold": 1,
        "keys": [{
            "key": "EOS8WqoYNnZZFHsgAhHRbcbVJWS7gpxJhPZ18pyVWDZ2nDMpgbdC8""buyer public key",
            "weight": 1
          }
        ],
        "accounts": [{
            "permission": {
              "actor": "market",
              "permission": "eosio.code"
            },
            "weight": 1
          }
        ],
        "waits": []
      }
    }
"account_name": "market",
  "permissions": [{
      "perm_name": "active",
      "parent": "owner",
      "required_auth": {
        "threshold": 1,
        "keys": [{
            "key": "EOS6hG7kidcSWFtq9asuyUK2HqpykoTeQiej5gdEkpmvphZnkZDA3""market public key",
            "weight": 1
          }
        ],
        "accounts": [{
            "permission": {
              "actor": "market",
              "permission": "eosio.code"
            },
            "weight": 1
          }
        ],
        "waits": []
      }
    }
"account_name": "eosio.token",
  "permissions": [{
      "perm_name": "active",
      "parent": "owner",
      "required_auth": {
        "threshold": 1,
        "keys": [{
            "key": "EOS5qurrzztw3rJMLfbXSC8K2GQUf2U43Ms11Rp3LNCYZscwFZznn""eosio.token public key",
            "weight": 1
          }
        ],
        "accounts": [{
            "permission": {
              "actor": "eosio.token",
              "permission": "eosio.code"
            },
            "weight": 1
          }
        ],
        "waits": []
      }
    }
"account_name": "buyer",
  "permissions": [{
      "perm_name": "active",
      "parent": "owner",
      "required_auth": {
        "threshold": 1,
        "keys": [{
            "key": "EOS8WqoYNnZZFHsgAhHRbcbVJWS7gpxJhPZ18pyVWDZ2nDMpgbdC8",
            "weight": 1
          }
        ],
        "accounts": [{
            "permission": {
              "actor": "market",
              "permission": "eosio.code"
            },
            "weight": 1
          }
        ],
        "waits": []
      }
    }
"account_name": "market",
  "permissions": [{
      "perm_name": "active",
      "parent": "owner",
      "required_auth": {
        "threshold": 1,
        "keys": [{
            "key": "EOS6hG7kidcSWFtq9asuyUK2HqpykoTeQiej5gdEkpmvphZnkZDA3",
            "weight": 1
          }
        ],
        "accounts": [{
            "permission": {
              "actor": "market",
              "permission": "eosio.code"
            },
            "weight": 1
          }
        ],
        "waits": []
      }
    }
"account_name": "eosio.token",
  "permissions": [{
      "perm_name": "active",
      "parent": "owner",
      "required_auth": {
        "threshold": 1,
        "keys": [{
            "key": "EOS5qurrzztw3rJMLfbXSC8K2GQUf2U43Ms11Rp3LNCYZscwFZznn",
            "weight": 1
          }
        ],
        "accounts": [{
            "permission": {
              "actor": "eosio.token",
              "permission": "eosio.code"
            },
            "weight": 1
          }
        ],
        "waits": []
      }
    }
"account_name": "buyer",
  "permissions": [{
      "perm_name": "active",
      "parent": "owner",
      "required_auth": {
        "threshold": 1,
        "keys": [{
            "key": "buyer public key",
            "weight": 1
          }
        ],
        "accounts": [{
            "permission": {
              "actor": "market",
              "permission": "eosio.code"
            },
            "weight": 1
          }
        ],
        "waits": []
      }
    }
"account_name": "market",
  "permissions": [{
      "perm_name": "active",
      "parent": "owner",
      "required_auth": {
        "threshold": 1,
        "keys": [{
            "key": "market public key",
            "weight": 1
          }
        ],
        "accounts": [{
            "permission": {
              "actor": "market",
              "permission": "eosio.code"
            },
            "weight": 1
          }
        ],
        "waits": []
      }
    }
"account_name": "eosio.token",
  "permissions": [{
      "perm_name": "active",
      "parent": "owner",
      "required_auth": {
        "threshold": 1,
        "keys": [{
            "key": "eosio.token public key",
            "weight": 1
          }
        ],
        "accounts": [{
            "permission": {
              "actor": "eosio.token",
              "permission": "eosio.code"
            },
            "weight": 1
          }
        ],
        "waits": []
      }
    }
edited title
Link

Make a transfer from contract code inon behalf of user

deleted 23 characters in body
Source Link

Implemented and locally deployed: sample market contract and eosio.token contract. When I tryIn order to make an inline transfer from market contract in behalf of a user, I am using the following logic:

I get the following error:This way assertion failure with message: unable to find keymarket contract will spend buyer's tokens, since it has been already authorized to do that.

AccountAccounts/Permissions configuration:

Implemented and locally deployed: sample market contract and eosio.token contract. When I try to make an inline transfer from market contract:

I get the following error: assertion failure with message: unable to find key

Account configuration:

Implemented and locally deployed: sample market contract and eosio.token contract. In order to make an inline transfer from market contract in behalf of a user, I am using the following logic:

This way market contract will spend buyer's tokens, since it has been already authorized to do that.

Accounts/Permissions configuration:

deleted 932 characters in body
Source Link
Loading
Source Link
Loading