MarginX 2.0 gitbook v1.1
  • 🚀Getting Started: MarginX 2.0
  • MARGINX 2.0 & ALO
    • Vision
    • Mechanic & Foundation of ALO
    • Comparison Between Order Book And Swap
    • Risk and Reward of Liquidity Providers
    • Product Comparison
    • MarginX ALO: Whitepaper
  • Technical structure
    • Contract Structure
      • CoastDAO Module
    • The Fund Module
      • Contract Specific Design
      • Cross-Chain Description
    • Contract Events
      • Strategy Factory
      • Strategy Pair
      • DssCdpManager
      • DSProxyFactory
      • Vat
    • Contract Invocation Method
      • DSProxyFactory
      • ProxyRegistry
      • DSProxy
      • The Price of the Collateral Assets
      • DssProxyActions
        • Adding Liquidity For New Perpetual Markets (First Time)
        • Creating Order (Providing Liquidity)
        • Request For Withdrawing Liquidity
        • Withdrawal
      • StrategyFactory
  • MarginX Spot
    • Swap
    • Pool
      • Add Liquidity
      • Remove Liquidity
    • Farm
      • Deposit LP Tokens
      • Withdraw LP Token
    • Supported Networks
  • MARGINX SUBGRAPH
    • Overview
    • Query Examples
  • MarginX 1.0
    • Built On f(x)Core
    • Decentralized Order Book
    • Referral Programme
    • MarginX NFTs
    • Maker Liquidity Pool
    • MarginX 1.0 Litepaper
  • ERC20 Token Factory
    • Token Factory Supported Networks
    • Create Token
    • Provide Token Details
    • Interact with Token
    • Role Management
  • Help desk
    • Perpetual Trading 101
    • User Guide (Video)
    • MarginX 2.0 FAQ
    • Contact us
Powered by GitBook
On this page
  1. Technical structure
  2. Contract Invocation Method

DSProxy

A proxy user contract is generated when a user calls build through the ProxyRegistry

function execute(address _target, bytes memory _data)

_target:DssProxyActions smart contract address
_data:bytes of the specific method cal

Abi:

[
    {
        "type":"constructor",
        "inputs":[
            {
                "type":"address",
                "name":"_cacheAddr",
                "internalType":"address"
            }
        ]
    },
    {
        "type":"function",
        "stateMutability":"view",
        "outputs":[
            {
                "type":"address",
                "name":"",
                "internalType":"contract DSAuthority"
            }
        ],
        "name":"authority",
        "inputs":[

        ],
        "constant":true
    },
    {
        "type":"function",
        "stateMutability":"view",
        "outputs":[
            {
                "type":"address",
                "name":"",
                "internalType":"contract DSProxyCache"
            }
        ],
        "name":"cache",
        "inputs":[

        ],
        "constant":true
    },
    {
        "type":"function",
        "stateMutability":"payable",
        "outputs":[
            {
                "type":"bytes",
                "name":"response",
                "internalType":"bytes"
            }
        ],
        "name":"execute",
        "inputs":[
            {
                "type":"address",
                "name":"_target",
                "internalType":"address"
            },
            {
                "type":"bytes",
                "name":"_data",
                "internalType":"bytes"
            }
        ],
        "constant":false
    },
    {
        "type":"function",
        "stateMutability":"payable",
        "outputs":[
            {
                "type":"address",
                "name":"target",
                "internalType":"address"
            },
            {
                "type":"bytes",
                "name":"response",
                "internalType":"bytes"
            }
        ],
        "name":"execute",
        "inputs":[
            {
                "type":"bytes",
                "name":"_code",
                "internalType":"bytes"
            },
            {
                "type":"bytes",
                "name":"_data",
                "internalType":"bytes"
            }
        ],
        "constant":false
    },
    {
        "type":"function",
        "stateMutability":"view",
        "outputs":[
            {
                "type":"address",
                "name":"",
                "internalType":"address"
            }
        ],
        "name":"owner",
        "inputs":[

        ],
        "constant":true
    },
    {
        "type":"function",
        "stateMutability":"nonpayable",
        "outputs":[

        ],
        "name":"setAuthority",
        "inputs":[
            {
                "type":"address",
                "name":"authority_",
                "internalType":"contract DSAuthority"
            }
        ],
        "constant":false
    },
    {
        "type":"function",
        "stateMutability":"nonpayable",
        "outputs":[
            {
                "type":"bool",
                "name":"",
                "internalType":"bool"
            }
        ],
        "name":"setCache",
        "inputs":[
            {
                "type":"address",
                "name":"_cacheAddr",
                "internalType":"address"
            }
        ],
        "constant":false
    },
    {
        "type":"function",
        "stateMutability":"nonpayable",
        "outputs":[

        ],
        "name":"setOwner",
        "inputs":[
            {
                "type":"address",
                "name":"owner_",
                "internalType":"address"
            }
        ],
        "constant":false
    },
    {
        "type":"event",
        "name":"LogNote",
        "inputs":[
            {
                "type":"bytes4",
                "name":"sig",
                "indexed":true
            },
            {
                "type":"address",
                "name":"guy",
                "indexed":true
            },
            {
                "type":"bytes32",
                "name":"foo",
                "indexed":true
            },
            {
                "type":"bytes32",
                "name":"bar",
                "indexed":true
            },
            {
                "type":"uint256",
                "name":"wad",
                "indexed":false
            },
            {
                "type":"bytes",
                "name":"fax",
                "indexed":false
            }
        ],
        "anonymous":true
    },
    {
        "type":"event",
        "name":"LogSetAuthority",
        "inputs":[
            {
                "type":"address",
                "name":"authority",
                "indexed":true
            }
        ],
        "anonymous":false
    },
    {
        "type":"event",
        "name":"LogSetOwner",
        "inputs":[
            {
                "type":"address",
                "name":"owner",
                "indexed":true
            }
        ],
        "anonymous":false
    },
    {
        "type":"fallback"
    }
]

PreviousProxyRegistryNextThe Price of the Collateral Assets

Last updated 1 year ago