FundAgent API
Complete API reference for the FundAgent contract
Write Methods
createDomainSafe
Create a new Safe (multi-sig wallet) for a domain
Method Signature
function createDomainSafe(string domainName, address[] owners, uint256 threshold, address eshToken) external returns (address)
Example Usage
// Example usage
const tx = await fundAgent.createDomainSafe(
"my-domain",
["0x123...", "0x456...", "0x789..."], // Owner addresses
2, // Number of required confirmations
"0xabc..." // ESH token address
)
Possible Errors
- DomainNotFound: The specified domain does not exist
- SafeAlreadyExists: A Safe already exists for this domain
- InvalidOwners: Invalid owner configuration
- InvalidThreshold: Threshold must be greater than 0 and less than or equal to owners count